github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/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  }