Documentation ¶
Index ¶
- Constants
- type ApiError
- type BalancedNics
- type Cdroms
- type Client
- func (c *Client) AddShare(groupid string, resourceid string, share Share) (*Share, error)
- func (c *Client) AddUserToGroup(groupid string, userid string) (*User, error)
- func (c *Client) AssociateNic(dcid string, lbalid string, nicid string) (*Nic, error)
- func (c *Client) AttachCdrom(dcid string, srvid string, cdid string) (*Image, error)
- func (c *Client) AttachVolume(dcid string, srvid string, volid string) (*Volume, error)
- func (c *Client) CreateDatacenter(dc Datacenter) (*Datacenter, error)
- func (c *Client) CreateFirewallRule(dcID string, serverID string, nicID string, fw FirewallRule) (*FirewallRule, error)
- func (c *Client) CreateGroup(grp Group) (*Group, error)
- func (c *Client) CreateLan(dcid string, request Lan) (*Lan, error)
- func (c *Client) CreateLoadbalancer(dcid string, request Loadbalancer) (*Loadbalancer, error)
- func (c *Client) CreateNic(dcid string, srvid string, nic Nic) (*Nic, error)
- func (c *Client) CreateServer(dcid string, server Server) (*Server, error)
- func (c *Client) CreateSnapshot(dcid string, volid string, name string, description string) (*Snapshot, error)
- func (c *Client) CreateUser(usr User) (*User, error)
- func (c *Client) CreateVolume(dcid string, request Volume) (*Volume, error)
- func (c *Client) DeleteBalancedNic(dcid, lbalid, balnicid string) (*http.Header, error)
- func (c *Client) DeleteDatacenter(dcid string) (*http.Header, error)
- func (c *Client) DeleteFirewallRule(dcID string, serverID string, nicID string, fwID string) (*http.Header, error)
- func (c *Client) DeleteGroup(groupid string) (*http.Header, error)
- func (c *Client) DeleteLan(dcid, lanid string) (*http.Header, error)
- func (c *Client) DeleteLoadbalancer(dcid, lbalid string) (*http.Header, error)
- func (c *Client) DeleteNic(dcid, srvid, nicid string) (*http.Header, error)
- func (c *Client) DeleteServer(dcid, srvid string) (*http.Header, error)
- func (c *Client) DeleteShare(groupid string, resourceid string) (*http.Header, error)
- func (c *Client) DeleteSnapshot(snapshotID string) (*http.Header, error)
- func (c *Client) DeleteUser(userid string) (*http.Header, error)
- func (c *Client) DeleteUserFromGroup(groupid string, userid string) (*http.Header, error)
- func (c *Client) DeleteVolume(dcid, volid string) (*http.Header, error)
- func (c *Client) DetachCdrom(dcid, srvid, cdid string) (*http.Header, error)
- func (c *Client) DetachVolume(dcid, srvid, volid string) (*http.Header, error)
- func (c *Client) GetAttachedCdrom(dcid, srvid, cdid string) (*Image, error)
- func (c *Client) GetAttachedVolume(dcid, srvid, volid string) (*Volume, error)
- func (c *Client) GetBalancedNic(dcid, lbalid, balnicid string) (*Nic, error)
- func (c *Client) GetContractResources() (*ContractResources, error)
- func (c *Client) GetDatacenter(dcid string) (*Datacenter, error)
- func (c *Client) GetFirewallRule(dcID string, serverID string, nicID string, fwID string) (*FirewallRule, error)
- func (c *Client) GetGroup(groupid string) (*Group, error)
- func (c *Client) GetIPBlock(ipblockid string) (*IPBlock, error)
- func (c *Client) GetImage(imageid string) (*Image, error)
- func (c *Client) GetLan(dcid, lanid string) (*Lan, error)
- func (c *Client) GetLoadbalancer(dcid, lbalid string) (*Loadbalancer, error)
- func (c *Client) GetLocation(locid string) (*Location, error)
- func (c *Client) GetNic(dcid, srvid, nicid string) (*Nic, error)
- func (c *Client) GetRegionalLocations(regid string) (*Locations, error)
- func (c *Client) GetRequest(reqID string) (*Request, error)
- func (c *Client) GetRequestStatus(path string) (*RequestStatus, error)
- func (c *Client) GetResourceByType(resourcetype string, resourceid string) (*Resource, error)
- func (c *Client) GetServer(dcid, srvid string) (*Server, error)
- func (c *Client) GetShare(groupid string, resourceid string) (*Share, error)
- func (c *Client) GetSnapshot(snapshotID string) (*Snapshot, error)
- func (c *Client) GetUser(usrid string) (*User, error)
- func (c *Client) GetUserAgent() string
- func (c *Client) GetVolume(dcid string, volumeID string) (*Volume, error)
- func (c *Client) ListAttachedCdroms(dcid, srvid string) (*Images, error)
- func (c *Client) ListAttachedVolumes(dcid, srvid string) (*Volumes, error)
- func (c *Client) ListBalancedNics(dcid, lbalid string) (*Nics, error)
- func (c *Client) ListDatacenters() (*Datacenters, error)
- func (c *Client) ListFirewallRules(dcID string, serverID string, nicID string) (*FirewallRules, error)
- func (c *Client) ListGroupUsers(groupid string) (*Users, error)
- func (c *Client) ListGroups() (*Groups, error)
- func (c *Client) ListIPBlocks() (*IPBlocks, error)
- func (c *Client) ListImages() (*Images, error)
- func (c *Client) ListLans(dcid string) (*Lans, error)
- func (c *Client) ListLoadbalancers(dcid string) (*Loadbalancers, error)
- func (c *Client) ListLocations() (*Locations, error)
- func (c *Client) ListNics(dcid, srvid string) (*Nics, error)
- func (c *Client) ListRequests() (*Requests, error)
- func (c *Client) ListResources() (*Resources, error)
- func (c *Client) ListResourcesByType(resourcetype string) (*Resources, error)
- func (c *Client) ListServers(dcid string) (*Servers, error)
- func (c *Client) ListShares(grpid string) (*Shares, error)
- func (c *Client) ListSnapshots() (*Snapshots, error)
- func (c *Client) ListUsers() (*Users, error)
- func (c *Client) ListVolumes(dcid string) (*Volumes, error)
- func (c *Client) RebootServer(dcid, srvid string) (*http.Header, error)
- func (c *Client) ReleaseIPBlock(ipblockid string) (*http.Header, error)
- func (c *Client) ReserveIPBlock(request IPBlock) (*IPBlock, error)
- func (c *Client) RestoreSnapshot(dcid string, volid string, snapshotID string) (*http.Header, error)
- func (c *Client) SetDepth(depth int)
- func (c *Client) SetURL(url string)
- func (c *Client) SetUserAgent(agent string)
- func (c *Client) StartServer(dcid, srvid string) (*http.Header, error)
- func (c *Client) StopServer(dcid, srvid string) (*http.Header, error)
- func (c *Client) UpdateDataCenter(dcid string, obj DatacenterProperties) (*Datacenter, error)
- func (c *Client) UpdateFirewallRule(dcID string, serverID string, nicID string, fwID string, ...) (*FirewallRule, error)
- func (c *Client) UpdateGroup(groupid string, obj Group) (*Group, error)
- func (c *Client) UpdateIPBlock(ipblockid string, props IPBlockProperties) (*IPBlock, error)
- func (c *Client) UpdateLan(dcid string, lanid string, obj LanProperties) (*Lan, error)
- func (c *Client) UpdateLoadbalancer(dcid string, lbalid string, obj LoadbalancerProperties) (*Loadbalancer, error)
- func (c *Client) UpdateNic(dcid string, srvid string, nicid string, obj NicProperties) (*Nic, error)
- func (c *Client) UpdateServer(dcid string, srvid string, props ServerProperties) (*Server, error)
- func (c *Client) UpdateShare(groupid string, resourceid string, obj Share) (*Share, error)
- func (c *Client) UpdateSnapshot(snapshotID string, request SnapshotProperties) (*Snapshot, error)
- func (c *Client) UpdateUser(userid string, obj User) (*User, error)
- func (c *Client) UpdateVolume(dcid string, volid string, request VolumeProperties) (*Volume, error)
- func (c *Client) WaitTillProvisioned(path string) error
- type ContractResources
- type ContractResourcesProperties
- type Datacenter
- type DatacenterEntities
- type DatacenterProperties
- type Datacenters
- type Entity
- type FirewallRule
- type FirewallRules
- type FirewallruleProperties
- type Group
- type GroupEntities
- type GroupProperties
- type Groups
- type IPBlock
- type IPBlockProperties
- type IPBlocks
- type IPFailover
- type Image
- type ImageProperties
- type Images
- type Lan
- type LanEntities
- type LanNics
- type LanProperties
- type Lans
- type Loadbalancer
- type LoadbalancerEntities
- type LoadbalancerProperties
- type Loadbalancers
- type Location
- type LocationProperties
- type Locations
- type Metadata
- type Nic
- type NicEntities
- type NicProperties
- type Nics
- type Owns
- type Request
- type RequestStatus
- type RequestStatusMetadata
- type RequestTarget
- type Requests
- type Resource
- type ResourceEntities
- type ResourceReference
- type Resources
- type ResourcesLimits
- type Resp
- type Server
- type ServerEntities
- type ServerProperties
- type Servers
- type Share
- type ShareProperties
- type Shares
- type Snapshot
- type SnapshotProperties
- type Snapshots
- type User
- type UserEntities
- type UserProperties
- type Users
- type Volume
- type VolumeProperties
- type Volumes
Constants ¶
const (
//FullHeader is the standard header to include with all http requests except is_patch and is_command
FullHeader = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiError ¶
type ApiError struct {
// contains filtered or unexported fields
}
func (ApiError) HttpStatusCode ¶
type BalancedNics ¶
type BalancedNics struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Nic `json:"items,omitempty"` }
BalancedNics object
type Cdroms ¶
type Cdroms struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Image `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Cdroms object
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client object
func (*Client) AddUserToGroup ¶
AddUserToGroup adds a user to a group
func (*Client) AssociateNic ¶
AssociateNic attach a nic to load balancer
func (*Client) AttachCdrom ¶
AttachCdrom attaches a CD rom
func (*Client) AttachVolume ¶
AttachVolume attaches a volume
func (*Client) CreateDatacenter ¶
func (c *Client) CreateDatacenter(dc Datacenter) (*Datacenter, error)
CreateDatacenter creates a data center
func (*Client) CreateFirewallRule ¶
func (c *Client) CreateFirewallRule(dcID string, serverID string, nicID string, fw FirewallRule) (*FirewallRule, error)
CreateFirewallRule creates a firewall rule
func (*Client) CreateGroup ¶
CreateGroup creates a group
func (*Client) CreateLan ¶
CreateLan creates a lan in the datacenter from a jason []byte and returns a Instance struct
func (*Client) CreateLoadbalancer ¶
func (c *Client) CreateLoadbalancer(dcid string, request Loadbalancer) (*Loadbalancer, error)
CreateLoadbalancer creates a loadbalancer in the datacenter from a jason []byte and returns a Instance struct
func (*Client) CreateServer ¶
CreateServer creates a server from a jason []byte and returns a Instance struct
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(dcid string, volid string, name string, description string) (*Snapshot, error)
CreateSnapshot creates a volume snapshot
func (*Client) CreateUser ¶
CreateUser creates a user
func (*Client) CreateVolume ¶
CreateVolume creates a volume
func (*Client) DeleteBalancedNic ¶
DeleteBalancedNic removes a balanced nic
func (*Client) DeleteDatacenter ¶
DeleteDatacenter deletes a data center
func (*Client) DeleteFirewallRule ¶
func (c *Client) DeleteFirewallRule(dcID string, serverID string, nicID string, fwID string) (*http.Header, error)
DeleteFirewallRule deletes a firewall rule
func (*Client) DeleteGroup ¶
DeleteGroup deletes a group
func (*Client) DeleteLoadbalancer ¶
DeleteLoadbalancer deletes a load balancer
func (*Client) DeleteServer ¶
DeleteServer deletes the server where id=srvid and returns Resp struct
func (*Client) DeleteShare ¶
DeleteShare deletes a share
func (*Client) DeleteSnapshot ¶
DeleteSnapshot deletes a specified snapshot
func (*Client) DeleteUser ¶
DeleteUser deletes the specified user
func (*Client) DeleteUserFromGroup ¶
DeleteUserFromGroup removes a user from a group
func (*Client) DeleteVolume ¶
DeleteVolume deletes a volume
func (*Client) DetachCdrom ¶
DetachCdrom detaches a CD rom
func (*Client) DetachVolume ¶
DetachVolume detaches a volume
func (*Client) GetAttachedCdrom ¶
GetAttachedCdrom gets attached cd roms
func (*Client) GetAttachedVolume ¶
GetAttachedVolume gets an attached volume
func (*Client) GetBalancedNic ¶
GetBalancedNic gets a balanced nic
func (*Client) GetContractResources ¶
func (c *Client) GetContractResources() (*ContractResources, error)
GetContractResources returns list of contract resources
func (*Client) GetDatacenter ¶
func (c *Client) GetDatacenter(dcid string) (*Datacenter, error)
GetDatacenter gets a datacenter
func (*Client) GetFirewallRule ¶
func (c *Client) GetFirewallRule(dcID string, serverID string, nicID string, fwID string) (*FirewallRule, error)
GetFirewallRule gets a firewall rule
func (*Client) GetIPBlock ¶
GetIPBlock gets an IP blocks
func (*Client) GetLoadbalancer ¶
func (c *Client) GetLoadbalancer(dcid, lbalid string) (*Loadbalancer, error)
GetLoadbalancer pulls data for the Loadbalancer where id = lbalid returns a Instance struct
func (*Client) GetLocation ¶
GetLocation returns location data
func (*Client) GetRegionalLocations ¶
GetRegionalLocations returns a list of available locations in a specific region
func (*Client) GetRequest ¶
GetRequest gets a specific request
func (*Client) GetRequestStatus ¶
func (c *Client) GetRequestStatus(path string) (*RequestStatus, error)
GetRequestStatus retursn status of the request
func (*Client) GetResourceByType ¶
GetResourceByType gets a resource by type
func (*Client) GetServer ¶
GetServer pulls data for the server where id = srvid returns a Instance struct
func (*Client) GetSnapshot ¶
GetSnapshot gets a specific snapshot
func (*Client) GetUserAgent ¶
GetUserAgent gets User-Agent header
func (*Client) ListAttachedCdroms ¶
ListAttachedCdroms returns list of attached cd roms
func (*Client) ListAttachedVolumes ¶
ListAttachedVolumes lists attached volumes
func (*Client) ListBalancedNics ¶
ListBalancedNics lists balanced nics
func (*Client) ListDatacenters ¶
func (c *Client) ListDatacenters() (*Datacenters, error)
ListDatacenters lists all data centers
func (*Client) ListFirewallRules ¶
func (c *Client) ListFirewallRules(dcID string, serverID string, nicID string) (*FirewallRules, error)
ListFirewallRules lists all firewall rules
func (*Client) ListGroupUsers ¶
ListGroupUsers lists Users in a group
func (*Client) ListGroups ¶
ListGroups lists all groups
func (*Client) ListIPBlocks ¶
ListIPBlocks lists all IP blocks
func (*Client) ListImages ¶
ListImages returns an Collection struct
func (*Client) ListLoadbalancers ¶
func (c *Client) ListLoadbalancers(dcid string) (*Loadbalancers, error)
ListLoadbalancers returns a Collection struct for loadbalancers in the Datacenter
func (*Client) ListLocations ¶
ListLocations returns location collection data
func (*Client) ListRequests ¶
ListRequests lists all requests
func (*Client) ListResources ¶
ListResources lists all resources
func (*Client) ListResourcesByType ¶
ListResourcesByType list resources by type
func (*Client) ListServers ¶
ListServers returns a server struct collection
func (*Client) ListShares ¶
ListShares lists all shares
func (*Client) ListSnapshots ¶
ListSnapshots lists all snapshots
func (*Client) ListVolumes ¶
ListVolumes returns a Collection struct for volumes in the Datacenter
func (*Client) RebootServer ¶
RebootServer reboots a server
func (*Client) ReleaseIPBlock ¶
ReleaseIPBlock deletes an IP block
func (*Client) ReserveIPBlock ¶
ReserveIPBlock creates an IP block
func (*Client) RestoreSnapshot ¶
func (c *Client) RestoreSnapshot(dcid string, volid string, snapshotID string) (*http.Header, error)
RestoreSnapshot restores a volume with provided snapshot
func (*Client) SetUserAgent ¶
SetUserAgent sets User-Agent request header for all API calls
func (*Client) StartServer ¶
StartServer starts a server
func (*Client) StopServer ¶
StopServer stops a server
func (*Client) UpdateDataCenter ¶
func (c *Client) UpdateDataCenter(dcid string, obj DatacenterProperties) (*Datacenter, error)
UpdateDataCenter updates a data center
func (*Client) UpdateFirewallRule ¶
func (c *Client) UpdateFirewallRule(dcID string, serverID string, nicID string, fwID string, obj FirewallruleProperties) (*FirewallRule, error)
UpdateFirewallRule updates a firewall rule
func (*Client) UpdateGroup ¶
UpdateGroup updates a group
func (*Client) UpdateIPBlock ¶
func (c *Client) UpdateIPBlock(ipblockid string, props IPBlockProperties) (*IPBlock, error)
UpdateIPBlock partial update of ipblock properties
func (*Client) UpdateLan ¶
UpdateLan does a partial update to a lan using json from []byte json returns a Instance struct
func (*Client) UpdateLoadbalancer ¶
func (c *Client) UpdateLoadbalancer(dcid string, lbalid string, obj LoadbalancerProperties) (*Loadbalancer, error)
UpdateLoadbalancer updates a load balancer
func (*Client) UpdateNic ¶
func (c *Client) UpdateNic(dcid string, srvid string, nicid string, obj NicProperties) (*Nic, error)
UpdateNic partial update of nic properties
func (*Client) UpdateServer ¶
UpdateServer partial update of server properties passed in as jason []byte Returns Instance struct
func (*Client) UpdateShare ¶
UpdateShare updates a share
func (*Client) UpdateSnapshot ¶
func (c *Client) UpdateSnapshot(snapshotID string, request SnapshotProperties) (*Snapshot, error)
UpdateSnapshot updates a snapshot
func (*Client) UpdateUser ¶
UpdateUser updates user information
func (*Client) UpdateVolume ¶
UpdateVolume updates a volume
func (*Client) WaitTillProvisioned ¶
WaitTillProvisioned helper function
type ContractResources ¶
type ContractResources struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Properties ContractResourcesProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
ContractResources object
type ContractResourcesProperties ¶
type ContractResourcesProperties struct { PBContractNumber string `json:"PB-Contract-Number,omitempty"` Owner string `json:"owner,omitempty"` Status string `json:"status,omitempty"` ResourceLimits *ResourcesLimits `json:"resourceLimits,omitempty"` }
ContractResourcesProperties object
type Datacenter ¶
type Datacenter struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties DatacenterProperties `json:"properties,omitempty"` Entities DatacenterEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` }
Datacenter represents Virtual Data Center
type DatacenterEntities ¶
type DatacenterEntities struct { Servers *Servers `json:"servers,omitempty"` Volumes *Volumes `json:"volumes,omitempty"` Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"` Lans *Lans `json:"lans,omitempty"` }
DatacenterEntities represents Virtual Data Center entities
type DatacenterProperties ¶
type DatacenterProperties struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Location string `json:"location,omitempty"` Version int32 `json:"version,omitempty"` }
DatacenterProperties represents Virtual Data Center properties
type Datacenters ¶
type Datacenters struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Datacenter `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` }
Datacenters is a list of Virtual Data Centers
type Entity ¶
type Entity struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Entity object
type FirewallRule ¶
type FirewallRule struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties FirewallruleProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
FirewallRule object
type FirewallRules ¶
type FirewallRules struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []FirewallRule `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
FirewallRules object
type FirewallruleProperties ¶
type FirewallruleProperties struct { Name string `json:"name,omitempty"` Protocol string `json:"protocol,omitempty"` SourceMac *string `json:"sourceMac,omitempty"` SourceIP *string `json:"sourceIp,omitempty"` TargetIP *string `json:"targetIp,omitempty"` IcmpCode *int `json:"icmpCode,omitempty"` IcmpType *int `json:"icmpType,omitempty"` PortRangeStart *int `json:"portRangeStart,omitempty"` PortRangeEnd *int `json:"portRangeEnd,omitempty"` }
FirewallruleProperties object
type Group ¶
type Group struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Properties GroupProperties `json:"properties,omitempty"` Entities *GroupEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Group object
type GroupEntities ¶
type GroupEntities struct { Users Users `json:"users,omitempty"` Resources Resources `json:"resources,omitempty"` }
GroupEntities object
type GroupProperties ¶
type GroupProperties struct { Name string `json:"name,omitempty"` CreateDataCenter *bool `json:"createDataCenter,omitempty"` CreateSnapshot *bool `json:"createSnapshot,omitempty"` ReserveIP *bool `json:"reserveIp,omitempty"` AccessActivityLog *bool `json:"accessActivityLog,omitempty"` }
GroupProperties object
type Groups ¶
type Groups struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Group `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Groups object
type IPBlock ¶
type IPBlock struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties IPBlockProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
IPBlock object
type IPBlockProperties ¶
type IPBlockProperties struct { Name string `json:"name,omitempty"` IPs []string `json:"ips,omitempty"` Location string `json:"location,omitempty"` Size int `json:"size,omitempty"` }
IPBlockProperties object
type IPBlocks ¶
type IPBlocks struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []IPBlock `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
IPBlocks object
type IPFailover ¶
type IPFailover struct { NicUUID string `json:"nicUuid,omitempty"` IP string `json:"ip,omitempty"` }
IPFailover object
type Image ¶
type Image struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties ImageProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Image object
type ImageProperties ¶
type ImageProperties struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Location string `json:"location,omitempty"` Size float64 `json:"size,omitempty"` CPUHotPlug bool `json:"cpuHotPlug,omitempty"` CPUHotUnplug bool `json:"cpuHotUnplug,omitempty"` RAMHotPlug bool `json:"ramHotPlug,omitempty"` RAMHotUnplug bool `json:"ramHotUnplug,omitempty"` NicHotPlug bool `json:"nicHotPlug,omitempty"` NicHotUnplug bool `json:"nicHotUnplug,omitempty"` DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"` DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"` DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"` DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"` LicenceType string `json:"licenceType,omitempty"` ImageType string `json:"imageType,omitempty"` Public bool `json:"public,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
ImageProperties object
type Images ¶
type Images struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Image `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Images object
type Lan ¶
type Lan struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties LanProperties `json:"properties,omitempty"` Entities *LanEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Lan object
type LanEntities ¶
type LanEntities struct {
Nics *LanNics `json:"nics,omitempty"`
}
LanEntities object
type LanNics ¶
type LanNics struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Nic `json:"items,omitempty"` }
LanNics object
type LanProperties ¶
type LanProperties struct { Name string `json:"name,omitempty"` Public bool `json:"public,omitempty"` IPFailover *[]IPFailover `json:"ipFailover,omitempty"` }
LanProperties object
type Lans ¶
type Lans struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Lan `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Lans object
type Loadbalancer ¶
type Loadbalancer struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties LoadbalancerProperties `json:"properties,omitempty"` Entities LoadbalancerEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Loadbalancer object
type LoadbalancerEntities ¶
type LoadbalancerEntities struct {
Balancednics *BalancedNics `json:"balancednics,omitempty"`
}
LoadbalancerEntities object
type LoadbalancerProperties ¶
type LoadbalancerProperties struct { Name string `json:"name,omitempty"` IP string `json:"ip,omitempty"` Dhcp bool `json:"dhcp,omitempty"` }
LoadbalancerProperties object
type Loadbalancers ¶
type Loadbalancers struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Loadbalancer `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Loadbalancers object
type Location ¶
type Location struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata Metadata `json:"metadata,omitempty"` Properties LocationProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Location object
type LocationProperties ¶
type LocationProperties struct { Name string `json:"name,omitempty"` Features []string `json:"features,omitempty"` ImageAliases []string `json:"imageAliases,omitempty"` }
LocationProperties object
type Locations ¶
type Locations struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Location `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Locations object
type Metadata ¶
type Metadata struct { CreatedDate time.Time `json:"createdDate,omitempty"` CreatedBy string `json:"createdBy,omitempty"` Etag string `json:"etag,omitempty"` LastModifiedDate time.Time `json:"lastModifiedDate,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` State string `json:"state,omitempty"` }
Metadata represents metadata recieved from Cloud API
type Nic ¶
type Nic struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties *NicProperties `json:"properties,omitempty"` Entities *NicEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Nic object
type NicEntities ¶
type NicEntities struct {
FirewallRules *FirewallRules `json:"firewallrules,omitempty"`
}
NicEntities object
type NicProperties ¶
type NicProperties struct { Name string `json:"name,omitempty"` Mac string `json:"mac,omitempty"` Ips []string `json:"ips,omitempty"` Dhcp *bool `json:"dhcp,omitempty"` Lan int `json:"lan,omitempty"` FirewallActive bool `json:"firewallActive,omitempty"` Nat bool `json:"nat,omitempty"` }
NicProperties object
type Nics ¶
type Nics struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Nic `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Nics object
type Owns ¶
type Owns struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Entity `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Owns object
type Request ¶
type Request struct { ID string `json:"id"` Type string `json:"type"` Href string `json:"href"` Metadata struct { CreatedDate time.Time `json:"createdDate"` CreatedBy string `json:"createdBy"` Etag string `json:"etag"` RequestStatus struct { ID string `json:"id"` Type string `json:"type"` Href string `json:"href"` } `json:"requestStatus"` } `json:"metadata"` Properties struct { Method string `json:"method"` Headers interface{} `json:"headers"` Body interface{} `json:"body"` URL string `json:"url"` } `json:"properties"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Request object
type RequestStatus ¶
type RequestStatus struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata RequestStatusMetadata `json:"metadata,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
RequestStatus object
type RequestStatusMetadata ¶
type RequestStatusMetadata struct { Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` Etag string `json:"etag,omitempty"` Targets []RequestTarget `json:"targets,omitempty"` }
RequestStatusMetadata object
type RequestTarget ¶
type RequestTarget struct { Target ResourceReference `json:"target,omitempty"` Status string `json:"status,omitempty"` }
RequestTarget object
type Requests ¶
type Requests struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Request `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Requests object
type Resource ¶
type Resource struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Entities *ResourceEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Resource object
type ResourceEntities ¶
type ResourceEntities struct {
Groups Groups `json:"groups,omitempty"`
}
ResourceEntities object
type ResourceReference ¶
type ResourceReference struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` }
ResourceReference object
type Resources ¶
type Resources struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Resource `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Resources object
type ResourcesLimits ¶
type ResourcesLimits struct { CoresPerServer int32 `json:"coresPerServer,omitempty"` CoresPerContract int32 `json:"coresPerContract,omitempty"` CoresProvisioned int32 `json:"coresProvisioned,omitempty"` RAMPerServer int32 `json:"ramPerServer,omitempty"` RAMPerContract int32 `json:"ramPerContract,omitempty"` RAMProvisioned int32 `json:"ramProvisioned,omitempty"` HddLimitPerVolume int64 `json:"hddLimitPerVolume,omitempty"` HddLimitPerContract int64 `json:"hddLimitPerContract,omitempty"` HddVolumeProvisioned int64 `json:"hddVolumeProvisioned,omitempty"` SsdLimitPerVolume int64 `json:"ssdLimitPerVolume,omitempty"` SsdLimitPerContract int64 `json:"ssdLimitPerContract,omitempty"` SsdVolumeProvisioned int64 `json:"ssdVolumeProvisioned,omitempty"` ReservableIps int32 `json:"reservableIps,omitempty"` ReservedIpsOnContract int32 `json:"reservedIpsOnContract,omitempty"` ReservedIpsInUse int32 `json:"reservedIpsInUse,omitempty"` }
ResourcesLimits object
type Resp ¶
Resp is the struct returned by all Rest request functions
func (*Resp) PrintHeaders ¶
func (r *Resp) PrintHeaders()
PrintHeaders prints the http headers as k,v pairs
type Server ¶
type Server struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties ServerProperties `json:"properties,omitempty"` Entities *ServerEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Server object
type ServerEntities ¶
type ServerEntities struct { Cdroms *Cdroms `json:"cdroms,omitempty"` Volumes *Volumes `json:"volumes,omitempty"` Nics *Nics `json:"nics,omitempty"` }
ServerEntities object
type ServerProperties ¶
type ServerProperties struct { Name string `json:"name,omitempty"` Cores int `json:"cores,omitempty"` RAM int `json:"ram,omitempty"` AvailabilityZone string `json:"availabilityZone,omitempty"` VMState string `json:"vmState,omitempty"` BootCdrom *ResourceReference `json:"bootCdrom,omitempty"` BootVolume *ResourceReference `json:"bootVolume,omitempty"` CPUFamily string `json:"cpuFamily,omitempty"` }
ServerProperties object
type Servers ¶
type Servers struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Server `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Servers collection
type Snapshot ¶
type Snapshot struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata Metadata `json:"metadata,omitempty"` Properties SnapshotProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Snapshot object
type SnapshotProperties ¶
type SnapshotProperties struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Location string `json:"location,omitempty"` Size int `json:"size,omitempty"` CPUHotPlug bool `json:"cpuHotPlug,omitempty"` CPUHotUnplug bool `json:"cpuHotUnplug,omitempty"` RAMHotPlug bool `json:"ramHotPlug,omitempty"` RAMHotUnplug bool `json:"ramHotUnplug,omitempty"` NicHotPlug bool `json:"nicHotPlug,omitempty"` NicHotUnplug bool `json:"nicHotUnplug,omitempty"` DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"` DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"` DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"` DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"` LicenceType string `json:"licenceType,omitempty"` }
SnapshotProperties properties
type Snapshots ¶
type Snapshots struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Snapshot `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Snapshots object
type User ¶
type User struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties *UserProperties `json:"properties,omitempty"` Entities *UserEntities `json:"entities,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
User object
type UserEntities ¶
type UserEntities struct { Groups Groups `json:"groups,omitempty"` Owns Owns `json:"owns,omitempty"` }
UserEntities object
type UserProperties ¶
type UserProperties struct { Firstname string `json:"firstname,omitempty"` Lastname string `json:"lastname,omitempty"` Email string `json:"email,omitempty"` Password string `json:"password,omitempty"` Administrator bool `json:"administrator,omitempty"` ForceSecAuth bool `json:"forceSecAuth,omitempty"` SecAuthActive bool `json:"secAuthActive,omitempty"` }
UserProperties object
type Users ¶
type Users struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []User `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Users object
type Volume ¶
type Volume struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Properties VolumeProperties `json:"properties,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Volume object
type VolumeProperties ¶
type VolumeProperties struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Size int `json:"size,omitempty"` AvailabilityZone string `json:"availabilityZone,omitempty"` Image string `json:"image,omitempty"` ImageAlias string `json:"imageAlias,omitempty"` ImagePassword string `json:"imagePassword,omitempty"` SSHKeys []string `json:"sshKeys,omitempty"` Bus string `json:"bus,omitempty"` LicenceType string `json:"licenceType,omitempty"` CPUHotPlug bool `json:"cpuHotPlug,omitempty"` CPUHotUnplug bool `json:"cpuHotUnplug,omitempty"` RAMHotPlug bool `json:"ramHotPlug,omitempty"` RAMHotUnplug bool `json:"ramHotUnplug,omitempty"` NicHotPlug bool `json:"nicHotPlug,omitempty"` NicHotUnplug bool `json:"nicHotUnplug,omitempty"` DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"` DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"` DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"` DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"` DeviceNumber int64 `json:"deviceNumber,omitempty"` }
VolumeProperties object
type Volumes ¶
type Volumes struct { ID string `json:"id,omitempty"` PBType string `json:"type,omitempty"` Href string `json:"href,omitempty"` Items []Volume `json:"items,omitempty"` Response string `json:"Response,omitempty"` Headers *http.Header `json:"headers,omitempty"` StatusCode int `json:"statuscode,omitempty"` }
Volumes object