store

package
v0.0.0-...-671ca5e Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("Volume not found")
	ErrAlreadyExist = errors.New("Volume already exists")
)

Functions

This section is empty.

Types

type MemoryStore

type MemoryStore struct {
	// contains filtered or unexported fields
}

func (*MemoryStore) Del

func (m *MemoryStore) Del(name string) error

func (*MemoryStore) Get

func (m *MemoryStore) Get(name string) (*Volume, error)

func (*MemoryStore) Set

func (m *MemoryStore) Set(volume *Volume) error

func (*MemoryStore) Setx

func (m *MemoryStore) Setx(volume *Volume) error

type Store

type Store interface {
	Get(string) (*Volume, error)
	Set(*Volume) error
	Setx(*Volume) error
	Del(string) error
}

func NewMemoryStore

func NewMemoryStore() Store

type Volume

type Volume struct {
	Name    string
	Token   string
	Options map[string]string
	// contains filtered or unexported fields
}

func NewVolume

func NewVolume(name, token string, options map[string]string) *Volume

func (*Volume) Mount

func (v *Volume) Mount(root string) (string, error)

func (*Volume) Mounted

func (vol *Volume) Mounted() bool

func (*Volume) Unmount

func (vol *Volume) Unmount() error

Jump to

Keyboard shortcuts

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