github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/packet/config.go (about)

     1  package packet
     2  
     3  import (
     4  	"github.com/hashicorp/go-cleanhttp"
     5  	"github.com/packethost/packngo"
     6  )
     7  
     8  const (
     9  	consumerToken = "aZ9GmqHTPtxevvFq9SK3Pi2yr9YCbRzduCSXF2SNem5sjB91mDq7Th3ZwTtRqMWZ"
    10  )
    11  
    12  type Config struct {
    13  	AuthToken string
    14  }
    15  
    16  // Client() returns a new client for accessing Packet's API.
    17  func (c *Config) Client() *packngo.Client {
    18  	return packngo.NewClient(consumerToken, c.AuthToken, cleanhttp.DefaultClient())
    19  }