Documentation
¶
Index ¶
- Constants
- Variables
- func NewBasicAuth(user, password string) (*basicAuth, error)
- func NewDefaultActionContext(logger log.Logger, dryRun bool) gitActionContext
- func NewGetAllCommits(projectID string) actions.Action
- func NewGetCommitsBetween(projectID, start, end string) actions.Action
- func NewGetCommitsBetweenForBranch(projectID, branch, start, end string) actions.Action
- func NewGetCommitsBetweenForSubproject(projectID, subprojectName, start, end string) actions.Action
- func NewGetCommitsBetweenForSubprojectOnBranch(projectID, subprojectName, branch, start, end string) actions.Action
- func NewGetTagsAction(projectID string) actions.Action
- func NewGetTagsForBranchAction(projectID, branch string) actions.Action
- func NewGetTagsForSubProjectAction(projectID, subprojectName string) actions.Action
- func NewGetTagsForSubprojectOnBranchAction(projectID, subprojectName, branch string) actions.Action
- func NewNetRCAuth(netrcFile, domain string) (n *netRCAuth, err error)
- func NewNoAuth() (*noAuth, error)
- func NewSortTagsAction(reverse bool) actions.Action
- type Authenticator
- type Commit
- type Commits
- type GitAuth
- type GitClient
- type GitlabClient
- type Tag
- type Tags
Constants ¶
const ZeroHash = "0000000000000000000000000000000000000000"
ZeroHash is the null hash for git
Variables ¶
var (
DefaultAPIVersion = "v4"
)
Functions ¶
func NewBasicAuth ¶
func NewDefaultActionContext ¶
NewDefaultActionContext generate a default action context with a nil return for Data()
func NewGetAllCommits ¶
func NewGetAllCommits(projectID string) actions.Action
func NewGetCommitsBetween ¶
func NewGetCommitsBetween(projectID, start, end string) actions.Action
func NewGetCommitsBetweenForBranch ¶
func NewGetCommitsBetweenForBranch(projectID, branch, start, end string) actions.Action
func NewGetCommitsBetweenForSubproject ¶
func NewGetCommitsBetweenForSubproject(projectID, subprojectName, start, end string) actions.Action
func NewGetCommitsBetweenForSubprojectOnBranch ¶
func NewGetCommitsBetweenForSubprojectOnBranch(projectID, subprojectName, branch, start, end string) actions.Action
func NewGetTagsAction ¶
func NewGetTagsAction(projectID string) actions.Action
NewGetTagsAction get all tags for a gitlab project
func NewGetTagsForBranchAction ¶
func NewGetTagsForBranchAction(projectID, branch string) actions.Action
NewGetTagsForBranchAction get tags for a branch, this is only useful if you are tagging prereleases eg v1.2.3-<branchName>.<timestamp>
func NewGetTagsForSubProjectAction ¶
func NewGetTagsForSubProjectAction(projectID, subprojectName string) actions.Action
NewGetTagsForSubProjectAction get tags for a subproject when using a mono repo where you tag each subproject as <subprojectName>/<subProjectSemver> (eg projA/v1.2.3)
func NewGetTagsForSubprojectOnBranchAction ¶
func NewGetTagsForSubprojectOnBranchAction(projectID, subprojectName, branch string) actions.Action
NewGetTagsForSubprojectOnBranchAction get tags for a branch, this is only useful if you are tagging prereleases and when using a mono repo where you tag each subproject as <subprojectName>/<subProjectSemver>-<branchName>.<timestamp> (eg projA/v1.2.3-featureA.20200523222454)
func NewNetRCAuth ¶
func NewSortTagsAction ¶
NewSortTagsAction get all tags for a gitlab project
Types ¶
type Authenticator ¶
Authenticator Auth-s the initial connection then allows validation at any point of the stream
type GitClient ¶
type GitClient interface {
WithDomain(string) GitClient
WithHTTPClient(*http.Client) GitClient
WithAuth(Authenticator) GitClient
}
func NewGitlabClient ¶
func NewGitlabClient() GitClient
NewGitlabClient return a gitlab GitlabClient that uses the local .netrc for the specified domain
type GitlabClient ¶
type Tags ¶
type Tags []*Tag
func (Tags) Len ¶
Len return the number of messages in the slice required to implement sortable interface https://golang.org/pkg/sort/#Interface
func (Tags) Less ¶
Less reports whether the element with index i should sort before the element with index j. required to implement sortable interface https://golang.org/pkg/sort/#Interface
func (Tags) Swap ¶
Swap swaps the elements with indexes i and j. required to implement sortable interface https://golang.org/pkg/sort/#Interface