github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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  }