Documentation ¶
Index ¶
- Constants
- type Client
- type GitLab
- func (g *GitLab) Branches(owner, repo string) ([]*gitlab.Branch, error)
- func (g *GitLab) Client() Client
- func (g *GitLab) GetRepository(owner, repo string) (*gitlab.Project, error)
- func (g *GitLab) ListTags(owner, repo string) ([]*gitlab.Tag, error)
- func (g *GitLab) Releases(owner, repo string) ([]*gitlab.Release, error)
- func (g *GitLab) SetClient(client Client)
Constants ¶
View Source
const ( // TokenEnvKey is the default GitLab token environment variable key TokenEnvKey = "GITLAB_TOKEN" // PrivateTokenEnvKey is the private GitLab token environment variable key PrivateTokenEnvKey = "GITLAB_PRIVATE_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ListProjects( opt *gitlab.ListProjectsOptions, ) ([]*gitlab.Project, *gitlab.Response, error) ListReleases( string, string, *gitlab.ListReleasesOptions, ) ([]*gitlab.Release, *gitlab.Response, error) ListBranches( string, string, *gitlab.ListBranchesOptions, ) ([]*gitlab.Branch, *gitlab.Response, error) ListTags( string, string, *gitlab.ListTagsOptions, ) ([]*gitlab.Tag, *gitlab.Response, error) }
type GitLab ¶
type GitLab struct {
// contains filtered or unexported fields
}
GitLab is a wrapper around GitLab related functionality
func New ¶
func New() *GitLab
New creates a new default GitLab client. Tokens set via the $GITLAB_TOKEN environment variable will result in an authenticated client. If the $GITLAB_TOKEN is not set, then it will return a nil client. GitLab requires autenticated users.
func NewPrivate ¶
func (*GitLab) GetRepository ¶ added in v0.3.1
GetRepository returns the Repository information for the provided `owner` and `repo`.
func (*GitLab) ListTags ¶ added in v0.3.1
ListTags returns a list of GitLab tags for the provided `owner` and `repo`.
Click to show internal directories.
Click to hide internal directories.