api

package
v0.0.0-...-02290c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func CreateCloudConfigHandler

func CreateCloudConfigHandler(w http.ResponseWriter, r *http.Request)

func CreateMachineHandler

func CreateMachineHandler(w http.ResponseWriter, r *http.Request)

func CreateProfileHandler

func CreateProfileHandler(w http.ResponseWriter, r *http.Request)

func CreateSSHKeyHandler

func CreateSSHKeyHandler(w http.ResponseWriter, r *http.Request)

func DeleteCloudConfigByName

func DeleteCloudConfigByName(name string) error

func DeleteCloudConfigHandler

func DeleteCloudConfigHandler(w http.ResponseWriter, r *http.Request)

func DeleteFromBucket

func DeleteFromBucket(bucket, name string) error

func DeleteMachineByName

func DeleteMachineByName(name string) error

func DeleteMachineHandler

func DeleteMachineHandler(w http.ResponseWriter, r *http.Request)

func DeleteProfileByName

func DeleteProfileByName(name string) error

func DeleteProfileHandler

func DeleteProfileHandler(w http.ResponseWriter, r *http.Request)

func DeleteSSHKeyByName

func DeleteSSHKeyByName(name string) error

func DeleteSSHKeyHandler

func DeleteSSHKeyHandler(w http.ResponseWriter, r *http.Request)

func GetAllFromBucket

func GetAllFromBucket(bucket string, f func(k, v []byte) error) error

func GetCloudConfigHandler

func GetCloudConfigHandler(w http.ResponseWriter, r *http.Request)

func GetFromBucket

func GetFromBucket(bucket, name string, v interface{}) error

func GetMachineHandler

func GetMachineHandler(w http.ResponseWriter, r *http.Request)

func GetProfileHandler

func GetProfileHandler(w http.ResponseWriter, r *http.Request)

func GetSSHKeyHandler

func GetSSHKeyHandler(w http.ResponseWriter, r *http.Request)

func Handler

func Handler() http.Handler

func ListCloudConfigHandler

func ListCloudConfigHandler(w http.ResponseWriter, r *http.Request)

func ListMachinesHandler

func ListMachinesHandler(w http.ResponseWriter, r *http.Request)

func ListProfilesHandler

func ListProfilesHandler(w http.ResponseWriter, r *http.Request)

func ListSSHKeyHandler

func ListSSHKeyHandler(w http.ResponseWriter, r *http.Request)

func PutToBucket

func PutToBucket(bucket, name string, v interface{}) error

func UpdateMachineHandler

func UpdateMachineHandler(w http.ResponseWriter, r *http.Request)

Types

type CloudConfig

type CloudConfig struct {
	Name   string `json:"name"`
	Config string `json:"config"`
}

func GetCloudConfigByName

func GetCloudConfigByName(name string) (CloudConfig, error)

func GetCloudConfigs

func GetCloudConfigs() ([]CloudConfig, error)

func (CloudConfig) Save

func (c CloudConfig) Save() error

type CloudConfigsResponse

type CloudConfigsResponse struct {
	CloudConfigs []CloudConfig `json:"cloudconfigs"`
}

type Machine

type Machine struct {
	Name       string `json:"name"`
	MacAddress string `json:"macaddress"`
	Profile    string `json:"profile"`
}

func GetMachineByName

func GetMachineByName(name string) (Machine, error)

func GetMachines

func GetMachines() ([]Machine, error)

func (Machine) Save

func (m Machine) Save() error

type Profile

type Profile struct {
	Name            string `json:"name"`
	CloudConfig     string `json:"cloud_config"`
	Console         string `json:"console"`
	CoreosAutologin string `json:"coreos_autologin"`
	RootFstype      string `json:"rootfstype"`
	Root            string `json:"root"`
	SSHKey          string `json:"sshkey"`
	Version         string `json:"version"`
}

func GetProfileByName

func GetProfileByName(name string) (Profile, error)

func GetProfiles

func GetProfiles() ([]Profile, error)

func (Profile) Save

func (p Profile) Save() error

type ProfilesResponse

type ProfilesResponse struct {
	Profiles []Profile `json:"profiles"`
}

type Response

type Response struct {
	Machines []Machine `json:"machines"`
}

type SSHKey

type SSHKey struct {
	Name        string `json:"name"`
	Fingerprint string `json:"fingerprint"`
	Key         string `json:"key"`
}

func GetSSHKeyByName

func GetSSHKeyByName(name string) (SSHKey, error)

func GetSSHKeys

func GetSSHKeys() ([]SSHKey, error)

func (SSHKey) Save

func (s SSHKey) Save() error

type SSHKeysResponse

type SSHKeysResponse struct {
	SSHKeys []SSHKey `json:"sshkeys"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL