Documentation ¶
Overview ¶
Package repo defines a generic interface for Version Control Systems (VCS).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNetwork represents any type of network error. ErrNetwork = errors.New("network error") // ErrNoSpace represents a space storage error. ErrNoSpace = errors.New("no space left on device") )
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo interface { // Clone clones a repository into a new directory. // Clone must return ErrNetworkUnreachable in case of connectivity // problems and ErrNoSpace in case of storage space problems. Clone() error // Update fetches the latest changes from a repository, using the // default branch. // Update must return ErrNetworkUnreachable in case of connectivity // problems and ErrNoSpace in case of storage space problems. Update() error // AbsPath gives the absolute path to the repository on disk. AbsPath() string // SetAbsPath can be used to change AbsPath, if necessary. SetAbsPath(path string) // URL gives the clone URL of the repository. URL() string // Cleanup shall be called when done using the Repo. It will take // care of closing any open files and the usual housekeeping. Cleanup() error }
Repo abstracts a version control system (VCS) such as git, mercurial or others..
Click to show internal directories.
Click to hide internal directories.