Versions in this module Expand all Collapse all v0 v0.1.0 Aug 21, 2015 Changes in this version + const AT_SYMLINK_NOFOLLOW — linux/amd64 + var ErrNodeAlreadyInTree = errors.New("node already present") + var ErrNodeNotFound = errors.New("named node not found") + func FindSnapshot(repo *repository.Repository, s string) (backend.ID, error) + func IsAlreadyLocked(err error) bool + func RemoveAllLocks(repo *repository.Repository) error + func RemoveStaleLocks(repo *repository.Repository) error + func WalkTree(repo *repository.Repository, id backend.ID, done chan struct{}, ...) + type Archiver struct + Error func(dir string, fi os.FileInfo, err error) error + Excludes []string + SelectFilter pipe.SelectFunc + func NewArchiver(repo *repository.Repository) *Archiver + func (arch *Archiver) Save(t pack.BlobType, id backend.ID, length uint, rd io.Reader) error + func (arch *Archiver) SaveFile(p *Progress, node *Node) error + func (arch *Archiver) SaveTreeJSON(item interface{}) (backend.ID, error) + func (arch *Archiver) Snapshot(p *Progress, paths []string, parentID *backend.ID) (*Snapshot, backend.ID, error) + type Cache struct + func NewCache(repo *repository.Repository, cacheDir string) (*Cache, error) + func (c *Cache) Clear(repo *repository.Repository) error + func (c *Cache) Has(t backend.Type, subtype string, id backend.ID) (bool, error) + func (c *Cache) Load(t backend.Type, subtype string, id backend.ID) (io.ReadCloser, error) + func (c *Cache) Store(t backend.Type, subtype string, id backend.ID) (io.WriteCloser, error) + type ErrAlreadyLocked struct + func (e ErrAlreadyLocked) Error() string + type Lock struct + Exclusive bool + GID uint32 + Hostname string + PID int + Time time.Time + UID uint32 + Username string + func LoadLock(repo *repository.Repository, id backend.ID) (*Lock, error) + func NewExclusiveLock(repo *repository.Repository) (*Lock, error) + func NewLock(repo *repository.Repository) (*Lock, error) + func (l *Lock) Refresh() error + func (l *Lock) Stale() bool + func (l *Lock) Unlock() error + func (l Lock) String() string + type Node struct + AccessTime time.Time + ChangeTime time.Time + Content []backend.ID + Device uint64 + Error string + GID uint32 + Group string + Inode uint64 + LinkTarget string + Links uint64 + ModTime time.Time + Mode os.FileMode + Name string + Size uint64 + Subtree *backend.ID + Type string + UID uint32 + User string + func NodeFromFileInfo(path string, fi os.FileInfo) (*Node, error) + func (node *Node) CreateAt(path string, repo *repository.Repository) error + func (node *Node) OpenForReading() (*os.File, error) + func (node *Node) UnmarshalJSON(data []byte) error + func (node Node) Equals(other Node) bool + func (node Node) MarshalJSON() ([]byte, error) + func (node Node) RestoreTimestamps(path string) error + func (node Node) String() string + func (node Node) Tree() *Tree + type Progress struct + OnDone ProgressFunc + OnStart func() + OnUpdate ProgressFunc + func NewProgress(d time.Duration) *Progress + func (p *Progress) Done() + func (p *Progress) Report(s Stat) + func (p *Progress) Reset() + func (p *Progress) Start() + type ProgressFunc func(s Stat, runtime time.Duration, ticker bool) + type Restorer struct + Error func(dir string, node *Node, err error) error + SelectFilter func(item string, dstpath string, node *Node) bool + func NewRestorer(repo *repository.Repository, id backend.ID) (*Restorer, error) + func (res *Restorer) RestoreTo(dir string) error + func (res *Restorer) Snapshot() *Snapshot + type Snapshot struct + Excludes []string + GID uint32 + Hostname string + Parent *backend.ID + Paths []string + Time time.Time + Tree *backend.ID + UID uint32 + Username string + func LoadSnapshot(repo *repository.Repository, id backend.ID) (*Snapshot, error) + func NewSnapshot(paths []string) (*Snapshot, error) + func (sn Snapshot) ID() *backend.ID + func (sn Snapshot) String() string + type Stat struct + Blobs uint64 + Bytes uint64 + Dirs uint64 + Errors uint64 + Files uint64 + Trees uint64 + func Scan(dirs []string, filter pipe.SelectFunc, p *Progress) (Stat, error) + func (s *Stat) Add(other Stat) + func (s Stat) String() string + type Tree struct + Nodes []*Node + func LoadTree(repo *repository.Repository, id backend.ID) (*Tree, error) + func NewTree() *Tree + func (t *Tree) Insert(node *Node) error + func (t Tree) Equals(other *Tree) bool + func (t Tree) Find(name string) (*Node, error) + func (t Tree) String() string + func (t Tree) Subtrees() (trees backend.IDs) + type WalkTreeJob struct + Error error + Node *Node + Path string + Tree *Tree v0.1.0-doc Feb 21, 2016