Documentation
¶
Index ¶
- Variables
- func IsGitRepoUnauthorizedOrNotReachable(err error) bool
- type ExecGitCommand
- type GitClient
- func (g *GitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)
- func (g *GitClient) Clone(ctx context.Context, clonePath string, url string, token string, ref string) error
- func (g *GitClient) CommitSHA(clonePath string) (string, error)
- func (g *GitClient) FetchCone(ctx context.Context, clonePath, url, token, ref string, cone string) error
- func (g *GitClient) GetRemoteOriginURL(ctx context.Context, repoPath string) (string, error)
- func (g *GitClient) GetRepoHeadBranchName(ctx context.Context, repoPath string) (string, error)
- func (g *GitClient) GetUniqWorkflowsBranches(ctx context.Context, clonePath string) (map[string][]models.BranchInfo, error)
- func (g *GitClient) LastCommitDate(ctx context.Context, clonePath string) (time.Time, error)
- type GitCommand
- type GitCommandError
- type GitError
- type GitExitError
- type GitNotFoundError
- type LocalGitClient
- func (g *LocalGitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)
- func (g *LocalGitClient) Clone(ctx context.Context, clonePath string, url string, token string, ref string) error
- func (g *LocalGitClient) CommitSHA(clonePath string) (string, error)
- func (g *LocalGitClient) FetchCone(ctx context.Context, clonePath, url, token, ref, cone string) error
- func (g *LocalGitClient) GetRemoteOriginURL(ctx context.Context, repoPath string) (string, error)
- func (g *LocalGitClient) GetRepoHeadBranchName(ctx context.Context, repoPath string) (string, error)
- func (g *LocalGitClient) GetUniqWorkflowsBranches(ctx context.Context, clonePath string) (map[string][]models.BranchInfo, error)
- func (g *LocalGitClient) LastCommitDate(ctx context.Context, clonePath string) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRepoNotReachable = errors.New("repo or ref not reachable")
Functions ¶
func IsGitRepoUnauthorizedOrNotReachable ¶ added in v0.18.0
Types ¶
type ExecGitCommand ¶
type ExecGitCommand struct{}
type GitClient ¶
type GitClient struct {
Command GitCommand
}
func NewGitClient ¶
func NewGitClient(command *GitCommand) *GitClient
func (*GitClient) BlobMatches ¶ added in v0.17.0
func (g *GitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)
blobMatches returns true if the blob (by its SHA) matches the given regex.
func (*GitClient) GetRemoteOriginURL ¶
func (*GitClient) GetRepoHeadBranchName ¶
func (*GitClient) GetUniqWorkflowsBranches ¶ added in v0.17.0
type GitCommand ¶
type GitCommandError ¶ added in v0.15.2
func (*GitCommandError) Command ¶ added in v0.15.2
func (e *GitCommandError) Command() string
func (*GitCommandError) Error ¶ added in v0.15.2
func (e *GitCommandError) Error() string
func (*GitCommandError) Unwrap ¶ added in v0.15.2
func (e *GitCommandError) Unwrap() error
type GitExitError ¶ added in v0.15.2
func (*GitExitError) Command ¶ added in v0.15.2
func (e *GitExitError) Command() string
func (*GitExitError) Error ¶ added in v0.15.2
func (e *GitExitError) Error() string
func (*GitExitError) Unwrap ¶ added in v0.15.2
func (e *GitExitError) Unwrap() error
type GitNotFoundError ¶ added in v0.15.2
type GitNotFoundError struct {
CommandStr string
}
func (*GitNotFoundError) Command ¶ added in v0.15.2
func (e *GitNotFoundError) Command() string
func (*GitNotFoundError) Error ¶ added in v0.15.2
func (e *GitNotFoundError) Error() string
type LocalGitClient ¶ added in v0.9.12
type LocalGitClient struct {
GitClient *GitClient
}
func NewLocalGitClient ¶ added in v0.9.12
func NewLocalGitClient(command *GitCommand) *LocalGitClient
func (*LocalGitClient) BlobMatches ¶ added in v0.17.0
func (*LocalGitClient) CommitSHA ¶ added in v0.9.12
func (g *LocalGitClient) CommitSHA(clonePath string) (string, error)
func (*LocalGitClient) FetchCone ¶ added in v0.17.0
func (g *LocalGitClient) FetchCone(ctx context.Context, clonePath, url, token, ref, cone string) error
func (*LocalGitClient) GetRemoteOriginURL ¶ added in v0.9.12
func (*LocalGitClient) GetRepoHeadBranchName ¶ added in v0.9.12
func (*LocalGitClient) GetUniqWorkflowsBranches ¶ added in v0.17.0
func (g *LocalGitClient) GetUniqWorkflowsBranches(ctx context.Context, clonePath string) (map[string][]models.BranchInfo, error)
func (*LocalGitClient) LastCommitDate ¶ added in v0.9.12
Click to show internal directories.
Click to hide internal directories.