Documentation ¶
Index ¶
- Constants
- func LocateGitRepo(path string) error
- func ParseConfiguration() (*configuration, error)
- type BasicAuth
- type GitCliManagerImpl
- func (impl *GitCliManagerImpl) AddRepo(ctx GitContext, rootDir string, remoteUrl string, isBare bool) error
- func (impl *GitCliManagerImpl) CommitAndPush(ctx GitContext, repoRoot, commitMsg, name, emailId string) (commitHash string, err error)
- func (impl *GitCliManagerImpl) Pull(ctx GitContext, repoRoot string) (err error)
- type GitCommandManager
- type GitCommandManagerBase
- type GitContext
- type GitManagerBaseImpl
- func (impl *GitManagerBaseImpl) Fetch(ctx GitContext, rootDir string) (response, errMsg string, err error)
- func (impl *GitManagerBaseImpl) ListBranch(ctx GitContext, rootDir string) (response, errMsg string, err error)
- func (impl *GitManagerBaseImpl) PullCli(ctx GitContext, rootDir string, branch string) (response, errMsg string, err error)
- type GoGitSDKManagerImpl
- func (impl *GoGitSDKManagerImpl) AddRepo(ctx GitContext, rootDir string, remoteUrl string, isBare bool) error
- func (impl GoGitSDKManagerImpl) CommitAndPush(ctx GitContext, repoRoot, commitMsg, name, emailId string) (string, error)
- func (impl GoGitSDKManagerImpl) Pull(ctx GitContext, repoRoot string) (err error)
Constants ¶
View Source
const Branch_Master = "master"
View Source
const GIT_ASK_PASS = "/git-ask-pass.sh"
View Source
const ORIGIN_MASTER = "origin/master"
View Source
const TLS_FOLDER = "/tmp/tls"
Variables ¶
This section is empty.
Functions ¶
func LocateGitRepo ¶
func ParseConfiguration ¶
func ParseConfiguration() (*configuration, error)
Types ¶
type BasicAuth ¶
type BasicAuth struct {
Username, Password string
}
BasicAuth represent a HTTP basic auth
func (*BasicAuth) ToBasicAuth ¶
type GitCliManagerImpl ¶
type GitCliManagerImpl struct {
*GitManagerBaseImpl
}
func (*GitCliManagerImpl) AddRepo ¶
func (impl *GitCliManagerImpl) AddRepo(ctx GitContext, rootDir string, remoteUrl string, isBare bool) error
func (*GitCliManagerImpl) CommitAndPush ¶
func (impl *GitCliManagerImpl) CommitAndPush(ctx GitContext, repoRoot, commitMsg, name, emailId string) (commitHash string, err error)
func (*GitCliManagerImpl) Pull ¶
func (impl *GitCliManagerImpl) Pull(ctx GitContext, repoRoot string) (err error)
type GitCommandManager ¶
type GitCommandManager interface { GitCommandManagerBase AddRepo(ctx GitContext, rootDir string, remoteUrl string, isBare bool) error CommitAndPush(ctx GitContext, repoRoot, commitMsg, name, emailId string) (string, error) Pull(ctx GitContext, repoRoot string) (err error) }
func NewGitCommandManager ¶
func NewGitCommandManager(logger *zap.SugaredLogger) GitCommandManager
type GitCommandManagerBase ¶
type GitCommandManagerBase interface { Fetch(ctx GitContext, rootDir string) (response, errMsg string, err error) ListBranch(ctx GitContext, rootDir string) (response, errMsg string, err error) PullCli(ctx GitContext, rootDir string, branch string) (response, errMsg string, err error) }
type GitContext ¶
type GitContext struct { context.Context CACert string TLSKey string TLSCertificate string TLSVerificationEnabled bool // contains filtered or unexported fields }
func BuildGitContext ¶
func BuildGitContext(ctx context.Context) GitContext
func (GitContext) WithCredentials ¶
func (gitCtx GitContext) WithCredentials(auth *BasicAuth) GitContext
func (GitContext) WithTLSData ¶ added in v0.7.2
func (gitCtx GitContext) WithTLSData(caData string, tlsKey string, tlsCertificate string, tlsVerificationEnabled bool) GitContext
func (GitContext) WithTimeout ¶
func (gitCtx GitContext) WithTimeout(timeoutSeconds int) (GitContext, context.CancelFunc)
type GitManagerBaseImpl ¶
type GitManagerBaseImpl struct {
// contains filtered or unexported fields
}
func (*GitManagerBaseImpl) Fetch ¶
func (impl *GitManagerBaseImpl) Fetch(ctx GitContext, rootDir string) (response, errMsg string, err error)
func (*GitManagerBaseImpl) ListBranch ¶
func (impl *GitManagerBaseImpl) ListBranch(ctx GitContext, rootDir string) (response, errMsg string, err error)
func (*GitManagerBaseImpl) PullCli ¶
func (impl *GitManagerBaseImpl) PullCli(ctx GitContext, rootDir string, branch string) (response, errMsg string, err error)
type GoGitSDKManagerImpl ¶
type GoGitSDKManagerImpl struct {
*GitManagerBaseImpl
}
func (*GoGitSDKManagerImpl) AddRepo ¶
func (impl *GoGitSDKManagerImpl) AddRepo(ctx GitContext, rootDir string, remoteUrl string, isBare bool) error
func (GoGitSDKManagerImpl) CommitAndPush ¶
func (impl GoGitSDKManagerImpl) CommitAndPush(ctx GitContext, repoRoot, commitMsg, name, emailId string) (string, error)
func (GoGitSDKManagerImpl) Pull ¶
func (impl GoGitSDKManagerImpl) Pull(ctx GitContext, repoRoot string) (err error)
Click to show internal directories.
Click to hide internal directories.