Documentation
¶
Index ¶
- Constants
- type AttachedElasticIPService
- func (a AttachedElasticIPService) Attach(ctx context.Context, body ElasticIPAttach) (elasticIP ElasticIP, err error)
- func (a AttachedElasticIPService) Detach(ctx context.Context, id int) (err error)
- func (a AttachedElasticIPService) List(ctx context.Context, cursor goclient.Cursor) (list ElasticIPList, err error)
- type AttachedNetworkInterface
- type Device
- type DeviceAction
- type DeviceActionService
- type DeviceCreate
- type DeviceList
- type DeviceOperatingSystem
- type DeviceRunAction
- type DeviceRunWorkflow
- type DeviceService
- func (d DeviceService) Create(ctx context.Context, body DeviceCreate) (order common.Ordering, err error)
- func (d DeviceService) Delete(ctx context.Context, id int) (err error)
- func (d DeviceService) Get(ctx context.Context, id int) (device Device, err error)
- func (d DeviceService) GetVNC(ctx context.Context, id int) (vnc DeviceVNCConnection, err error)
- func (d DeviceService) List(ctx context.Context, cursor goclient.Cursor) (list DeviceList, err error)
- func (d DeviceService) Update(ctx context.Context, id int, body DeviceUpdate) (device Device, err error)
- type DeviceStatus
- type DeviceUpdate
- type DeviceVNCConnection
- type DeviceWorkflow
- type DeviceWorkflowList
- type DeviceWorkflowService
- type ElasticIP
- type ElasticIPAttach
- type ElasticIPAttachment
- type ElasticIPCreate
- type ElasticIPList
- type ElasticIPService
- type Network
- type NetworkCreate
- type NetworkInterface
- type NetworkInterfaceList
- type NetworkInterfaceSecurityGroupUpdate
- type NetworkInterfaceService
- type NetworkList
- type NetworkService
- func (n NetworkService) Create(ctx context.Context, body NetworkCreate) (network Network, err error)
- func (n NetworkService) Delete(ctx context.Context, id int) (err error)
- func (n NetworkService) Get(ctx context.Context, id int) (network Network, err error)
- func (n NetworkService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkList, err error)
- func (n NetworkService) Update(ctx context.Context, id int, body NetworkUpdate) (network Network, err error)
- type NetworkUpdate
- type Router
- type RouterInterface
- type RouterInterfaceList
- type RouterInterfaceService
- type RouterList
- type RouterService
- func (r RouterService) Get(ctx context.Context, id int) (router Router, err error)
- func (r RouterService) List(ctx context.Context, cursor goclient.Cursor) (list RouterList, err error)
- func (r RouterService) RouterInterfaces(routerID int) RouterInterfaceService
- func (r RouterService) Update(ctx context.Context, id int, body RouterUpdate) (router Router, err error)
- type RouterUpdate
- type SecurityGroup
- type SecurityGroupCreate
- type SecurityGroupList
- type SecurityGroupRule
- type SecurityGroupRuleList
- type SecurityGroupRuleOptions
- type SecurityGroupRuleService
- func (s SecurityGroupRuleService) Create(ctx context.Context, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
- func (s SecurityGroupRuleService) Delete(ctx context.Context, id int) (err error)
- func (s SecurityGroupRuleService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupRuleList, err error)
- func (s SecurityGroupRuleService) Update(ctx context.Context, id int, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
- type SecurityGroupService
- func (s SecurityGroupService) Create(ctx context.Context, body SecurityGroupCreate) (securityGroup SecurityGroup, err error)
- func (s SecurityGroupService) Delete(ctx context.Context, id int) (err error)
- func (s SecurityGroupService) Get(ctx context.Context, id int) (securityGroup SecurityGroup, err error)
- func (s SecurityGroupService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupList, err error)
- func (s SecurityGroupService) Rules(securityGroupID int) SecurityGroupRuleService
- func (s SecurityGroupService) Update(ctx context.Context, id int, body SecurityGroupUpdate) (securityGroup SecurityGroup, err error)
- type SecurityGroupUpdate
Constants ¶
View Source
const ( DirectionIngress = "ingress" DirectionEgress = "egress" ProtocolAny = -1 ProtocolICMP = 1 ProtocolTCP = 6 ProtocolUDP = 17 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachedElasticIPService ¶ added in v0.2.0
type AttachedElasticIPService struct {
// contains filtered or unexported fields
}
func NewAttachedElasticIPService ¶ added in v0.2.0
func NewAttachedElasticIPService(client goclient.Client, deviceID int) AttachedElasticIPService
func (AttachedElasticIPService) Attach ¶ added in v0.2.0
func (a AttachedElasticIPService) Attach(ctx context.Context, body ElasticIPAttach) (elasticIP ElasticIP, err error)
func (AttachedElasticIPService) Detach ¶ added in v0.2.0
func (a AttachedElasticIPService) Detach(ctx context.Context, id int) (err error)
func (AttachedElasticIPService) List ¶ added in v0.2.0
func (a AttachedElasticIPService) List(ctx context.Context, cursor goclient.Cursor) (list ElasticIPList, err error)
type Device ¶
type Device struct {
ID int `json:"id"`
Name string `json:"name"`
Location common.Location `json:"location"`
Product common.Product `json:"product"`
Status DeviceStatus `json:"status"`
OperatingSystem DeviceOperatingSystem `json:"operating_system"`
Network Network `json:"network"`
Hostname string `json:"hostname"`
NetworkInterfaces []AttachedNetworkInterface `json:"network_interfaces"`
Price float64 `json:"price"`
MetalControl string `json:"metal_control"`
MetalControlTools string `json:"metal_control_tools"`
}
type DeviceAction ¶
type DeviceActionService ¶ added in v0.2.0
type DeviceActionService struct {
// contains filtered or unexported fields
}
func NewDeviceActionService ¶ added in v0.2.0
func NewDeviceActionService(client goclient.Client, deviceID int) DeviceActionService
func (DeviceActionService) Run ¶ added in v0.2.0
func (d DeviceActionService) Run(ctx context.Context, body DeviceRunAction) (device Device, err error)
type DeviceCreate ¶
type DeviceList ¶
type DeviceList struct {
Items []Device
Pagination goclient.Pagination
}
type DeviceOperatingSystem ¶
type DeviceRunAction ¶ added in v0.2.0
type DeviceRunAction struct {
Action string `json:"action"`
}
type DeviceRunWorkflow ¶ added in v0.2.0
type DeviceRunWorkflow struct {
Workflow string `json:"workflow"`
}
type DeviceService ¶
type DeviceService struct {
// contains filtered or unexported fields
}
func NewDeviceService ¶
func NewDeviceService(client goclient.Client) DeviceService
func (DeviceService) Create ¶
func (d DeviceService) Create(ctx context.Context, body DeviceCreate) (order common.Ordering, err error)
func (DeviceService) Delete ¶
func (d DeviceService) Delete(ctx context.Context, id int) (err error)
func (DeviceService) GetVNC ¶ added in v0.2.0
func (d DeviceService) GetVNC(ctx context.Context, id int) (vnc DeviceVNCConnection, err error)
func (DeviceService) List ¶
func (d DeviceService) List(ctx context.Context, cursor goclient.Cursor) (list DeviceList, err error)
func (DeviceService) Update ¶
func (d DeviceService) Update(ctx context.Context, id int, body DeviceUpdate) (device Device, err error)
type DeviceStatus ¶
type DeviceStatus struct {
ID int `json:"id"`
Name string `json:"name"`
Key string `json:"key"`
Actions []DeviceAction `json:"actions"`
}
type DeviceUpdate ¶
type DeviceUpdate struct {
Name string `json:"name,omitempty"`
}
type DeviceVNCConnection ¶ added in v0.2.0
type DeviceVNCConnection struct {
Ref string `json:"ref"`
}
type DeviceWorkflow ¶ added in v0.2.0
type DeviceWorkflowList ¶ added in v0.2.0
type DeviceWorkflowList struct {
Items []DeviceWorkflow
Pagination goclient.Pagination
}
type DeviceWorkflowService ¶ added in v0.2.0
type DeviceWorkflowService struct {
// contains filtered or unexported fields
}
func NewDeviceWorkflowService ¶ added in v0.2.0
func NewDeviceWorkflowService(client goclient.Client, deviceID int) DeviceWorkflowService
func (DeviceWorkflowService) List ¶ added in v0.2.0
func (d DeviceWorkflowService) List(ctx context.Context, cursor goclient.Cursor) (list DeviceWorkflowList, err error)
func (DeviceWorkflowService) Run ¶ added in v0.2.0
func (d DeviceWorkflowService) Run(ctx context.Context, body DeviceRunWorkflow) (device Device, err error)
type ElasticIP ¶
type ElasticIP struct {
ID int `json:"id"`
Product common.BriefProduct `json:"product"`
Location common.Location `json:"location"`
Price float64 `json:"price"`
PublicIP string `json:"public_ip"`
PrivateIP string `json:"private_ip"`
Attachment ElasticIPAttachment `json:"attached_device"`
}
type ElasticIPAttach ¶ added in v0.2.0
type ElasticIPAttachment ¶
type ElasticIPCreate ¶
type ElasticIPCreate struct {
LocationID int `json:"location_id,omitempty"`
}
type ElasticIPList ¶
type ElasticIPList struct {
Items []ElasticIP
Pagination goclient.Pagination
}
type ElasticIPService ¶
type ElasticIPService struct {
// contains filtered or unexported fields
}
func NewElasticIPService ¶
func NewElasticIPService(client goclient.Client) ElasticIPService
func (ElasticIPService) Create ¶
func (e ElasticIPService) Create(ctx context.Context, body ElasticIPCreate) (elasticIP ElasticIP, err error)
func (ElasticIPService) Delete ¶
func (e ElasticIPService) Delete(ctx context.Context, id int) (err error)
func (ElasticIPService) List ¶
func (e ElasticIPService) List(ctx context.Context, cursor goclient.Cursor) (list ElasticIPList, err error)
type Network ¶
type Network struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Subnet string `json:"cidr"`
Location common.Location `json:"location"`
DomainName string `json:"domain_name"`
DomainNameServers []string `json:"domain_name_servers"`
AllocationPoolStart string `json:"allocation_pool_start"`
AllocationPoolEnd string `json:"allocation_pool_end"`
GatewayIP string `json:"gateway_ip"`
UsedIPs int `json:"used_ips"`
TotalIPs int `json:"total_ips"`
}
type NetworkCreate ¶
type NetworkInterface ¶
type NetworkInterfaceList ¶
type NetworkInterfaceList struct {
Items []NetworkInterface
Pagination goclient.Pagination
}
type NetworkInterfaceSecurityGroupUpdate ¶
type NetworkInterfaceSecurityGroupUpdate struct {
SecurityGroupID int `json:"security_group_id"`
}
type NetworkInterfaceService ¶
type NetworkInterfaceService struct {
// contains filtered or unexported fields
}
func NewNetworkInterfaceService ¶
func NewNetworkInterfaceService(client goclient.Client, deviceID int) NetworkInterfaceService
func (NetworkInterfaceService) List ¶
func (n NetworkInterfaceService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkInterfaceList, err error)
func (NetworkInterfaceService) UpdateSecurityGroup ¶
func (n NetworkInterfaceService) UpdateSecurityGroup(ctx context.Context, id int, body NetworkInterfaceSecurityGroupUpdate) (networkInterface NetworkInterface, err error)
type NetworkList ¶
type NetworkList struct {
Items []Network
Pagination goclient.Pagination
}
type NetworkService ¶
type NetworkService struct {
// contains filtered or unexported fields
}
func NewNetworkService ¶
func NewNetworkService(client goclient.Client) NetworkService
func (NetworkService) Create ¶
func (n NetworkService) Create(ctx context.Context, body NetworkCreate) (network Network, err error)
func (NetworkService) Delete ¶
func (n NetworkService) Delete(ctx context.Context, id int) (err error)
func (NetworkService) List ¶
func (n NetworkService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkList, err error)
func (NetworkService) Update ¶
func (n NetworkService) Update(ctx context.Context, id int, body NetworkUpdate) (network Network, err error)
type NetworkUpdate ¶
type RouterInterface ¶
type RouterInterfaceList ¶
type RouterInterfaceList struct {
Items []RouterInterface
Pagination goclient.Pagination
}
type RouterInterfaceService ¶
type RouterInterfaceService struct {
// contains filtered or unexported fields
}
func NewRouterInterfaceService ¶
func NewRouterInterfaceService(client goclient.Client, routerID int) RouterInterfaceService
func (RouterInterfaceService) List ¶
func (r RouterInterfaceService) List(ctx context.Context, cursor goclient.Cursor) (list RouterInterfaceList, err error)
type RouterList ¶
type RouterList struct {
Items []Router
Pagination goclient.Pagination
}
type RouterService ¶
type RouterService struct {
// contains filtered or unexported fields
}
func NewRouterService ¶
func NewRouterService(client goclient.Client) RouterService
func (RouterService) List ¶
func (r RouterService) List(ctx context.Context, cursor goclient.Cursor) (list RouterList, err error)
func (RouterService) RouterInterfaces ¶
func (r RouterService) RouterInterfaces(routerID int) RouterInterfaceService
func (RouterService) Update ¶
func (r RouterService) Update(ctx context.Context, id int, body RouterUpdate) (router Router, err error)
type RouterUpdate ¶
type SecurityGroup ¶
type SecurityGroupCreate ¶
type SecurityGroupList ¶
type SecurityGroupList struct {
Items []SecurityGroup
Pagination goclient.Pagination
}
type SecurityGroupRule ¶
type SecurityGroupRuleList ¶
type SecurityGroupRuleList struct {
Items []SecurityGroupRule
Pagination goclient.Pagination
}
type SecurityGroupRuleOptions ¶
type SecurityGroupRuleOptions struct {
Direction string `json:"direction,omitempty"`
Protocol int `json:"protocol,omitempty"`
FromPort int `json:"from_port,omitempty"`
ToPort int `json:"to_port,omitempty"`
ICMPType int `json:"icmp_type,omitempty"`
ICMPCode int `json:"icmp_code,omitempty"`
IPRange string `json:"ip_range,omitempty"`
}
type SecurityGroupRuleService ¶
type SecurityGroupRuleService struct {
// contains filtered or unexported fields
}
func NewSecurityGroupRuleService ¶
func NewSecurityGroupRuleService(client goclient.Client, securityGroupID int) SecurityGroupRuleService
func (SecurityGroupRuleService) Create ¶
func (s SecurityGroupRuleService) Create(ctx context.Context, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
func (SecurityGroupRuleService) Delete ¶
func (s SecurityGroupRuleService) Delete(ctx context.Context, id int) (err error)
func (SecurityGroupRuleService) List ¶
func (s SecurityGroupRuleService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupRuleList, err error)
func (SecurityGroupRuleService) Update ¶
func (s SecurityGroupRuleService) Update(ctx context.Context, id int, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
type SecurityGroupService ¶
type SecurityGroupService struct {
// contains filtered or unexported fields
}
func NewSecurityGroupService ¶
func NewSecurityGroupService(client goclient.Client) SecurityGroupService
func (SecurityGroupService) Create ¶
func (s SecurityGroupService) Create(ctx context.Context, body SecurityGroupCreate) (securityGroup SecurityGroup, err error)
func (SecurityGroupService) Delete ¶
func (s SecurityGroupService) Delete(ctx context.Context, id int) (err error)
func (SecurityGroupService) Get ¶ added in v0.2.5
func (s SecurityGroupService) Get(ctx context.Context, id int) (securityGroup SecurityGroup, err error)
func (SecurityGroupService) List ¶
func (s SecurityGroupService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupList, err error)
func (SecurityGroupService) Rules ¶
func (s SecurityGroupService) Rules(securityGroupID int) SecurityGroupRuleService
func (SecurityGroupService) Update ¶
func (s SecurityGroupService) Update(ctx context.Context, id int, body SecurityGroupUpdate) (securityGroup SecurityGroup, err error)
type SecurityGroupUpdate ¶
Click to show internal directories.
Click to hide internal directories.