Documentation
¶
Index ¶
- Variables
- type GitClient
- func (g *GitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)
- func (g *GitClient) Cleanup(clonePath string)
- 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)
- func (g *GitClient) ListFiles(clonePath string, extensions []string) (map[string][]byte, error)
- type GitCommand
- type LocalGitClient
- func (g *LocalGitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)
- func (g *LocalGitClient) Cleanup(clonePath string)
- 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)
- func (g *LocalGitClient) ListFiles(clonePath string, extensions []string) (map[string][]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRemoteRefNotFound = errors.New("remote ref not found")
View Source
var ErrRepoNotReachable = errors.New("repo or ref not reachable")
Functions ¶
This section is empty.
Types ¶
type GitClient ¶
type GitClient struct {
// contains filtered or unexported fields
}
GitClient implements git operations using go-git with in-memory storage.
func NewGitClient ¶
func NewGitClient(_ *GitCommand) *GitClient
func (*GitClient) BlobMatches ¶ added in v0.17.0
func (*GitClient) GetRemoteOriginURL ¶
func (*GitClient) GetRepoHeadBranchName ¶
func (*GitClient) GetUniqWorkflowsBranches ¶ added in v0.17.0
func (*GitClient) LastCommitDate ¶
type GitCommand ¶
type GitCommand interface{}
GitCommand is kept for API compatibility but is unused by the go-git implementation.
type LocalGitClient ¶ added in v0.9.12
type LocalGitClient struct {
GitClient *GitClient
}
LocalGitClient wraps go-git for local repository operations.
func NewLocalGitClient ¶ added in v0.9.12
func NewLocalGitClient(_ *GitCommand) *LocalGitClient
func (*LocalGitClient) BlobMatches ¶ added in v0.17.0
func (*LocalGitClient) Cleanup ¶ added in v1.1.0
func (g *LocalGitClient) Cleanup(clonePath string)
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.