2015-05-31 16:58:14 +02:00
|
|
|
package packet
|
|
|
|
|
|
|
|
import (
|
2015-10-19 19:03:28 +02:00
|
|
|
"net/http"
|
|
|
|
|
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-19 19:03:28 +02:00
|
|
|
return packngo.NewClient(consumerToken, c.AuthToken, &http.Client{})
|
2015-05-31 16:58:14 +02:00
|
|
|
}
|