Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadFailedError ¶
DownloadFailedError represents a failure to download a repository.
func (DownloadFailedError) Error ¶
func (err DownloadFailedError) Error() string
Error returns the error string, denoting the failed repository.
func (DownloadFailedError) Unwrap ¶
func (err DownloadFailedError) Unwrap() error
Unwrap returns the inner error. It returns nil if there is no inner error.
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
GitRepo manages a Git repository for the purposes of retrieving a file from it.
func NewGitRepo ¶
NewGitRepo creates a new instance of a GitRepo, where the Git repository is managed at storagePath.
If storagePath is empty on disk, NewGitRepo initializes GitRepo by cloning the repository. Otherwise, NewGitRepo will do a fetch.
After GitRepo is initialized, it checks out to the Revision specified in GitRepoOptions.
func (*GitRepo) CurrentRevision ¶
CurrentRevision returns the current revision of the repository (by SHA).
type GitRepoOptions ¶
type InvalidRevisionError ¶
type InvalidRevisionError struct {
Revision string
}
InvalidRevisionError represents an invalid revision.
func (InvalidRevisionError) Error ¶
func (err InvalidRevisionError) Error() string
Error returns the error string, denoting the invalid revision.
type UpdateFailedError ¶
UpdateFailedError represents a failure to update a repository.
func (UpdateFailedError) Error ¶
func (err UpdateFailedError) Error() string
Error returns the error string, denoting the failed repository.
func (UpdateFailedError) Unwrap ¶
func (err UpdateFailedError) Unwrap() error
Unwrap returns the inner error. It returns nil if there is no inner error.