volumes

package
v0.7.17 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

Attach accepts a InstanceOperationOpts struct and attach volume to an instance.

func Detach

Detach accepts a InstanceOperationOpts struct and detach volume to an instance.

func ExtractVolumeIDFromAttachTask added in v0.7.13

func ExtractVolumeIDFromAttachTask(task *tasks.Task) (string, error)

Types

type InstanceOperationOpts

type InstanceOperationOpts struct {
	InstanceID string `json:"instance_id" required:"true" validate:"required,uuid4"`
}

InstanceOperationOpts allows prepare data for Attach and Detach requests

func (InstanceOperationOpts) ToVolumeInstanceOperationMap

func (opts InstanceOperationOpts) ToVolumeInstanceOperationMap() (map[string]interface{}, error)

ToVolumeInstanceOperationMap builds a request body.

type InstanceOperationOptsBuilder

type InstanceOperationOptsBuilder interface {
	ToVolumeInstanceOperationMap() (map[string]interface{}, error)
}

InstanceOperationOptsBuilder prepare data to proceed with Attach and Detach requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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