Documentation ¶
Index ¶
- func Checkout(v_str string) (err error)
- func Commit(message string, meta string) (err error)
- func ContainsVersion(vs []version, v *version) bool
- func GetCurrentCommitId(repoPath string) (id string, err error)
- func GetVersionedFiles(repoPath string) (versioned []string, err error)
- func HasUncommittedChanges(repoPath string) (has bool, err error)
- func Init(snapsPath string, backend string) (err error)
- func Log() (logstr string, err error)
- func NewVersion(revision string) *version
- func NewVersionWithMeta(revision string, meta map[string]string) *version
- type AnError
- type Backend
- type PosixBackend
- func (b PosixBackend) Checkout(v *version) (err error)
- func (b PosixBackend) Commit(meta map[string]string) (v *version, err error)
- func (b PosixBackend) Diff(v1 *version, v2 *version, obj string) (string, error)
- func (b PosixBackend) GetStatus() (Status, error)
- func (b PosixBackend) GetVersions() (versions []version, err error)
- func (b PosixBackend) Init() (err error)
- func (b PosixBackend) IsInitialized() bool
- func (b PosixBackend) Open() error
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsVersion ¶
func ContainsVersion(vs []version, v *version) bool
func GetCurrentCommitId ¶
func GetVersionedFiles ¶
func HasUncommittedChanges ¶
func NewVersion ¶
func NewVersion(revision string) *version
func NewVersionWithMeta ¶
Types ¶
type Backend ¶
type Backend interface { // inits backend in current directory Init() error // opens the backend Open() error // whether the backend has been initialized IsInitialized() bool // returns status of backend GetStatus() (Status, error) // checks out a commit Checkout(v *version) error // commits a version. Commit(meta map[string]string) (*version, error) // retrieves the string representation of the diff for a path Diff(v1 *version, v2 *version, path string) (string, error) // returns list of committed versions GetVersions() (versions []version, err error) }
func InstantiateBackend ¶
func NewPosixBackend ¶
type PosixBackend ¶
type PosixBackend struct {
// contains filtered or unexported fields
}
func (PosixBackend) Checkout ¶
func (b PosixBackend) Checkout(v *version) (err error)
func (PosixBackend) Commit ¶
func (b PosixBackend) Commit(meta map[string]string) (v *version, err error)
func (PosixBackend) Diff ¶
func (b PosixBackend) Diff(v1 *version, v2 *version, obj string) (string, error)
func (PosixBackend) GetStatus ¶
func (b PosixBackend) GetStatus() (Status, error)
func (PosixBackend) GetVersions ¶
func (b PosixBackend) GetVersions() (versions []version, err error)
func (PosixBackend) Init ¶
func (b PosixBackend) Init() (err error)
func (PosixBackend) IsInitialized ¶
func (b PosixBackend) IsInitialized() bool
func (PosixBackend) Open ¶
func (b PosixBackend) Open() error
Click to show internal directories.
Click to hide internal directories.