Documentation ¶
Overview ¶
Package network_based_device_ha contains HA device functionality on security.
Index ¶
- func ExtractHADevicesInto(r pagination.Page, v interface{}) error
- func List(client *eclcloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteOpts
- type DeleteOptsBuilder
- type DeleteResult
- type GetResult
- type GtHostInCreate
- type GtHostInDelete
- type GtHostInUpdate
- type HADevice
- type HADeviceOrder
- type HADevicePage
- type ListOpts
- type ListOptsBuilder
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractHADevicesInto ¶
func ExtractHADevicesInto(r pagination.Page, v interface{}) error
ExtractHADevicesInto interprets the results of a single page from a List() call, producing a slice of Device entities.
func List ¶
func List(client *eclcloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List enumerates the Devices to which the current token has access.
Types ¶
type CreateOpts ¶
type CreateOpts struct { SOKind string `json:"sokind" required:"true"` TenantID string `json:"tenant_id" required:"true"` Locale string `json:"locale,omitempty"` GtHost [2]GtHostInCreate `json:"gt_host" required:"true"` }
CreateOpts represents parameters used to create a device.
func (CreateOpts) ToHADeviceCreateMap ¶
func (opts CreateOpts) ToHADeviceCreateMap() (map[string]interface{}, error)
ToHADeviceCreateMap formats a CreateOpts into a create request.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a HA Device.
func Create ¶
func Create(client *eclcloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create creates a new device.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*HADeviceOrder, error)
Extract is a function that accepts a result and extracts a HA Device resource.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
Extract interprets any commonResult as a HA Device if possible.
type DeleteOpts ¶
type DeleteOpts struct { SOKind string `json:"sokind" required:"true"` TenantID string `json:"tenant_id" required:"true"` GtHost [2]GtHostInDelete `json:"gt_host" required:"true"` }
DeleteOpts represents parameters used to delete a device.
func (DeleteOpts) ToHADeviceDeleteMap ¶
func (opts DeleteOpts) ToHADeviceDeleteMap() (map[string]interface{}, error)
ToHADeviceDeleteMap formats a DeleteOpts into a delete request.
type DeleteOptsBuilder ¶
DeleteOptsBuilder allows extensions to add additional parameters to the Delete request.
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *eclcloud.ServiceClient, deviceType string, opts DeleteOptsBuilder) (r DeleteResult)
Delete deletes a device.
func (DeleteResult) Extract ¶
func (r DeleteResult) Extract() (*HADeviceOrder, error)
Extract is a function that accepts a result and extracts a HA Device resource.
func (DeleteResult) ExtractInto ¶
func (r DeleteResult) ExtractInto(v interface{}) error
Extract interprets any commonResult as a HA Device if possible.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a HA Device.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*HADeviceOrder, error)
Extract is a function that accepts a result and extracts a HA Device resource.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
Extract interprets any commonResult as a HA Device if possible.
type GtHostInCreate ¶
type GtHostInCreate struct { OperatingMode string `json:"operatingmode" required:"true"` LicenseKind string `json:"licensekind" required:"true"` AZGroup string `json:"azgroup" required:"true"` HALink1NetworkID string `json:"halink1networkid" required:"true"` HALink1SubnetID string `json:"halink1subnetid" required:"true"` HALink1IPAddress string `json:"halink1ipaddress" required:"true"` HALink2NetworkID string `json:"halink2networkid" required:"true"` HALink2SubnetID string `json:"halink2subnetid" required:"true"` HALink2IPAddress string `json:"halink2ipaddress" required:"true"` }
GtHostInCreate represents parameters used to create a HA Device.
type GtHostInDelete ¶
type GtHostInDelete struct {
HostName string `json:"hostname" required:"true"`
}
GtHostInDelete represents parameters used to delete a HA Device.
type GtHostInUpdate ¶
type GtHostInUpdate struct { OperatingMode string `json:"operatingmode" required:"true"` LicenseKind string `json:"licensekind" required:"true"` HostName string `json:"hostname" required:"true"` }
GtHostInUpdate represents parameters used to update a HA Device.
type HADevice ¶
HADevice represents the result of a each element in response of HA Device api result.
func ExtractHADevices ¶
func ExtractHADevices(r pagination.Page) ([]HADevice, error)
ExtractHADevices accepts a Page struct, specifically a HADevicePage struct, and extracts the elements into a slice of HA Device structs. In other words, a generic collection is mapped into a relevant slice.
type HADeviceOrder ¶
type HADeviceOrder struct { ID string `json:"soId"` Code string `json:"code"` Message string `json:"message"` Status int `json:"status"` }
HADeviceOrder represents a HA Device's each order.
type HADevicePage ¶
type HADevicePage struct {
pagination.LinkedPageBase
}
HADevicePage is the page returned by a pager when traversing over a collection of HA Device.
func (HADevicePage) IsEmpty ¶
func (r HADevicePage) IsEmpty() (bool, error)
IsEmpty checks whether a HADevicePage struct is empty.
func (HADevicePage) NextPageURL ¶
func (r HADevicePage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of HA Device has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type ListOpts ¶
ListOpts enables filtering of a list request.
func (ListOpts) ToHADeviceQuery ¶
ToHADeviceQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request
type UpdateOpts ¶
type UpdateOpts struct { SOKind string `json:"sokind" required:"true"` Locale string `json:"locale,omitempty"` TenantID string `json:"tenant_id" required:"true"` GtHost [2]GtHostInUpdate `json:"gt_host" required:"true"` }
UpdateOpts represents parameters to update a HA Device.
func (UpdateOpts) ToHADeviceUpdateMap ¶
func (opts UpdateOpts) ToHADeviceUpdateMap() (map[string]interface{}, error)
ToHADeviceUpdateMap formats a UpdateOpts into an update request.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a HA Device.
func Update ¶
func Update(client *eclcloud.ServiceClient, opts UpdateOptsBuilder) (r UpdateResult)
Update modifies the attributes of a device.
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*HADeviceOrder, error)
Extract is a function that accepts a result and extracts a HA Device resource.
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error
Extract interprets any commonResult as a HA Device if possible.