github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/pagerduty/config.go (about)

     1  package pagerduty
     2  
     3  import (
     4  	"log"
     5  
     6  	"github.com/PagerDuty/go-pagerduty"
     7  )
     8  
     9  // Config defines the configuration options for the PagerDuty client
    10  type Config struct {
    11  	Token string
    12  }
    13  
    14  // Client returns a new PagerDuty client
    15  func (c *Config) Client() (*pagerduty.Client, error) {
    16  	client := pagerduty.NewClient(c.Token)
    17  
    18  	log.Printf("[INFO] PagerDuty client configured")
    19  
    20  	return client, nil
    21  }