operations

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameApSeo1 = shared.RegionNameApSeo1

Equals "ap-seo-1"

View Source
const RegionNameApSin1 = shared.RegionNameApSin1

Equals "ap-sin-1"

View Source
const RegionNameApTyo1 = shared.RegionNameApTyo1

Equals "ap-tyo-1"

View Source
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

Equals "eu-frk-1"

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

Equals "us-chi-1"

View Source
const RegionNameUsSea1 = shared.RegionNameUsSea1

Equals "us-sea-1"

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

Equals "us-sva-1"

View Source
const RegionNameUsSva2 = shared.RegionNameUsSva2

Equals "us-sva-2"

View Source
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

Equals "us-wdc-1"

View Source
const ResourceStatusCreating = shared.ResourceStatusCreating

Equals "creating"

View Source
const ResourceStatusDeleted = shared.ResourceStatusDeleted

Equals "deleted"

View Source
const ResourceStatusDeleting = shared.ResourceStatusDeleting

Equals "deleting"

View Source
const ResourceStatusError = shared.ResourceStatusError

Equals "error"

View Source
const ResourceStatusPending = shared.ResourceStatusPending

Equals "pending"

View Source
const ResourceStatusReady = shared.ResourceStatusReady

Equals "ready"

View Source
const ResourceStatusUpdating = shared.ResourceStatusUpdating

Equals "updating"

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 time.Time `json:"created_at,required" format:"date-time"`
	// Kind of Operation.
	//
	// Any of "vm", "volume", "vpc", "firewall_rule".
	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.
	//
	// Any of "pending", "running", "done", "failed", "unknown".
	Status OperationStatus `json:"status,required"`
	// Type of Operation.
	//
	// Any of "create", "update", "delete", "restart".
	Type OperationType `json:"type,required"`
	// When the Operation was updated.
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Kind        respjson.Field
		ResourceID  respjson.Field
		Status      respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Operation details.

func (Operation) RawJSON added in v1.1.0

func (r Operation) RawJSON() string

Returns the unmodified JSON received from the API

func (*Operation) UnmarshalJSON

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

type OperationKind

type OperationKind string

Kind of Operation.

const (
	OperationKindVM           OperationKind = "vm"
	OperationKindVolume       OperationKind = "volume"
	OperationKindVPC          OperationKind = "vpc"
	OperationKindFirewallRule OperationKind = "firewall_rule"
)

type OperationList

type OperationList struct {
	Items []Operation `json:"items,required"`
	// Pagination response details.
	Pagination shared.Pagination `json:"pagination,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Pagination  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OperationList) RawJSON added in v1.1.0

func (r OperationList) RawJSON() string

Returns the unmodified JSON received from the API

func (*OperationList) UnmarshalJSON

func (r *OperationList) UnmarshalJSON(data []byte) error

type OperationListParams added in v1.21.0

type OperationListParams struct {
	// Pagination cursor returned by a previous request
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationListParams) URLQuery added in v1.21.0

func (r OperationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationListParams's query parameters as `url.Values`.

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

List all operations

func (*OperationService) ListAutoPaging added in v1.21.0

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"
)

type OperationType

type OperationType string

Type of Operation.

const (
	OperationTypeCreate  OperationType = "create"
	OperationTypeUpdate  OperationType = "update"
	OperationTypeDelete  OperationType = "delete"
	OperationTypeRestart OperationType = "restart"
)

type Pagination added in v1.21.0

type Pagination = shared.Pagination

Pagination response details.

This is an alias to an internal type.

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