Documentation
¶
Index ¶
- func ParceRepositoryFullName(webURL string) string
- type Client
- type GitlabProvider
- type LabClient
- func (l *LabClient) CreateIssue(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error)
- func (l *LabClient) CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error)
- func (l *LabClient) GetIssue(pid int, repositoryName string) (*gitlab.Issue, error)
- func (l *LabClient) GetMergeRequest(pid int, repositoryName string) (*gitlab.MergeRequest, error)
- func (l *LabClient) Issues(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error)
- func (l *LabClient) Lint(content string) (*gitlab.LintResult, error)
- func (l *LabClient) MergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
- func (l *LabClient) ProjectIssues(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error)
- func (l *LabClient) ProjectMergeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error)
- func (l *LabClient) ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error)
- func (l *LabClient) Projects(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error)
- func (l *LabClient) UpdateIssue(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error)
- func (l *LabClient) UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error)
- type MockLabClient
- func (m *MockLabClient) CreateIssue(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error)
- func (m *MockLabClient) CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error)
- func (m *MockLabClient) GetIssue(pid int, repositoryName string) (*gitlab.Issue, error)
- func (m *MockLabClient) GetMergeRequest(pid int, repositoryName string) (*gitlab.MergeRequest, error)
- func (m *MockLabClient) Issues(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error)
- func (m *MockLabClient) Lint(content string) (*gitlab.LintResult, error)
- func (m *MockLabClient) MergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
- func (m *MockLabClient) ProjectIssues(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error)
- func (m *MockLabClient) ProjectMergeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error)
- func (m *MockLabClient) ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error)
- func (m *MockLabClient) Projects(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error)
- func (m *MockLabClient) UpdateIssue(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error)
- func (m *MockLabClient) UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error)
- type MockProvider
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParceRepositoryFullName ¶
Types ¶
type Client ¶
type Client interface {
// Issue
GetIssue(pid int, repositoryName string) (*gitlab.Issue, error)
Issues(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error)
ProjectIssues(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error)
CreateIssue(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error)
UpdateIssue(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error)
// Merge Request
GetMergeRequest(pid int, repositoryName string) (*gitlab.MergeRequest, error)
MergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
ProjectMergeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error)
CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error)
UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error)
// Project
Projects(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error)
// Pipeline
ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error)
// Lint
Lint(content string) (*gitlab.LintResult, error)
}
type GitlabProvider ¶
func NewProvider ¶
func NewProvider(ui ui.Ui, gitClient git.Client, configManager *config.ConfigManager) *GitlabProvider
func (*GitlabProvider) GetClient ¶
func (p *GitlabProvider) GetClient(remote *git.RemoteInfo) (Client, error)
func (*GitlabProvider) GetCurrentRemote ¶
func (p *GitlabProvider) GetCurrentRemote() (*git.RemoteInfo, error)
func (*GitlabProvider) GetSpecificRemote ¶
func (p *GitlabProvider) GetSpecificRemote(namespace, project string) *git.RemoteInfo
func (*GitlabProvider) Init ¶
func (p *GitlabProvider) Init() error
type LabClient ¶
func NewLabClient ¶
func (*LabClient) CreateIssue ¶
func (*LabClient) CreateMergeRequest ¶
func (l *LabClient) CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error)
func (*LabClient) GetMergeRequest ¶ added in v0.2.0
func (*LabClient) Lint ¶ added in v0.2.0
func (l *LabClient) Lint(content string) (*gitlab.LintResult, error)
func (*LabClient) MergeRequest ¶
func (l *LabClient) MergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
func (*LabClient) ProjectIssues ¶
func (*LabClient) ProjectMergeRequest ¶
func (l *LabClient) ProjectMergeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error)
func (*LabClient) ProjectPipelines ¶ added in v0.2.0
func (l *LabClient) ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error)
func (*LabClient) UpdateIssue ¶ added in v0.2.0
func (*LabClient) UpdateMergeRequest ¶ added in v0.2.0
func (l *LabClient) UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error)
type MockLabClient ¶
type MockLabClient struct {
Client
// Issue
MockGetIssue func(pid int, repositoryName string) (*gitlab.Issue, error)
MockIssues func(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error)
MockProjectIssues func(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error)
MockCreateIssue func(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error)
MockUpdateIssue func(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error)
// Merge Request
MockGetMergeRequest func(pid int, repositoryName string) (*gitlab.MergeRequest, error)
MockMergeRequest func(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
MockProjectMergeRequest func(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error)
MockCreateMergeRequest func(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error)
MockUpdateMergeRequest func(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error)
// Project
MockProjects func(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error)
// Pipeline
MockProjectPipelines func(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error)
// Lint
MockLint func(content string) (*gitlab.LintResult, error)
}
func (*MockLabClient) CreateIssue ¶
func (m *MockLabClient) CreateIssue(opt *gitlab.CreateIssueOptions, repositoryName string) (*gitlab.Issue, error)
func (*MockLabClient) CreateMergeRequest ¶
func (m *MockLabClient) CreateMergeRequest(opt *gitlab.CreateMergeRequestOptions, repositoryName string) (*gitlab.MergeRequest, error)
func (*MockLabClient) GetMergeRequest ¶ added in v0.2.0
func (m *MockLabClient) GetMergeRequest(pid int, repositoryName string) (*gitlab.MergeRequest, error)
func (*MockLabClient) Issues ¶
func (m *MockLabClient) Issues(opt *gitlab.ListIssuesOptions) ([]*gitlab.Issue, error)
func (*MockLabClient) Lint ¶ added in v0.2.0
func (m *MockLabClient) Lint(content string) (*gitlab.LintResult, error)
func (*MockLabClient) MergeRequest ¶
func (m *MockLabClient) MergeRequest(opt *gitlab.ListMergeRequestsOptions) ([]*gitlab.MergeRequest, error)
func (*MockLabClient) ProjectIssues ¶
func (m *MockLabClient) ProjectIssues(opt *gitlab.ListProjectIssuesOptions, repositoryName string) ([]*gitlab.Issue, error)
func (*MockLabClient) ProjectMergeRequest ¶
func (m *MockLabClient) ProjectMergeRequest(opt *gitlab.ListProjectMergeRequestsOptions, repositoryName string) ([]*gitlab.MergeRequest, error)
func (*MockLabClient) ProjectPipelines ¶ added in v0.2.0
func (m *MockLabClient) ProjectPipelines(repositoryName string, opt *gitlab.ListProjectPipelinesOptions) (gitlab.PipelineList, error)
func (*MockLabClient) Projects ¶ added in v0.2.0
func (m *MockLabClient) Projects(opt *gitlab.ListProjectsOptions) ([]*gitlab.Project, error)
func (*MockLabClient) UpdateIssue ¶ added in v0.2.0
func (m *MockLabClient) UpdateIssue(opt *gitlab.UpdateIssueOptions, pid int, repositoryName string) (*gitlab.Issue, error)
func (*MockLabClient) UpdateMergeRequest ¶ added in v0.2.0
func (m *MockLabClient) UpdateMergeRequest(opt *gitlab.UpdateMergeRequestOptions, pid int, repositoryName string) (*gitlab.MergeRequest, error)
type MockProvider ¶
type MockProvider struct {
Provider
MockInit func() error
MockGetSpecificRemote func(namespace, project string) *git.RemoteInfo
MockGetCurrentRemote func() (*git.RemoteInfo, error)
MockGetClient func(remote *git.RemoteInfo) (Client, error)
}
func (*MockProvider) GetClient ¶
func (m *MockProvider) GetClient(remote *git.RemoteInfo) (Client, error)
func (*MockProvider) GetCurrentRemote ¶
func (m *MockProvider) GetCurrentRemote() (*git.RemoteInfo, error)
func (*MockProvider) GetSpecificRemote ¶
func (m *MockProvider) GetSpecificRemote(namespace, project string) *git.RemoteInfo
func (*MockProvider) Init ¶
func (m *MockProvider) Init() error
type Provider ¶
type Provider interface {
Init() error
GetSpecificRemote(namespace, project string) *git.RemoteInfo
GetCurrentRemote() (*git.RemoteInfo, error)
GetClient(remote *git.RemoteInfo) (Client, error)
}
Click to show internal directories.
Click to hide internal directories.