volumes

package
v3.2.0-rc3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create creates a volume given its configuration.

func Exists added in v3.1.0

func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error)

Exists returns true if a given volume exists

func Inspect

func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) (*entities.VolumeConfigResponse, error)

Inspect returns low-level information about a volume.

func List

func List(ctx context.Context, options *ListOptions) ([]*entities.VolumeListReport, error)

List returns the configurations for existing volumes in the form of a slice. Optionally, filters can be used to refine the list of volumes.

func Prune

func Prune(ctx context.Context, options *PruneOptions) ([]*reports.PruneReport, error)

Prune removes unused volumes from the local filesystem.

func Remove

func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) error

Remove deletes the given volume from storage. The optional force parameter is used to remove a volume even if it is being used by a container.

Types

type CreateOptions

type CreateOptions struct {
}

CreateOptions are optional options for creating volumes

func (*CreateOptions) Changed

func (o *CreateOptions) Changed(fieldName string) bool

Changed

func (*CreateOptions) ToParams

func (o *CreateOptions) ToParams() (url.Values, error)

ToParams

type ExistsOptions added in v3.1.0

type ExistsOptions struct {
}

ExistsOptions are optional options for checking if a volume exists

func (*ExistsOptions) Changed added in v3.1.0

func (o *ExistsOptions) Changed(fieldName string) bool

Changed

func (*ExistsOptions) ToParams added in v3.1.0

func (o *ExistsOptions) ToParams() (url.Values, error)

ToParams

type InspectOptions

type InspectOptions struct {
}

InspectOptions are optional options for inspecting volumes

func (*InspectOptions) Changed

func (o *InspectOptions) Changed(fieldName string) bool

Changed

func (*InspectOptions) ToParams

func (o *InspectOptions) ToParams() (url.Values, error)

ToParams

type ListOptions

type ListOptions struct {
	// Filters applied to the listing of volumes
	Filters map[string][]string
}

ListOptions are optional options for listing volumes

func (*ListOptions) Changed

func (o *ListOptions) Changed(fieldName string) bool

Changed

func (*ListOptions) GetFilters

func (o *ListOptions) GetFilters() map[string][]string

GetFilters

func (*ListOptions) ToParams

func (o *ListOptions) ToParams() (url.Values, error)

ToParams

func (*ListOptions) WithFilters

func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions

WithFilters

type PruneOptions

type PruneOptions struct {
	// Filters applied to the pruning of volumes
	Filters map[string][]string
}

PruneOptions are optional options for pruning volumes

func (*PruneOptions) Changed

func (o *PruneOptions) Changed(fieldName string) bool

Changed

func (*PruneOptions) GetFilters

func (o *PruneOptions) GetFilters() map[string][]string

GetFilters

func (*PruneOptions) ToParams

func (o *PruneOptions) ToParams() (url.Values, error)

ToParams

func (*PruneOptions) WithFilters

func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions

WithFilters

type RemoveOptions

type RemoveOptions struct {
	// Force removes the volume even if it is being used
	Force *bool
}

RemoveOptions are optional options for removing volumes

func (*RemoveOptions) Changed

func (o *RemoveOptions) Changed(fieldName string) bool

Changed

func (*RemoveOptions) GetForce

func (o *RemoveOptions) GetForce() bool

GetForce

func (*RemoveOptions) ToParams

func (o *RemoveOptions) ToParams() (url.Values, error)

ToParams

func (*RemoveOptions) WithForce

func (o *RemoveOptions) WithForce(value bool) *RemoveOptions

WithForce

Jump to

Keyboard shortcuts

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