volume

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrVolumeNotFound           = errors.New("volume not found")
	ErrVolumeAlreadyBound       = errors.New("volume already bound in mountpoint")
	ErrVolumeBindNotFound       = errors.New("volume bind not found")
	ErrVolumeAlreadyProvisioned = errors.New("updating a volume already provisioned is not supported, a new volume must be created and the old one deleted if necessary")
)

Functions

func ListPlans

func ListPlans() (map[string][]VolumePlan, error)

func RenameTeam

func RenameTeam(oldName, newName string) error

Types

type Filter

type Filter struct {
	Teams []string
	Pools []string
	Names []string
}

type Volume

type Volume struct {
	Name      string `bson:"_id"`
	Pool      string
	Plan      VolumePlan
	TeamOwner string
	Status    string
	Binds     []VolumeBind      `bson:"-"`
	Opts      map[string]string `bson:",omitempty"`
}

func ListByApp

func ListByApp(appName string) ([]Volume, error)

func ListByFilter

func ListByFilter(f *Filter) ([]Volume, error)

func Load

func Load(name string) (*Volume, error)

func (*Volume) BindApp

func (v *Volume) BindApp(appName, mountPoint string, readOnly bool) error

func (*Volume) Create

func (v *Volume) Create() error

func (*Volume) Delete

func (v *Volume) Delete() error

func (*Volume) LoadBinds

func (v *Volume) LoadBinds() ([]VolumeBind, error)

func (*Volume) LoadBindsForApp

func (v *Volume) LoadBindsForApp(appName string) ([]VolumeBind, error)

func (*Volume) UnbindApp

func (v *Volume) UnbindApp(appName, mountPoint string) error

func (*Volume) UnmarshalPlan

func (v *Volume) UnmarshalPlan(result interface{}) error

func (*Volume) Update

func (v *Volume) Update() error

type VolumeBind

type VolumeBind struct {
	ID       VolumeBindID `bson:"_id"`
	ReadOnly bool
}

type VolumeBindID

type VolumeBindID struct {
	App        string
	MountPoint string
	Volume     string
}

type VolumePlan

type VolumePlan struct {
	Name string
	Opts map[string]interface{}
}

Jump to

Keyboard shortcuts

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