Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Check will verify that the repository type is supported by this implementation Check() bool // VCSType returns the version control system type (git, ...) VCSType() string // VCSRemote returns the primary remote (server) VCSRemote() string // VCSHostServer returns the host of the primary remote VCSHostServer(remote string) string // VCSHostType returns the type of the host VCSHostType(server string) string // VCSRefToInternalRef converts the reference to the internal notation used by the VCS VCSRefToInternalRef(ref VCSRef) string // VCSHead returns the current head of the repository (refType and refName) VCSHead() (ref VCSRef, err error) // GetTags returns all tags GetTags() (tags []VCSRef) // GetTagsByHash returns all tags of the given commit hash GetTagsByHash(hash string) []VCSRef // FindCommitByHash will query a commit by hash, additionally includes changes made by the commit FindCommitByHash(hash string, includeChanges bool) (Commit, error) // FindCommitsBetween finds all commits between two references (might need to use GetReference to get the proper ref name) FindCommitsBetween(from *VCSRef, to *VCSRef, includeChanges bool, limit int) ([]Commit, error) // FindLatestRelease finds the latest release starting from the current repo HEAD FindLatestRelease(stable bool) (VCSRelease, error) }
Client is the common interface for all vcs repo implementations
type Commit ¶
type Commit struct { ShortHash string `json:"hash_short"` Hash string `json:"hash"` Message string `json:"message"` Description string `json:"description"` Author CommitAuthor `json:"author"` Committer CommitAuthor `json:"committer"` Changes []CommitChange `json:"changes,omitempty"` Tags []VCSRef `json:"tags"` AuthoredAt time.Time `json:"authored_at"` CommittedAt time.Time `json:"committed_at"` Context map[string]string `json:"context,omitempty"` }
type CommitAuthor ¶
type CommitChange ¶
type CommitChange struct { Type string `json:"type"` FileFrom CommitFile `json:"file_from"` FileTo CommitFile `json:"file_to"` Patch string `json:"patch"` }
type CommitFile ¶
Click to show internal directories.
Click to hide internal directories.