Documentation ¶
Index ¶
- Constants
- type Authentication
- type GitRepo
- func (gitRepo GitRepo) ActiveBranches() ([]string, error)
- func (gitRepo GitRepo) Branch(branchname string) (string, error)
- func (gitRepo GitRepo) Clone() error
- func (gitRepo GitRepo) CloseBranch(branch string) error
- func (gitRepo GitRepo) Cmd(args ...string) (string, error)
- func (gitRepo GitRepo) Commit(message string) (string, error)
- func (gitRepo GitRepo) CommitsBetween(baseRev string, secondRev string) ([]string, error)
- func (gitRepo GitRepo) GetName() string
- func (gitRepo GitRepo) LocalPath() string
- func (gitRepo GitRepo) Push() (string, error)
- func (gitRepo GitRepo) RemotePath() string
- func (gitRepo GitRepo) SanitizeBranchName(branchName string) string
- func (gitRepo GitRepo) SoftBranch(branchname string) (string, error)
- func (gitRepo GitRepo) Update(rev string) (string, error)
- func (gitRepo GitRepo) WorkingPath() string
- type HgRepo
- func (hgRepo HgRepo) ActiveBranches() ([]string, error)
- func (hgRepo HgRepo) Branch(branchname string) (string, error)
- func (hgRepo HgRepo) Clone() error
- func (hgRepo HgRepo) CloseBranch(branch string) error
- func (hgRepo HgRepo) Cmd(args ...string) (string, error)
- func (hgRepo HgRepo) Commit(message string) (string, error)
- func (hgRepo HgRepo) CommitsBetween(baseRev string, secondRev string) ([]string, error)
- func (hgRepo HgRepo) GetName() string
- func (hgRepo HgRepo) LocalPath() string
- func (hgRepo HgRepo) Merge(branch string) (string, error)
- func (hgRepo HgRepo) Push() (string, error)
- func (hgRepo HgRepo) PushDefault() (string, error)
- func (hgRepo HgRepo) RemotePath() string
- func (hgRepo HgRepo) SanitizeBranchName(branchName string) string
- func (hgRepo HgRepo) SetUserPas(user string, pass string) error
- func (hgRepo HgRepo) SoftBranch(branchname string) (string, error)
- func (hgRepo HgRepo) Update(rev string) (string, error)
- func (hgRepo HgRepo) WorkingPath() string
- type SourceControl
- type TokenAuth
- type UserPassAuth
Constants ¶
View Source
const ( Git = "git" Hg = "hg" Bitbucket = "bitbucket" GitHub = "github" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
func (GitRepo) ActiveBranches ¶
ActiveBranches returns all currently active branches without origin/ prefix
func (GitRepo) CloseBranch ¶
CloseBranch deletes the branch for the remote repository
func (GitRepo) CommitsBetween ¶
func (GitRepo) RemotePath ¶
func (GitRepo) SanitizeBranchName ¶
func (GitRepo) WorkingPath ¶
type HgRepo ¶
type HgRepo struct {
// contains filtered or unexported fields
}
func (HgRepo) ActiveBranches ¶
ActiveBranches returns all currently active branches
func (HgRepo) CloseBranch ¶
CloseBranch closes the branch then it merges it to a trash branch so no heads are left
func (HgRepo) CommitsBetween ¶
func (HgRepo) PushDefault ¶
func (HgRepo) RemotePath ¶
func (HgRepo) SanitizeBranchName ¶
func (HgRepo) WorkingPath ¶
type SourceControl ¶
type SourceControl interface { WorkingPath() string LocalPath() string RemotePath() string Cmd(args ...string) (string, error) Update(rev string) (string, error) Branch(branchname string) (string, error) SoftBranch(branchname string) (string, error) Commit(message string) (string, error) Push() (string, error) ActiveBranches() ([]string, error) CloseBranch(branch string) error Clone() error SanitizeBranchName(branchName string) string CommitsBetween(baseRev string, secondRev string) ([]string, error) GetName() string }
type TokenAuth ¶
type TokenAuth struct { User string // The user to use when cloning (x-token-auth for Bitbucket, x-access-token for GitHub Token string }
func (TokenAuth) AuthenticateHTTPRequest ¶
func (auth TokenAuth) AuthenticateHTTPRequest(header header)
func (TokenAuth) AuthenticateURL ¶
func (TokenAuth) AuthenticateWithToken ¶
type UserPassAuth ¶
func (UserPassAuth) AuthenticateHTTPRequest ¶
func (auth UserPassAuth) AuthenticateHTTPRequest(header header)
func (UserPassAuth) AuthenticateURL ¶
func (auth UserPassAuth) AuthenticateURL(url string) string
func (UserPassAuth) AuthenticateWithToken ¶
func (auth UserPassAuth) AuthenticateWithToken() *http.Client
Click to show internal directories.
Click to hide internal directories.