github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/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.
    17  func (c *Config) Client() *packngo.Client {
    18  	return packngo.NewClient(consumerToken, c.AuthToken, cleanhttp.DefaultClient())
    19  }