Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Branch defines a branch type Branch = RefType(iota) // Version is a version tag Version )
Variables ¶
View Source
var ( // ErrURLParse happens when failing to parse the remote as a url ErrURLParse = errors.New("error parsing remote git source url") // ErrOpenRepo happens when you try to open a repo on disk and it doesnt exist ErrOpenRepo = errors.New("error opening repository on disk") // ErrCloneRemote happens when you try to clone a repo and something fails ErrCloneRemote = errors.New("error cloning repository") // ErrFetchRemote happens when trying to fetch the remote ErrFetchRemote = errors.New("error fetching the remote") // ErrMakeWorkTreeTmpDir happens when trying to create the work tree directory for the temp work tree ErrMakeWorkTreeTmpDir = errors.New("error creating the work tree directory") // ErrCleanWorkTreeTmpDir happens when you can't clean the work tree from disk ErrCleanWorkTreeTmpDir = errors.New("error removing the work tree directory") // ErrMakeSrcTree happens when you fail to create the directory for the remote source tree cache ErrMakeSrcTree = errors.New("error creating the remote source tree directory") // ErrOpenWorkTree happens when trying to open the git work tree ErrOpenWorkTree = errors.New("error opening the git work tree") // ErrUnknownRefType happens when the ref type is unknown ErrUnknownRefType = errors.New("ref type unknown") // ErrFindingBranch happens when the branch cannot be found ErrFindingBranch = errors.New("error finding branch") // ErrCheckLocalRepo happens when the local repository cannot be resolved ErrCheckLocalRepo = errors.New("error checking local repository") // TmpWorkDir represents the directory used to checkout the work tree TmpWorkDir = path.Join(os.TempDir(), "protogen") )
View Source
var ( // WorkDir is the dictionary in which we operate WorkDir string )
Functions ¶
This section is empty.
Types ¶
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
GitRepo represents a worktree
type GitSource ¶
type GitSource struct { // Remote represents the git remote Remote *url.URL // Repo represents the location of the current repository content Repo string // Three represents the git tree, normally the .git directory Tree string }
GitSource represents a git source
func NewLocalGitSource ¶
NewLocalGitSource initialises a new git source
func NewMockGitSource ¶
NewMockGitSource returns a local mock source
func NewRemoteGitSource ¶
NewRemoteGitSource initialises a new git source
type MockRepo ¶
type MockRepo struct{}
MockRepo represents a no-op collection of methods to satisfy the repo interface
Click to show internal directories.
Click to hide internal directories.