Documentation
¶
Index ¶
- type Client
- func (c *Client) CloneRepository(ctx context.Context, repoURL string) (*git.Repository, error)
- func (c *Client) FilterTags(tags []string, pattern string) []string
- func (c *Client) FilterTagsWithPrefix(tags []string, prefix string) []string
- func (c *Client) GetCommitFromClone(ctx context.Context, repoURL, commitSHA string) (*object.Commit, error)
- func (c *Client) GetCommitInfo(ctx context.Context, repoURL, commitSHA string) (*CommitInfo, error)
- func (c *Client) GetCommitSHAForTag(ctx context.Context, repoURL, tag string) (string, error)
- func (c *Client) GetDefaultBranch(ctx context.Context, repoURL string) (string, error)
- func (c *Client) GetFirstValidTag(ctx context.Context, repoURL string, filter types.VersionFilterFunc) (string, error)
- func (c *Client) GetLatestTag(ctx context.Context, repoURL string) (string, error)
- func (c *Client) GetLatestTagWithFilter(ctx context.Context, repoURL, filter string) (string, error)
- func (c *Client) GetTagInfo(ctx context.Context, repoURL, tagName string) (*TagInfo, error)
- func (c *Client) GetTags(ctx context.Context, repoURL string) ([]string, error)
- func (c *Client) GetTagsWithFilter(ctx context.Context, repoURL, filterPrefix, filterContains string) ([]string, error)
- func (c *Client) ListBranches(ctx context.Context, repoURL string) ([]string, error)
- func (c *Client) VerifyCommitExists(ctx context.Context, repoURL, commitSHA string) (bool, error)
- type CommitInfo
- type Repository
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct{}
Client represents a Git client using go-git
func (*Client) CloneRepository ¶
CloneRepository clones a repository to memory for more advanced operations
func (*Client) FilterTags ¶
FilterTags filters tags based on a pattern
func (*Client) FilterTagsWithPrefix ¶
FilterTagsWithPrefix filters tags that start with a specific prefix
func (*Client) GetCommitFromClone ¶
func (c *Client) GetCommitFromClone(ctx context.Context, repoURL, commitSHA string) (*object.Commit, error)
GetCommitFromClone gets detailed commit information by cloning the repository
func (*Client) GetCommitInfo ¶
GetCommitInfo gets information about a commit
func (*Client) GetCommitSHAForTag ¶
GetCommitSHAForTag gets the commit SHA for a specific tag
func (*Client) GetDefaultBranch ¶
GetDefaultBranch gets the default branch of the repository
func (*Client) GetFirstValidTag ¶
func (c *Client) GetFirstValidTag(ctx context.Context, repoURL string, filter types.VersionFilterFunc) (string, error)
GetFirstValidTag finds the first tag that passes all filtering criteria
func (*Client) GetLatestTag ¶
GetLatestTag returns the latest tag from a Git repository
func (*Client) GetLatestTagWithFilter ¶
func (c *Client) GetLatestTagWithFilter(ctx context.Context, repoURL, filter string) (string, error)
GetLatestTagWithFilter returns the latest tag that matches the filter
func (*Client) GetTagInfo ¶
GetTagInfo gets detailed information about a tag
func (*Client) GetTagsWithFilter ¶
func (c *Client) GetTagsWithFilter(ctx context.Context, repoURL, filterPrefix, filterContains string) ([]string, error)
GetTagsWithFilter returns filtered tags from a Git repository with early termination
func (*Client) ListBranches ¶
ListBranches lists all branches in the repository
type CommitInfo ¶
CommitInfo represents information about a Git commit
type Repository ¶
Repository represents a Git repository