1
0
mirror of https://github.com/rancher/os.git synced 2025-10-21 15:34:46 +00:00

vendor packngo

This commit is contained in:
Darren Shepherd
2015-12-22 22:34:19 -07:00
parent 9187ed724d
commit 946d353e0c
36 changed files with 12357 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package metadata
import (
"bytes"
"github.com/packethost/packngo"
)
const (
userdataBasePath = "/userdata"
)
type UserdataServiceOp struct {
client *packngo.Client
}
func (s *UserdataServiceOp) Get() (string, error) {
req, err := s.client.NewRequest("GET", userdataBasePath, nil)
if err != nil {
return "", err
}
buffer := &bytes.Buffer{}
_, err = s.client.Do(req, buffer)
return buffer.String(), err
}