Documentation ¶
Overview ¶
Package repo provides handling git repository.
Index ¶
- func GetRepoNameFromUrl(url string) string
- type FileEntry
- type GitFile
- type GitFileLocation
- type GitRepo
- func (r *GitRepo) DetectBlobContentType(blob string) (string, []byte, error)
- func (r *GitRepo) ExistsInCommit(commitId string, filePath string, blobId string) (bool, error)
- func (r *GitRepo) FetchAll() error
- func (r *GitRepo) FilterBlob(blobId string, encoding string, filter func(line string) bool, before int, ...) []util.TextPreview
- func (r *GitRepo) GetBlobContent(blob string) ([]byte, error)
- func (r *GitRepo) GetBlobSize(blob string) (int64, error)
- func (r *GitRepo) GetBranchCommitID(name string) (string, error)
- func (r *GitRepo) GetBranches() ([]string, error)
- func (r *GitRepo) GetContainsBranches(commitId string) ([]string, error)
- func (r *GitRepo) GetDiffEntriesIterator(from string, to string, callback func(fileEntry FileEntry, status string)) error
- func (r *GitRepo) GetDiffFileEntriesMap(branchesMap map[string][2]string, tagsMap map[string][2]string) (map[string]GitFile, map[string]GitFile, error)
- func (r *GitRepo) GetDiffList(from string, to string) ([]FileEntry, []FileEntry, error)
- func (r *GitRepo) GetFileEntries(commitId string) ([]FileEntry, error)
- func (r *GitRepo) GetFileEntriesIterator(commitId string, callback func(fileEntry FileEntry)) error
- func (r *GitRepo) GetFileEntriesMap(branchesMap map[string]string, tagsMap map[string]string) (map[string]GitFile, error)
- func (r *GitRepo) GetFileEntriesMapByRefs(includeBranches []string, includeTags []string, excludeBranches []string, ...) (map[string]GitFile, error)
- func (r *GitRepo) GetLatestCommitIdsMap() (config.BrancheIndexedMap, config.TagIndexedMap, error)
- func (r *GitRepo) GetTags() ([]string, error)
- type GitRepoReader
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepoNameFromUrl ¶
Types ¶
type GitFile ¶ added in v0.4.0
type GitFile struct { Locations map[string]GitFileLocation Size int64 }
type GitFileLocation ¶ added in v0.4.0
type GitRepo ¶
type GitRepo struct { Organization string Project string Repository string Path string Config *config.Config // contains filtered or unexported fields }
func NewGitRepo ¶
func (*GitRepo) DetectBlobContentType ¶
func (*GitRepo) ExistsInCommit ¶ added in v0.4.0
func (*GitRepo) FilterBlob ¶
func (*GitRepo) GetBranchCommitID ¶
func (*GitRepo) GetBranches ¶
func (*GitRepo) GetContainsBranches ¶ added in v0.4.0
func (*GitRepo) GetDiffEntriesIterator ¶
func (*GitRepo) GetDiffFileEntriesMap ¶ added in v0.4.0
func (*GitRepo) GetDiffList ¶
func (*GitRepo) GetFileEntries ¶
func (*GitRepo) GetFileEntriesIterator ¶
func (*GitRepo) GetFileEntriesMap ¶ added in v0.4.0
func (r *GitRepo) GetFileEntriesMap(branchesMap map[string]string, tagsMap map[string]string) (map[string]GitFile, error)
GetFileEntriesMap collects all file entries on the specified branches and tags. It returns as GitFiles map with the blob key. The branchesMap's key is branch name, and the value is commitId. The tagsMap's key is tag name, and the value is commitId.
func (*GitRepo) GetFileEntriesMapByRefs ¶ added in v0.4.0
func (*GitRepo) GetLatestCommitIdsMap ¶ added in v0.4.0
func (r *GitRepo) GetLatestCommitIdsMap() (config.BrancheIndexedMap, config.TagIndexedMap, error)
type GitRepoReader ¶
type GitRepoReader struct {
// contains filtered or unexported fields
}
func NewGitRepoReader ¶
func NewGitRepoReader(config *config.Config) *GitRepoReader
func (*GitRepoReader) CloneGitRepo ¶
func (*GitRepoReader) GetGitRepo ¶
Click to show internal directories.
Click to hide internal directories.