github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/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 }