You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/builtin/providers/packet/config.go

20 lines
423 B

package packet
import (
"github.com/hashicorp/go-cleanhttp"
"github.com/packethost/packngo"
)
const (
consumerToken = "aZ9GmqHTPtxevvFq9SK3Pi2yr9YCbRzduCSXF2SNem5sjB91mDq7Th3ZwTtRqMWZ"
)
type Config struct {
AuthToken string
}
// Client() returns a new client for accessing Packet's API.
func (c *Config) Client() *packngo.Client {
return packngo.NewClient(consumerToken, c.AuthToken, cleanhttp.DefaultClient())
}