lib

package
v0.0.0-...-f01ac60 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ArchiveVersion = "1.0.0"

Variables

View Source
var (
	ErrNotSupport     = errors.New("command not support")
	ErrTarAction      = errors.New("unkonw action")
	ErrInputData      = errors.New("need input data")
	ErrArchiveBackend = errors.New("mismatch backend")
	ErrArchiveVersion = errors.New("archive not compatible")
)

Functions

func PrefixError

func PrefixError(prefix string, err error) string

Types

type ArchiveHeader

type ArchiveHeader struct {
	Version string `json:"version"`
	Backend string `json:"backend"`
}

type Command

type Command interface {
	Cat(path string) (*store.KVPair, error)
	Ls(path string) ([]*store.KVPair, error)
	Mkdir(path string, opt *MkdirOption) error
	Rm(path string, recursive bool) error
	Touch(path string, data []byte, opts *store.WriteOptions) error
	Dump(path string) ([]byte, error)
	Restore(archive []byte) error
}

type MkdirOption

type MkdirOption struct {
	Parent bool
	TTL    time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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