api

package
v0.0.0-...-8388630 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeResponse

func DecodeResponse(resp *http.Response, v interface{}) error

Types

type AuthResponse

type AuthResponse struct {
	Session struct {
		Username string
		Key      string
	}
}

type HTTPClient

type HTTPClient struct {
	BaseURL  string
	Username string
	Key      string
}

func (*HTTPClient) CreateHost

func (client *HTTPClient) CreateHost(name string, ramInMB int) (*Host, error)

func (*HTTPClient) DeleteHost

func (client *HTTPClient) DeleteHost(id string) error

func (*HTTPClient) DoRequest

func (client *HTTPClient) DoRequest(req *http.Request, v interface{}) error

func (*HTTPClient) GetAuthKey

func (client *HTTPClient) GetAuthKey(username string, password string) (string, string, error)

func (*HTTPClient) GetHost

func (client *HTTPClient) GetHost(name string) (*Host, error)

func (*HTTPClient) GetHosts

func (client *HTTPClient) GetHosts() ([]*Host, error)

type Host

type Host struct {
	ID         string `json:"_id"`
	Name       string
	URL        string
	Size       int64
	IPAddress  string `json:"ipv4_address"`
	Port       int64
	ClientKey  string `json:"client_key"`
	ClientCert string `json:"client_cert"`
}

Jump to

Keyboard shortcuts

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