operations

package
v0.1.0-alpha.46 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameApMum1 = shared.RegionNameApMum1

This is an alias to an internal value.

View Source
const RegionNameApSin1 = shared.RegionNameApSin1

This is an alias to an internal value.

View Source
const RegionNameApTyo1 = shared.RegionNameApTyo1

This is an alias to an internal value.

View Source
const RegionNameEuAms1 = shared.RegionNameEuAms1

This is an alias to an internal value.

View Source
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

This is an alias to an internal value.

View Source
const RegionNameEuLon1 = shared.RegionNameEuLon1

This is an alias to an internal value.

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

This is an alias to an internal value.

View Source
const RegionNameUsSea1 = shared.RegionNameUsSea1

This is an alias to an internal value.

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

This is an alias to an internal value.

View Source
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

This is an alias to an internal value.

View Source
const ResourceStatusCreating = shared.ResourceStatusCreating

This is an alias to an internal value.

View Source
const ResourceStatusDeleted = shared.ResourceStatusDeleted

This is an alias to an internal value.

View Source
const ResourceStatusDeleting = shared.ResourceStatusDeleting

This is an alias to an internal value.

View Source
const ResourceStatusFailed = shared.ResourceStatusFailed

This is an alias to an internal value.

View Source
const ResourceStatusPending = shared.ResourceStatusPending

This is an alias to an internal value.

View Source
const ResourceStatusReady = shared.ResourceStatusReady

This is an alias to an internal value.

View Source
const ResourceStatusUpdating = shared.ResourceStatusUpdating

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error = apierror.Error

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

func (r *Operation) UnmarshalJSON(data []byte) (err error)

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 RegionName

type RegionName = shared.RegionName

This is an alias to an internal type.

type ResourceStatus

type ResourceStatus = shared.ResourceStatus

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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