Documentation
¶
Index ¶
Constants ¶
const RegionNameApMum1 = shared.RegionNameApMum1
This is an alias to an internal value.
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 ResourceStatusFailed = shared.ResourceStatusFailed
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 {
ID string `json:"id,required"`
CreatedAt string `json:"created_at,required"`
Kind OperationKind `json:"kind,required"`
ResourceID string `json:"resource_id,required"`
Status OperationStatus `json:"status,required"`
Type OperationType `json:"type,required"`
UpdatedAt string `json:"updated_at,required"`
JSON operationJSON `json:"-"`
}
Operation details.
func (*Operation) UnmarshalJSON ¶
type OperationKind ¶
type OperationKind string
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
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
const ( OperationTypeCreate OperationType = "create" OperationTypeUpdate OperationType = "update" OperationTypeDelete OperationType = "delete" )
func (OperationType) IsKnown ¶
func (r OperationType) IsKnown() bool
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
This is an alias to an internal type.