gitops

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 (g *GitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)

func (*GitClient) Cleanup added in v1.1.0

func (g *GitClient) Cleanup(clonePath string)

func (*GitClient) Clone

func (g *GitClient) Clone(ctx context.Context, clonePath string, url string, token string, ref string) error

func (*GitClient) CommitSHA

func (g *GitClient) CommitSHA(clonePath string) (string, error)

func (*GitClient) FetchCone added in v0.17.0

func (g *GitClient) FetchCone(ctx context.Context, clonePath, url, token, ref string, cone string) error

func (*GitClient) GetRemoteOriginURL

func (g *GitClient) GetRemoteOriginURL(ctx context.Context, repoPath string) (string, error)

func (*GitClient) GetRepoHeadBranchName

func (g *GitClient) GetRepoHeadBranchName(ctx context.Context, repoPath string) (string, error)

func (*GitClient) GetUniqWorkflowsBranches added in v0.17.0

func (g *GitClient) GetUniqWorkflowsBranches(ctx context.Context, clonePath string) (map[string][]models.BranchInfo, error)

func (*GitClient) LastCommitDate

func (g *GitClient) LastCommitDate(ctx context.Context, clonePath string) (time.Time, error)

func (*GitClient) ListFiles added in v1.1.0

func (g *GitClient) ListFiles(clonePath string, extensions []string) (map[string][]byte, error)

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 (g *LocalGitClient) BlobMatches(ctx context.Context, clonePath, blobSha string, re *regexp.Regexp) (bool, []byte, error)

func (*LocalGitClient) Cleanup added in v1.1.0

func (g *LocalGitClient) Cleanup(clonePath string)

func (*LocalGitClient) Clone added in v0.9.12

func (g *LocalGitClient) Clone(ctx context.Context, clonePath string, url string, token string, ref string) error

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 (g *LocalGitClient) GetRemoteOriginURL(ctx context.Context, repoPath string) (string, error)

func (*LocalGitClient) GetRepoHeadBranchName added in v0.9.12

func (g *LocalGitClient) GetRepoHeadBranchName(ctx context.Context, repoPath string) (string, error)

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

func (g *LocalGitClient) LastCommitDate(ctx context.Context, clonePath string) (time.Time, error)

func (*LocalGitClient) ListFiles added in v1.1.0

func (g *LocalGitClient) ListFiles(clonePath string, extensions []string) (map[string][]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL