Documentation ¶
Index ¶
- Variables
- type CloudAPI
- func (c *CloudAPI) CountMachines() (int, error)
- func (c *CloudAPI) CreateFirewallRule(rule string, enabled bool) (*cloudapi.FirewallRule, error)
- func (c *CloudAPI) CreateKey(keyName, key string) (*cloudapi.Key, error)
- func (c *CloudAPI) CreateMachine(name, pkg, image string, metadata, tags map[string]string) (*cloudapi.Machine, error)
- func (c *CloudAPI) DeleteFirewallRule(fwRuleId string) error
- func (c *CloudAPI) DeleteKey(keyName string) error
- func (c *CloudAPI) DeleteMachine(machineId string) error
- func (c *CloudAPI) DisableFirewallMachine(machineId string) error
- func (c *CloudAPI) DisableFirewallRule(fwRuleId string) (*cloudapi.FirewallRule, error)
- func (c *CloudAPI) EnableFirewallMachine(machineId string) error
- func (c *CloudAPI) EnableFirewallRule(fwRuleId string) (*cloudapi.FirewallRule, error)
- func (c *CloudAPI) GetFirewallRule(fwRuleId string) (*cloudapi.FirewallRule, error)
- func (c *CloudAPI) GetImage(imageId string) (*cloudapi.Image, error)
- func (c *CloudAPI) GetKey(keyName string) (*cloudapi.Key, error)
- func (c *CloudAPI) GetMachine(machineId string) (*cloudapi.Machine, error)
- func (c *CloudAPI) GetNetwork(networkId string) (*cloudapi.Network, error)
- func (c *CloudAPI) GetPackage(packageName string) (*cloudapi.Package, error)
- func (c *CloudAPI) ListFirewallRuleMachines(fwRuleId string) ([]*cloudapi.Machine, error)
- func (c *CloudAPI) ListFirewallRules() ([]*cloudapi.FirewallRule, error)
- func (c *CloudAPI) ListImages(filters map[string]string) ([]cloudapi.Image, error)
- func (c *CloudAPI) ListKeys() ([]cloudapi.Key, error)
- func (c *CloudAPI) ListMachineFirewallRules(machineId string) ([]*cloudapi.FirewallRule, error)
- func (c *CloudAPI) ListMachines(filters map[string]string) ([]*cloudapi.Machine, error)
- func (c *CloudAPI) ListNetworks() ([]cloudapi.Network, error)
- func (c *CloudAPI) ListPackages(filters map[string]string) ([]cloudapi.Package, error)
- func (c *CloudAPI) RebootMachine(machineId string) error
- func (c *CloudAPI) RenameMachine(machineId, newName string) error
- func (c *CloudAPI) ResizeMachine(machineId, packageName string) error
- func (c *CloudAPI) SetupHTTP(mux *http.ServeMux)
- func (c *CloudAPI) StartMachine(machineId string) error
- func (c *CloudAPI) StopMachine(machineId string) error
- func (c *CloudAPI) UpdateFirewallRule(fwRuleId, rule string, enabled bool) (*cloudapi.FirewallRule, error)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAllowed = &ErrorResponse{ http.StatusMethodNotAllowed, "Method is not allowed", "text/plain; charset=UTF-8", "MethodNotAllowedError", nil, nil, } ErrNotFound = &ErrorResponse{ http.StatusNotFound, "Resource Not Found", "text/plain; charset=UTF-8", "NotFoundError", nil, nil, } ErrBadRequest = &ErrorResponse{ http.StatusBadRequest, "Malformed request url", "text/plain; charset=UTF-8", "BadRequestError", nil, nil, } )
Functions ¶
This section is empty.
Types ¶
type CloudAPI ¶
type CloudAPI struct { localservices.ServiceInstance // contains filtered or unexported fields }
func (*CloudAPI) CountMachines ¶
func (*CloudAPI) CreateFirewallRule ¶
func (*CloudAPI) CreateMachine ¶
func (*CloudAPI) DeleteFirewallRule ¶
func (*CloudAPI) DeleteMachine ¶
func (*CloudAPI) DisableFirewallMachine ¶
func (*CloudAPI) DisableFirewallRule ¶
func (c *CloudAPI) DisableFirewallRule(fwRuleId string) (*cloudapi.FirewallRule, error)
func (*CloudAPI) EnableFirewallMachine ¶
func (*CloudAPI) EnableFirewallRule ¶
func (c *CloudAPI) EnableFirewallRule(fwRuleId string) (*cloudapi.FirewallRule, error)
func (*CloudAPI) GetFirewallRule ¶
func (c *CloudAPI) GetFirewallRule(fwRuleId string) (*cloudapi.FirewallRule, error)
func (*CloudAPI) GetMachine ¶
func (*CloudAPI) GetNetwork ¶
func (*CloudAPI) GetPackage ¶
func (*CloudAPI) ListFirewallRuleMachines ¶
func (*CloudAPI) ListFirewallRules ¶
func (c *CloudAPI) ListFirewallRules() ([]*cloudapi.FirewallRule, error)
FirewallRule APIs
func (*CloudAPI) ListImages ¶
Images APIs
func (*CloudAPI) ListMachineFirewallRules ¶
func (c *CloudAPI) ListMachineFirewallRules(machineId string) ([]*cloudapi.FirewallRule, error)
func (*CloudAPI) ListMachines ¶
Machine APIs
func (*CloudAPI) ListNetworks ¶
Networks API
func (*CloudAPI) ListPackages ¶
Packages APIs
func (*CloudAPI) RebootMachine ¶
func (*CloudAPI) RenameMachine ¶
func (*CloudAPI) ResizeMachine ¶
func (*CloudAPI) StartMachine ¶
func (*CloudAPI) StopMachine ¶
func (*CloudAPI) UpdateFirewallRule ¶
type ErrorResponse ¶
ErrorResponse defines a single HTTP error response.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
func (*ErrorResponse) ServeHTTP ¶
func (e *ErrorResponse) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.