Documentation
¶
Index ¶
- Constants
- Variables
- func BasePath(name string) string
- func Branch(repo, commit, branch string) error
- func Commit(repo, commit, branch string) error
- func Commits(repo, from string, order int, cont func(CommitInfo) error) error
- func CopyFile(name string, r io.Reader) (int64, error)
- func Create(name string) (*os.File, error)
- func CreateAll(name string) (*os.File, error)
- func CreateFromReader(name string, r io.Reader) (int64, error)
- func Ensure(repo string) error
- func EnsureReplica(repo string) error
- func FileExists(name string) (bool, error)
- func FilePath(name string) string
- func FindNew(repo, from, to string) ([]string, error)
- func GetFrom(repo string) (string, error)
- func GetMeta(name, key string) string
- func Hold(repo, commit string) (string, error)
- func Init(repo string) error
- func InitReplica(repo string) error
- func IsReadOnly(volume string) (bool, error)
- func LazyWalk(name string, f func(string) error) error
- func Link(oldname, newname string) error
- func Log(repo, from string, order int, cont func(io.Reader) error) error
- func Lstat(name string) (os.FileInfo, error)
- func Mkdir(name string) error
- func MkdirAll(name string) error
- func Open(name string) (*os.File, error)
- func OpenFd(name string, mode int, perm uint32) (int, error)
- func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func Pull(repo, from string, cb Pusher) error
- func RandSeq(n int) string
- func ReadDir(name string) ([]os.FileInfo, error)
- func ReadFile(name string) ([]byte, error)
- func Readlink(name string) (string, error)
- func Recv(repo string, data io.Reader) error
- func Release(name string)
- func Remove(name string) error
- func RemoveAll(name string) error
- func Rename(oldname, newname string) error
- func Send(repo, commit string, cont func(io.Reader) error) error
- func SetMeta(branch, key, value string) error
- func SetReadOnly(volume string) error
- func Snapshot(volume string, dest string, readonly bool) error
- func Stat(name string) (os.FileInfo, error)
- func SubvolumeCreate(name string) error
- func SubvolumeDelete(name string) error
- func SubvolumeDeleteAll(name string) error
- func Symlink(oldname, newname string) error
- func Sync() error
- func TrimFilePath(name string) string
- func UnsetReadOnly(volume string) error
- func WaitForFile(name string) error
- func WriteFile(name string, data []byte) error
- type CommitInfo
- type LocalReplica
- type Puller
- type Pusher
- type Replica
- type S3Replica
Constants ¶
const ( Desc = iota Asc = iota )
Constants used for passing to log
Variables ¶
var Complete = errors.New("Complete")
Functions ¶
func Commits ¶
func Commits(repo, from string, order int, cont func(CommitInfo) error) error
Commits is a wrapper around `Log` which parses the output in to a convenient struct
func Ensure ¶
Ensure is like Init but won't error if the repo is already present. It will error if the repo is not present and we fail to make it.
func EnsureReplica ¶ added in v0.7.1
func FileExists ¶
func GetFrom ¶ added in v0.7.1
GetFrom returns the commit that this repo should pass to Pull to get itself up to date.
func Hold ¶
Hold creates a temporary snapshot of a commit that no one else knows about. It's your responsibility to release the snapshot with Release
func InitReplica ¶ added in v0.7.1
func IsReadOnly ¶ added in v0.7.1
func RandSeq ¶
Generates a random sequence of letters. Useful for making filesystems that won't interfere with each other. This should be factored out to another file.
func SetReadOnly ¶
func SubvolumeCreate ¶
func SubvolumeDelete ¶
func SubvolumeDeleteAll ¶ added in v0.7.1
func TrimFilePath ¶
func UnsetReadOnly ¶
func WaitForFile ¶ added in v0.7.1
Types ¶
type CommitInfo ¶
type CommitInfo struct {
Path string
// contains filtered or unexported fields
}
type LocalReplica ¶ added in v0.7.1
type LocalReplica struct {
// contains filtered or unexported fields
}
A LocalReplica implements the CommitBrancher interface and replicates the commits to a local repo. It expects `repo` to already exist
func NewLocalReplica ¶ added in v0.7.1
func NewLocalReplica(repo string) *LocalReplica
type S3Replica ¶ added in v0.7.1
type S3Replica struct {
// contains filtered or unexported fields
}