stores

package
v0.0.0-...-535a2f3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2018 License: MIT Imports: 21 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultiReader

func NewMultiReader(copiers []Copier) (proc procs.Proc, err error)

Types

type Copier

type Copier struct {
	IdVal interface{}
	Lister
	procs.Proc
}

func ShuffleCopiers

func ShuffleCopiers(copiers []Copier) (res []Copier)

func (Copier) Id

func (cp Copier) Id() interface{}

type CopiesEntryAdder

type CopiesEntryAdder struct {
	Reg *copies.Reg
}

func (CopiesEntryAdder) AddLsEntry

func (a CopiesEntryAdder) AddLsEntry(lser Lister, e LsEntry)

type Cp

type Cp Dir

func (Cp) Ls

func (cp Cp) Ls() ([]LsEntry, error)

func (Cp) Proc

func (cp Cp) Proc() procs.Proc

func (Cp) Unproc

func (cp Cp) Unproc() procs.Proc

type Dd

type Dd struct {
	Dir        Dir
	Command    commandFunc
	StrCommand strCommandFunc
}

func (Dd) Ls

func (s Dd) Ls() ([]LsEntry, error)

func (Dd) Proc

func (s Dd) Proc() procs.Proc

func (Dd) Unproc

func (s Dd) Unproc() procs.Proc

type Dir

type Dir struct {
	Path string
	Part StrPart
}

func (Dir) FullPath

func (d Dir) FullPath(hash checksum.Hash) string

func (Dir) Ls

func (d Dir) Ls(lser DirLister) ([]LsEntry, error)

type DirLister

type DirLister interface {
	Ls(dir string, depth int) <-chan DirLsRes
}

type DirLsRes

type DirLsRes struct {
	Name string
	Size int64
	Err  error
}

type Lister

type Lister interface {
	Ls() ([]LsEntry, error)
}

type LsEntry

type LsEntry struct {
	Hash checksum.Hash
	Size int64
}

type LsEntryAdder

type LsEntryAdder interface {
	AddLsEntry(Lister, LsEntry)
}

type Mem

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

func NewMem

func NewMem() *Mem

func (*Mem) Delete

func (s *Mem) Delete(hash checksum.Hash)

func (*Mem) Get

func (s *Mem) Get(hash checksum.Hash) []byte

func (*Mem) Hashes

func (s *Mem) Hashes() (hashes []checksum.Hash)

func (*Mem) Ls

func (s *Mem) Ls() ([]LsEntry, error)

func (*Mem) Proc

func (s *Mem) Proc() procs.Proc

func (*Mem) Set

func (s *Mem) Set(hash checksum.Hash, b []byte)

func (*Mem) Unproc

func (s *Mem) Unproc() procs.Proc

type MultiLister

type MultiLister []Lister

func (MultiLister) AddEntriesTo

func (ml MultiLister) AddEntriesTo(adders []LsEntryAdder) error

type QuotaEntryAdder

type QuotaEntryAdder struct {
	Qman *quota.Man
}

func (QuotaEntryAdder) AddLsEntry

func (a QuotaEntryAdder) AddLsEntry(lser Lister, e LsEntry)

type Rclone

type Rclone struct {
	Remote string
	Tmp    *tmpdedup.Dir
}

func (Rclone) Ls

func (rc Rclone) Ls() (entries []LsEntry, err error)

func (Rclone) Proc

func (rc Rclone) Proc() procs.Proc

func (Rclone) Unproc

func (rc Rclone) Unproc() procs.Proc

type SliceLister

type SliceLister []LsEntry

func (SliceLister) Ls

func (sl SliceLister) Ls() ([]LsEntry, error)

type Store

type Store interface {
	Lister
	procs.ProcUnprocer
}

func NewScp

func NewScp(host string, dir Dir) Store

type StrPart

type StrPart []int

func (StrPart) Split

func (part StrPart) Split(str string) (parts []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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