Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionClient ¶
type ActionClient interface { Attach(ctx context.Context, ip string, dropletID int) error DetachByDropletID(ctx context.Context, ip string, dropletID int) error }
An ActionClient can interact with the DigitalOcean StorageAction service.
type Client ¶
type Client interface { CreateVolume(ctx context.Context, name, region string, sizeGibiBytes int64, opts ...CreateOpt) (Volume, error) GetVolume(context.Context, string) (Volume, error) DeleteVolume(context.Context, string) error ListVolumes(context.Context) (<-chan Volume, <-chan error) CreateSnapshot(ctx context.Context, volumeID, name string, opts ...SnapshotOpt) (Snapshot, error) GetSnapshot(context.Context, string) (Snapshot, error) DeleteSnapshot(context.Context, string) error ListSnapshots(ctx context.Context, volumeID string) (<-chan Snapshot, <-chan error) Actions() ActionClient }
A Client can interact with the DigitalOcean Volumes service.
type CreateOpt ¶
type CreateOpt func(*createOpt)
CreateOpt is an optional argument to Volumes.Create.
func SetVolumeDescription ¶
SetVolumeDescription does what it says on the tin.
func SetVolumeFilesystemLabel ¶
SetVolumeFilesystemLabel does what it says on the tin.
func SetVolumeFilesystemType ¶
SetVolumeFilesystemType does what it says on the tin.
type SnapshotOpt ¶
type SnapshotOpt func(*snapshotOpt)
SnapshotOpt is an optional argument to Volumes.Edit.
func SetSnapshotDescription ¶
func SetSnapshotDescription(desc string) SnapshotOpt
SetSnapshotDescription does what it says on the tin.
Click to show internal directories.
Click to hide internal directories.