volume

package
v0.0.0-...-1b7c243 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 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")
)

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

func (v *Volume) Delete() error

func (*Volume) LoadBinds

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

func (*Volume) Save

func (v *Volume) Save() error

func (*Volume) UnbindApp

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

func (*Volume) UnmarshalPlan

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

func (*Volume) Validate

func (v *Volume) Validate() 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