Documentation
¶
Index ¶
- type GitHelper
- func (g *GitHelper) CompareRefs(oldRef, newRef, packagePath string, extractor *contract.Extractor) (*contract.ContractDiff, error)
- func (g *GitHelper) ExtractContractFromRef(ref, packagePath string, extractor *contract.Extractor) (*contract.Contract, error)
- func (g *GitHelper) FindLatestVersionTag(pattern string) (string, error)
- func (g *GitHelper) GetAvailableRefs() ([]string, error)
- func (g *GitHelper) GetCurrentRef() (string, error)
- func (g *GitHelper) IsGitRepository() bool
- func (g *GitHelper) ListVersionTags(pattern string) ([]TagInfo, error)
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHelper ¶
type GitHelper struct {
RepoPath string
}
GitHelper provides functionality to work with git repositories for contract extraction
func NewGitHelper ¶
NewGitHelper creates a new GitHelper for the given repository path
func (*GitHelper) CompareRefs ¶
func (g *GitHelper) CompareRefs(oldRef, newRef, packagePath string, extractor *contract.Extractor) (*contract.ContractDiff, error)
CompareRefs extracts contracts from two git references and compares them
func (*GitHelper) ExtractContractFromRef ¶
func (g *GitHelper) ExtractContractFromRef(ref, packagePath string, extractor *contract.Extractor) (*contract.Contract, error)
ExtractContractFromRef extracts API contract from a specific git reference
func (*GitHelper) FindLatestVersionTag ¶
FindLatestVersionTag finds the latest version tag matching the pattern
func (*GitHelper) GetAvailableRefs ¶
GetAvailableRefs returns a list of available refs (branches and tags)
func (*GitHelper) GetCurrentRef ¶
GetCurrentRef gets the current git reference (branch or tag)
func (*GitHelper) IsGitRepository ¶
IsGitRepository checks if the given path is inside a git repository
Click to show internal directories.
Click to hide internal directories.