operations

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RegionNameApSeo1 = shared.RegionNameApSeo1

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 ResourceStatusError = shared.ResourceStatusError

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 {
	// 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

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

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.

Jump to

Keyboard shortcuts

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