2015-05-31 16:58:14 +02:00
|
|
|
package packet
|
|
|
|
|
|
|
|
import (
|
2015-10-22 20:03:25 +02:00
|
|
|
"github.com/hashicorp/go-cleanhttp"
|
2015-05-31 16:58:14 +02:00
|
|
|
"github.com/packethost/packngo"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
consumerToken = "aZ9GmqHTPtxevvFq9SK3Pi2yr9YCbRzduCSXF2SNem5sjB91mDq7Th3ZwTtRqMWZ"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
AuthToken string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Client() returns a new client for accessing packet.
|
|
|
|
func (c *Config) Client() *packngo.Client {
|
2015-10-22 20:03:25 +02:00
|
|
|
return packngo.NewClient(consumerToken, c.AuthToken, cleanhttp.DefaultClient())
|
2015-05-31 16:58:14 +02:00
|
|
|
}
|