Documentation
¶
Index ¶
Constants ¶
const RegionNameApSeo1 = shared.RegionNameApSeo1
This is an alias to an internal value.
const RegionNameApSin1 = shared.RegionNameApSin1
This is an alias to an internal value.
const RegionNameApTyo1 = shared.RegionNameApTyo1
This is an alias to an internal value.
const RegionNameEuAms1 = shared.RegionNameEuAms1
This is an alias to an internal value.
const RegionNameEuFrk1 = shared.RegionNameEuFrk1
This is an alias to an internal value.
const RegionNameEuLon1 = shared.RegionNameEuLon1
This is an alias to an internal value.
const RegionNameUsChi1 = shared.RegionNameUsChi1
This is an alias to an internal value.
const RegionNameUsSea1 = shared.RegionNameUsSea1
This is an alias to an internal value.
const RegionNameUsSva1 = shared.RegionNameUsSva1
This is an alias to an internal value.
const RegionNameUsWdc1 = shared.RegionNameUsWdc1
This is an alias to an internal value.
const ResourceStatusCreating = shared.ResourceStatusCreating
This is an alias to an internal value.
const ResourceStatusDeleted = shared.ResourceStatusDeleted
This is an alias to an internal value.
const ResourceStatusDeleting = shared.ResourceStatusDeleting
This is an alias to an internal value.
const ResourceStatusError = shared.ResourceStatusError
This is an alias to an internal value.
const ResourceStatusPending = shared.ResourceStatusPending
This is an alias to an internal value.
const ResourceStatusReady = shared.ResourceStatusReady
This is an alias to an internal value.
const ResourceStatusUpdating = shared.ResourceStatusUpdating
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct {
// Unique identifier for the operation.
ID string `json:"id,required"`
// When the operation was created.
CreatedAt string `json:"created_at,required"`
// Kind of operation.
Kind OperationKind `json:"kind,required"`
// ID of the resource that the operation is acting on.
ResourceID string `json:"resource_id,required"`
// Status of the operation.
Status OperationStatus `json:"status,required"`
// Type of operation.
Type OperationType `json:"type,required"`
// When the operation was updated.
UpdatedAt string `json:"updated_at,required"`
JSON operationJSON `json:"-"`
}
Operation details.
func (*Operation) UnmarshalJSON ¶
type OperationKind ¶
type OperationKind string
Kind of operation.
const ( OperationKindVM OperationKind = "vm" OperationKindVolume OperationKind = "volume" OperationKindVPC OperationKind = "vpc" OperationKindFirewallRule OperationKind = "firewall_rule" )
func (OperationKind) IsKnown ¶
func (r OperationKind) IsKnown() bool
type OperationList ¶
type OperationList struct {
Items []Operation `json:"items,required"`
JSON operationListJSON `json:"-"`
}
func (*OperationList) UnmarshalJSON ¶
func (r *OperationList) UnmarshalJSON(data []byte) (err error)
type OperationService ¶
type OperationService struct {
Options []option.RequestOption
}
OperationService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationService method instead.
func NewOperationService ¶
func NewOperationService(opts ...option.RequestOption) (r *OperationService)
NewOperationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OperationService) Get ¶
func (r *OperationService) Get(ctx context.Context, operationID string, opts ...option.RequestOption) (res *Operation, err error)
Get details about a specific operation
func (*OperationService) List ¶
func (r *OperationService) List(ctx context.Context, opts ...option.RequestOption) (res *OperationList, err error)
List all operations
type OperationStatus ¶
type OperationStatus string
Status of the operation.
const ( OperationStatusPending OperationStatus = "pending" OperationStatusRunning OperationStatus = "running" OperationStatusDone OperationStatus = "done" OperationStatusFailed OperationStatus = "failed" OperationStatusUnknown OperationStatus = "unknown" )
func (OperationStatus) IsKnown ¶
func (r OperationStatus) IsKnown() bool
type OperationType ¶
type OperationType string
Type of operation.
const ( OperationTypeCreate OperationType = "create" OperationTypeUpdate OperationType = "update" OperationTypeDelete OperationType = "delete" )
func (OperationType) IsKnown ¶
func (r OperationType) IsKnown() bool
type RegionName ¶
type RegionName = shared.RegionName
Region the resource is in.
This is an alias to an internal type.
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
Status of the resource.
This is an alias to an internal type.