Versions in this module Expand all Collapse all v0 v0.6.3 Aug 15, 2019 Changes in this version + type APIClientFactory interface + GetBranchClient func() Branch + GetIssueClient func() Issue + GetJobClient func() Job + GetLintClient func() Lint + GetMergeRequestClient func() MergeRequest + GetMilestoneClient func() Milestone + GetNoteClient func() Note + GetPipelineClient func() Pipeline + GetProjectClient func() Project + GetProjectVariableClient func() ProjectVariable + GetRepositoryClient func() Repository + GetRunnerClient func() Runner + GetUserClient func() User + Init func(url, token string) error + func NewGitlabClientFactory(url, token string) (APIClientFactory, error) + type Branch interface + GetBranch func(project string, branch string) (*gitlab.Branch, error) + ListBranches func(project string, opt *gitlab.ListBranchesOptions) ([]*gitlab.Branch, error) + func NewBranchClient(client *gitlab.Client) Branch + type BranchClient struct + Client *gitlab.Client + func (c *BranchClient) GetBranch(project string, branch string) (*gitlab.Branch, error) + func (c *BranchClient) ListBranches(project string, opt *gitlab.ListBranchesOptions) ([]*gitlab.Branch, error) + type GitlabClientFactory struct + func (f *GitlabClientFactory) GetBranchClient() Branch + func (f *GitlabClientFactory) GetIssueClient() Issue + func (f *GitlabClientFactory) GetJobClient() Job + func (f *GitlabClientFactory) GetLintClient() Lint + func (f *GitlabClientFactory) GetMergeRequestClient() MergeRequest + func (f *GitlabClientFactory) GetMilestoneClient() Milestone + func (f *GitlabClientFactory) GetNoteClient() Note + func (f *GitlabClientFactory) GetPipelineClient() Pipeline + func (f *GitlabClientFactory) GetProjectClient() Project + func (f *GitlabClientFactory) GetProjectVariableClient() ProjectVariable + func (f *GitlabClientFactory) GetRepositoryClient() Repository + func (f *GitlabClientFactory) GetRunnerClient() Runner + func (f *GitlabClientFactory) GetUserClient() User + func (f *GitlabClientFactory) Init(url, token string) error + type Issue interface + CreateIssue func(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error) + GetAllProjectIssues func(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error) + GetIssue func(pid int, repositoryName string) (*gitlab.Issue, error) + GetProjectIssues func(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error) + UpdateIssue func(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error) + type IssueClient struct + Client *gitlab.Client + func NewIssueClient(client *gitlab.Client) *IssueClient + func (c *IssueClient) CreateIssue(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error) + func (c *IssueClient) GetAllProjectIssues(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error) + func (c *IssueClient) GetIssue(pid int, repositoryName string) (*gitlab.Issue, error) + func (c *IssueClient) GetProjectIssues(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error) + func (c *IssueClient) UpdateIssue(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error) + type Job interface + GetJob func(repositoryName string, jobID int) (*gitlab.Job, error) + GetProjectJobs func(opt *gitlab.ListJobsOptions, repositoryName string) ([]gitlab.Job, error) + GetTraceFile func(repositoryName string, jobID int) (io.Reader, error) + type JobClient struct + Client *gitlab.Client + func NewJobClient(client *gitlab.Client) *JobClient + func (c *JobClient) GetJob(repositoryName string, jobID int) (*gitlab.Job, error) + func (c *JobClient) GetProjectJobs(opt *gitlab.ListJobsOptions, repositoryName string) ([]gitlab.Job, error) + func (c *JobClient) GetTraceFile(repositoryName string, jobID int) (io.Reader, error) + type Lint interface + Lint func(content string) (*gitlab.LintResult, error) + type LintClient struct + Client *gitlab.Client + func NewLintClient(client *gitlab.Client) *LintClient + func (c *LintClient) Lint(content string) (*gitlab.LintResult, error) + type MergeRequest interface + CreateMergeRequest func(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error) + GetAllProjectMergeRequest func(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error) + GetMergeRequest func(pid int, repositoryName string) (*gitlab.MergeRequest, error) + GetProjectMargeRequest func(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error) + UpdateMergeRequest func(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error) + type MergeRequestClient struct + Client *gitlab.Client + func NewMergeRequestClient(client *gitlab.Client) *MergeRequestClient + func (l *MergeRequestClient) CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error) + func (l *MergeRequestClient) GetAllProjectMergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error) + func (l *MergeRequestClient) GetMergeRequest(pid int, repositoryName string) (*gitlab.MergeRequest, error) + func (l *MergeRequestClient) GetProjectMargeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error) + func (l *MergeRequestClient) UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error) + type Milestone interface + ListMilestones func(project string, opt *gitlab.ListMilestonesOptions) ([]*gitlab.Milestone, error) + type MilestoneClient struct + Client *gitlab.Client + func NewMilestoneClient(client *gitlab.Client) *MilestoneClient + func (c *MilestoneClient) ListMilestones(project string, opt *gitlab.ListMilestonesOptions) ([]*gitlab.Milestone, error) + type MockAPIClientFactory struct + MockGetBranchClient func() Branch + MockGetIssueClient func() Issue + MockGetJobClient func() Job + MockGetLintClient func() Lint + MockGetMergeRequestClient func() MergeRequest + MockGetMilestoneClient func() Milestone + MockGetNoteClient func() Note + MockGetPipelineClient func() Pipeline + MockGetProjectClient func() Project + MockGetProjectVariableClient func() ProjectVariable + MockGetRepositoryClient func() Repository + MockGetRunnerClient func() Runner + MockGetUserClient func() User + func (m *MockAPIClientFactory) GetBranchClient() Branch + func (m *MockAPIClientFactory) GetIssueClient() Issue + func (m *MockAPIClientFactory) GetJobClient() Job + func (m *MockAPIClientFactory) GetLintClient() Lint + func (m *MockAPIClientFactory) GetMergeRequestClient() MergeRequest + func (m *MockAPIClientFactory) GetMilestoneClient() Milestone + func (m *MockAPIClientFactory) GetNoteClient() Note + func (m *MockAPIClientFactory) GetPipelineClient() Pipeline + func (m *MockAPIClientFactory) GetProjectClient() Project + func (m *MockAPIClientFactory) GetProjectVariableClient() ProjectVariable + func (m *MockAPIClientFactory) GetRepositoryClient() Repository + func (m *MockAPIClientFactory) GetRunnerClient() Runner + func (m *MockAPIClientFactory) GetUserClient() User + func (m *MockAPIClientFactory) Init(url, token string) error + type MockBranchClient struct + MockGetBranch func(project string, branch string) (*gitlab.Branch, error) + MockListBranches func(project string, opt *gitlab.ListBranchesOptions) ([]*gitlab.Branch, error) + func (m *MockBranchClient) GetBranch(project string, branch string) (*gitlab.Branch, error) + func (m *MockBranchClient) ListBranches(project string, opt *gitlab.ListBranchesOptions) ([]*gitlab.Branch, error) + type MockLabIssueClient struct + MockCreateIssue func(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error) + MockGetAllProjectIssues func(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error) + MockGetIssue func(pid int, repositoryName string) (*gitlab.Issue, error) + MockGetProjectIssues func(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error) + MockUpdateIssue func(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error) + func (m *MockLabIssueClient) CreateIssue(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error) + func (m *MockLabIssueClient) GetAllProjectIssues(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error) + func (m *MockLabIssueClient) GetIssue(pid int, repositoryName string) (*gitlab.Issue, error) + func (m *MockLabIssueClient) GetProjectIssues(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error) + func (m *MockLabIssueClient) UpdateIssue(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error) + type MockLabJobClient struct + MockGetProjectJobs func(opt *gitlab.ListJobsOptions, repositoryName string) ([]*gitlab.Job, error) + func (m *MockLabJobClient) GetProjectJobs(opt *gitlab.ListJobsOptions, repositoryName string) ([]*gitlab.Job, error) + type MockLabMergeRequestClient struct + MockCreateMergeRequest func(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error) + MockGetAllProjectMergeRequest func(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error) + MockGetMergeRequest func(pid int, repositoryName string) (*gitlab.MergeRequest, error) + MockGetProjectMargeRequest func(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error) + MockUpdateMergeRequest func(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error) + func (m *MockLabMergeRequestClient) CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error) + func (m *MockLabMergeRequestClient) GetAllProjectMergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error) + func (m *MockLabMergeRequestClient) GetMergeRequest(pid int, repositoryName string) (*gitlab.MergeRequest, error) + func (m *MockLabMergeRequestClient) GetProjectMargeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error) + func (m *MockLabMergeRequestClient) UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error) + type MockLintClient struct + MockLint func(content string) (*gitlab.LintResult, error) + func (m *MockLintClient) Lint(content string) (*gitlab.LintResult, error) + type MockMilestoneClient struct + MockListMilestones func(project string, opt *gitlab.ListMilestonesOptions) ([]*gitlab.Milestone, error) + func (m *MockMilestoneClient) ListMilestones(project string, opt *gitlab.ListMilestonesOptions) ([]*gitlab.Milestone, error) + type MockNoteClient struct + MockGetIssueNotes func(repositoryName string, iid int, opt *gitlab.ListIssueNotesOptions) ([]*gitlab.Note, error) + MockGetMergeRequestNotes func(repositoryName string, iid int, opt *gitlab.ListMergeRequestNotesOptions) ([]*gitlab.Note, error) + func (m *MockNoteClient) GetIssueNotes(repositoryName string, iid int, opt *gitlab.ListIssueNotesOptions) ([]*gitlab.Note, error) + func (m *MockNoteClient) GetMergeRequestNotes(repositoryName string, iid int, opt *gitlab.ListMergeRequestNotesOptions) ([]*gitlab.Note, error) + type MockPipelineClient struct + MockProjectPipelineJobs func(repositoryName string, opt *gitlab.ListJobsOptions, pid int) ([]*gitlab.Job, error) + MockProjectPipelines func(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error) + func (m *MockPipelineClient) ProjectPipelineJobs(repositoryName string, opt *gitlab.ListJobsOptions, pid int) ([]*gitlab.Job, error) + func (m *MockPipelineClient) ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error) + type MockProjectClient struct + MockProjects func(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error) + func (m *MockProjectClient) Projects(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error) + type MockProjectVariableClient struct + MockCreateVariable func(repositoryName string, opt *gitlab.CreateVariableOptions) (*gitlab.ProjectVariable, error) + MockGetVariables func(repositoryName string) ([]*gitlab.ProjectVariable, error) + MockRemoveVariable func(repositoryName string, key string) error + MockUpdateVariable func(repositoryName string, key string, opt *gitlab.UpdateVariableOptions) (*gitlab.ProjectVariable, error) + func (c *MockProjectVariableClient) CreateVariable(repositoryName string, opt *gitlab.CreateVariableOptions) (*gitlab.ProjectVariable, error) + func (c *MockProjectVariableClient) GetVariables(repositoryName string) ([]*gitlab.ProjectVariable, error) + func (c *MockProjectVariableClient) RemoveVariable(repositoryName string, key string) error + func (c *MockProjectVariableClient) UpdateVariable(repositoryName string, key string, opt *gitlab.UpdateVariableOptions) (*gitlab.ProjectVariable, error) + type MockRepositoryClient struct + MockGetFile func(repositoryName string, filename string, opt *gitlab.GetRawFileOptions) (string, error) + MockGetTree func(repositoryName string, opt *gitlab.ListTreeOptions) ([]*gitlab.TreeNode, error) + func (m *MockRepositoryClient) GetFile(repositoryName string, filename string, opt *gitlab.GetRawFileOptions) (string, error) + func (m *MockRepositoryClient) GetTree(repositoryName string, opt *gitlab.ListTreeOptions) ([]*gitlab.TreeNode, error) + type MockUserClient struct + MockProjectUsers func(repositoryName string, opt *gitlab.ListProjectUserOptions) ([]*gitlab.ProjectUser, error) + MockUsers func(opt *gitlab.ListUsersOptions) ([]*gitlab.User, error) + func (m *MockUserClient) ProjectUsers(repositoryName string, opt *gitlab.ListProjectUserOptions) ([]*gitlab.ProjectUser, error) + func (m *MockUserClient) Users(opt *gitlab.ListUsersOptions) ([]*gitlab.User, error) + type Note interface + GetIssueNotes func(repositoryName string, iid int, opt *gitlab.ListIssueNotesOptions) ([]*gitlab.Note, error) + GetMergeRequestNotes func(repositoryName string, iid int, opt *gitlab.ListMergeRequestNotesOptions) ([]*gitlab.Note, error) + type NoteClient struct + Client *gitlab.Client + func NewNoteClient(client *gitlab.Client) *NoteClient + func (c *NoteClient) GetIssueNotes(repositoryName string, iid int, opt *gitlab.ListIssueNotesOptions) ([]*gitlab.Note, error) + func (c *NoteClient) GetMergeRequestNotes(repositoryName string, iid int, opt *gitlab.ListMergeRequestNotesOptions) ([]*gitlab.Note, error) + type Pipeline interface + ProjectPipelineJobs func(repositoryName string, opt *gitlab.ListJobsOptions, pid int) ([]*gitlab.Job, error) + ProjectPipelines func(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error) + func NewPipelineClient(client *gitlab.Client) Pipeline + type PipelineClient struct + Client *gitlab.Client + func (c *PipelineClient) ProjectPipelineJobs(repositoryName string, opt *gitlab.ListJobsOptions, pid int) ([]*gitlab.Job, error) + func (c *PipelineClient) ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error) + type Project interface + Projects func(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error) + type ProjectClient struct + Client *gitlab.Client + func NewProjectClient(client *gitlab.Client) *ProjectClient + func (c *ProjectClient) Projects(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error) + type ProjectVariable interface + CreateVariable func(repositoryName string, opt *gitlab.CreateVariableOptions) (*gitlab.ProjectVariable, error) + GetVariables func(repositoryName string) ([]*gitlab.ProjectVariable, error) + RemoveVariable func(repositoryName string, key string) error + UpdateVariable func(repositoryName string, key string, opt *gitlab.UpdateVariableOptions) (*gitlab.ProjectVariable, error) + func NewProjectVariableClient(client *gitlab.Client) ProjectVariable + type ProjectVariableClient struct + Client *gitlab.Client + func (c *ProjectVariableClient) CreateVariable(repositoryName string, opt *gitlab.CreateVariableOptions) (*gitlab.ProjectVariable, error) + func (c *ProjectVariableClient) GetVariables(repositoryName string) ([]*gitlab.ProjectVariable, error) + func (c *ProjectVariableClient) RemoveVariable(repositoryName string, key string) error + func (c *ProjectVariableClient) UpdateVariable(repositoryName string, key string, opt *gitlab.UpdateVariableOptions) (*gitlab.ProjectVariable, error) + type Repository interface + GetFile func(repositoryName string, filename string, opt *gitlab.GetRawFileOptions) (string, error) + GetTree func(repositoryName string, opt *gitlab.ListTreeOptions) ([]*gitlab.TreeNode, error) + func NewRepositoryClient(client *gitlab.Client) Repository + type RepositoryClient struct + Client *gitlab.Client + func (c *RepositoryClient) GetFile(repositoryName string, filename string, opt *gitlab.GetRawFileOptions) (string, error) + func (c *RepositoryClient) GetTree(repositoryName string, opt *gitlab.ListTreeOptions) ([]*gitlab.TreeNode, error) + type Runner interface + GetRunnerDetails func(id int) (*gitlab.RunnerDetails, error) + ListAllRunners func(opt *gitlab.ListRunnersOptions) ([]*gitlab.Runner, error) + ListProjectRunners func(pid string, opt *gitlab.ListProjectRunnersOptions) ([]*gitlab.Runner, error) + RemoveRunner func(iid int) error + func NewRunnerClient(client *gitlab.Client) Runner + type RunnerClient struct + Client *gitlab.Client + func (c *RunnerClient) GetRunnerDetails(id int) (*gitlab.RunnerDetails, error) + func (c *RunnerClient) ListAllRunners(opt *gitlab.ListRunnersOptions) ([]*gitlab.Runner, error) + func (c *RunnerClient) ListProjectRunners(pid string, opt *gitlab.ListProjectRunnersOptions) ([]*gitlab.Runner, error) + func (c *RunnerClient) RemoveRunner(iid int) error + type User interface + ProjectUsers func(repositoryName string, opt *gitlab.ListProjectUserOptions) ([]*gitlab.ProjectUser, error) + Users func(opt *gitlab.ListUsersOptions) ([]*gitlab.User, error) + type UserClient struct + Client *gitlab.Client + func NewUserClient(client *gitlab.Client) *UserClient + func (c *UserClient) ProjectUsers(repositoryName string, opt *gitlab.ListProjectUserOptions) ([]*gitlab.ProjectUser, error) + func (c *UserClient) Users(opt *gitlab.ListUsersOptions) ([]*gitlab.User, error)