network_based_device_single

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package network_based_device_single contains single device functionality on security.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSingleDevicesInto

func ExtractSingleDevicesInto(r pagination.Page, v interface{}) error

ExtractSingleDevicesInto interprets the results of a single page from a List() call, producing a slice of Device entities.

func List

func List(client *eclcloud.ServiceClient, deviceType string, 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   [1]GtHostInCreate `json:"gt_host" required:"true"`
}

CreateOpts represents parameters used to create a device.

func (CreateOpts) ToSingleDeviceCreateMap

func (opts CreateOpts) ToSingleDeviceCreateMap() (map[string]interface{}, error)

ToSingleDeviceCreateMap formats a CreateOpts into a create request.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToSingleDeviceCreateMap() (map[string]interface{}, error)
}

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 Single Device.

func Create

func Create(client *eclcloud.ServiceClient, deviceType string, opts CreateOptsBuilder) (r CreateResult)

Create creates a new device.

func (CreateResult) Extract

func (r CreateResult) Extract() (*SingleDeviceOrder, error)

Extract is a function that accepts a result and extracts a Single Device resource.

func (CreateResult) ExtractInto

func (r CreateResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a Single Device if possible.

type DeleteOpts

type DeleteOpts struct {
	SOKind   string            `json:"sokind" required:"true"`
	TenantID string            `json:"tenant_id" required:"true"`
	GtHost   [1]GtHostInDelete `json:"gt_host" required:"true"`
}

DeleteOpts represents parameters used to delete a device.

func (DeleteOpts) ToSingleDeviceDeleteMap

func (opts DeleteOpts) ToSingleDeviceDeleteMap() (map[string]interface{}, error)

ToSingleDeviceDeleteMap formats a DeleteOpts into a delete request.

type DeleteOptsBuilder

type DeleteOptsBuilder interface {
	ToSingleDeviceDeleteMap() (map[string]interface{}, error)
}

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() (*SingleDeviceOrder, error)

Extract is a function that accepts a result and extracts a Single Device resource.

func (DeleteResult) ExtractInto

func (r DeleteResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a Single 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 Single Device.

func (GetResult) Extract

func (r GetResult) Extract() (*SingleDeviceOrder, error)

Extract is a function that accepts a result and extracts a Single Device resource.

func (GetResult) ExtractInto

func (r GetResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a Single 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"`
}

GtHostInCreate represents parameters used to create a Single Device.

type GtHostInDelete

type GtHostInDelete struct {
	HostName string `json:"hostname" required:"true"`
}

GtHostInDelete represents parameters used to delete a Single 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 Single Device.

type ListOpts

type ListOpts struct {
	TenantID string `q:"tenant_id"`
	Locale   string `q:"locale"`
}

ListOpts enables filtering of a list request.

func (ListOpts) ToSingleDeviceQuery

func (opts ListOpts) ToSingleDeviceQuery() (string, error)

ToSingleDeviceQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToSingleDeviceQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request

type SingleDevice

type SingleDevice struct {
	ID   int      `json:"id"`
	Cell []string `json:"cell"`
}

SingleDevice represents the result of a each element in response of single device api result.

func ExtractSingleDevices

func ExtractSingleDevices(r pagination.Page) ([]SingleDevice, error)

ExtractSingleDevices accepts a Page struct, specifically a SingleDevicePage struct, and extracts the elements into a slice of Single Device structs. In other words, a generic collection is mapped into a relevant slice.

type SingleDeviceOrder

type SingleDeviceOrder struct {
	ID      string `json:"soId"`
	Code    string `json:"code"`
	Message string `json:"message"`
	Status  int    `json:"status"`
}

SingleDeviceOrder represents a Single Device's each order.

type SingleDevicePage

type SingleDevicePage struct {
	pagination.LinkedPageBase
}

SingleDevicePage is the page returned by a pager when traversing over a collection of Single Device.

func (SingleDevicePage) IsEmpty

func (r SingleDevicePage) IsEmpty() (bool, error)

IsEmpty checks whether a SingleDevicePage struct is empty.

func (SingleDevicePage) NextPageURL

func (r SingleDevicePage) NextPageURL() (string, error)

NextPageURL is invoked when a paginated collection of Single 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 UpdateOpts

type UpdateOpts struct {
	SOKind   string            `json:"sokind" required:"true"`
	Locale   string            `json:"locale,omitempty"`
	TenantID string            `json:"tenant_id" required:"true"`
	GtHost   [1]GtHostInUpdate `json:"gt_host" required:"true"`
}

UpdateOpts represents parameters to update a Single Device.

func (UpdateOpts) ToSingleDeviceUpdateMap

func (opts UpdateOpts) ToSingleDeviceUpdateMap() (map[string]interface{}, error)

ToSingleDeviceUpdateMap formats a UpdateOpts into an update request.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToSingleDeviceUpdateMap() (map[string]interface{}, error)
}

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 Single Device.

func Update

func Update(client *eclcloud.ServiceClient, deviceType string, opts UpdateOptsBuilder) (r UpdateResult)

Update modifies the attributes of a device.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*SingleDeviceOrder, error)

Extract is a function that accepts a result and extracts a Single Device resource.

func (UpdateResult) ExtractInto

func (r UpdateResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a Single Device if possible.

Directories

Path Synopsis
Package testing contains network based security single device unittests
Package testing contains network based security single device unittests

Jump to

Keyboard shortcuts

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