gitlab

package
v0.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gitlab is a generated GoMock package.

Index

Constants

View Source
const (
	SSLDirectory = "/opt/nautes/cert"
)

Variables

This section is empty.

Functions

func GetCertificate

func GetCertificate(addr string) (string, error)

Types

type GitlabClient

type GitlabClient struct {
	// contains filtered or unexported fields
}

func (*GitlabClient) AddDeployKey

func (g *GitlabClient) AddDeployKey(pid interface{}, opt *gitlab.AddDeployKeyOptions, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)

func (*GitlabClient) CreateGroup

func (g *GitlabClient) CreateGroup(opt *gitlab.CreateGroupOptions, options ...gitlab.RequestOptionFunc) (group *gitlab.Group, res *gitlab.Response, err error)

func (*GitlabClient) CreateProject

func (g *GitlabClient) CreateProject(opt *gitlab.CreateProjectOptions, options ...gitlab.RequestOptionFunc) (project *gitlab.Project, res *gitlab.Response, err error)

func (*GitlabClient) CreateProjectAccessToken

func (g *GitlabClient) CreateProjectAccessToken(pid interface{}, opt *gitlab.CreateProjectAccessTokenOptions, options ...gitlab.RequestOptionFunc) (token *gitlab.ProjectAccessToken, res *gitlab.Response, err error)

func (*GitlabClient) DeleteDeployKey

func (g *GitlabClient) DeleteDeployKey(pid interface{}, deployKey int, options ...gitlab.RequestOptionFunc) (res *gitlab.Response, err error)

func (*GitlabClient) DeleteGroup

func (g *GitlabClient) DeleteGroup(gid interface{}, options ...gitlab.RequestOptionFunc) (res *gitlab.Response, err error)

func (*GitlabClient) DeleteProject

func (g *GitlabClient) DeleteProject(pid interface{}) (res *gitlab.Response, err error)

func (*GitlabClient) DeleteProjectAccessToken

func (g *GitlabClient) DeleteProjectAccessToken(pid interface{}, id int, options ...gitlab.RequestOptionFunc) (res *gitlab.Response, err error)

func (*GitlabClient) EnableProjectDeployKey

func (g *GitlabClient) EnableProjectDeployKey(pid interface{}, deployKey int, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)

func (*GitlabClient) GetCurrentUser

func (g *GitlabClient) GetCurrentUser() (user *gitlab.User, res *gitlab.Response, err error)

func (*GitlabClient) GetDeployKey

func (g *GitlabClient) GetDeployKey(pid interface{}, deployKeyID int, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)

func (*GitlabClient) GetGroup

func (g *GitlabClient) GetGroup(gid interface{}, opt *gitlab.GetGroupOptions, options ...gitlab.RequestOptionFunc) (group *gitlab.Group, res *gitlab.Response, err error)

func (*GitlabClient) GetProject

func (g *GitlabClient) GetProject(pid interface{}, opt *gitlab.GetProjectOptions, options ...gitlab.RequestOptionFunc) (project *gitlab.Project, res *gitlab.Response, err error)

func (*GitlabClient) GetProjectAccessToken

func (g *GitlabClient) GetProjectAccessToken(pid interface{}, id int, options ...gitlab.RequestOptionFunc) (token *gitlab.ProjectAccessToken, res *gitlab.Response, err error)

func (*GitlabClient) ListAllDeployKeys

func (g *GitlabClient) ListAllDeployKeys(opt *gitlab.ListInstanceDeployKeysOptions, options ...gitlab.RequestOptionFunc) (keys []*gitlab.InstanceDeployKey, res *gitlab.Response, err error)

func (*GitlabClient) ListDeployKeys

func (g *GitlabClient) ListDeployKeys(pid interface{}, opt *gitlab.ListProjectDeployKeysOptions, options ...gitlab.RequestOptionFunc) (keys []*gitlab.ProjectDeployKey, res *gitlab.Response, err error)

func (*GitlabClient) ListGroupProjects

func (g *GitlabClient) ListGroupProjects(gid interface{}, opt *gitlab.ListGroupProjectsOptions, options ...gitlab.RequestOptionFunc) (projects []*gitlab.Project, res *gitlab.Response, err error)

func (*GitlabClient) ListGroups

func (g *GitlabClient) ListGroups(opt *gitlab.ListGroupsOptions, options ...gitlab.RequestOptionFunc) (groups []*gitlab.Group, res *gitlab.Response, err error)

func (*GitlabClient) ListProjectAccessToken

func (g *GitlabClient) ListProjectAccessToken(pid interface{}, opt *gitlab.ListProjectAccessTokensOptions, options ...gitlab.RequestOptionFunc) (tokens []*gitlab.ProjectAccessToken, res *gitlab.Response, err error)

func (*GitlabClient) ListProjects

func (g *GitlabClient) ListProjects(search string) (projects []*gitlab.Project, res *gitlab.Response, err error)

func (*GitlabClient) NewGitlabClient

func (g *GitlabClient) NewGitlabClient(url, token string) (GitlabOperator, error)

func (*GitlabClient) UpdateGroup

func (g *GitlabClient) UpdateGroup(gid interface{}, opt *gitlab.UpdateGroupOptions, options ...gitlab.RequestOptionFunc) (group *gitlab.Group, res *gitlab.Response, err error)

func (*GitlabClient) UpdateProject

func (g *GitlabClient) UpdateProject(pid interface{}, opt *gitlab.EditProjectOptions) (project *gitlab.Project, res *gitlab.Response, err error)

func (*GitlabClient) UpdateProjectDeployKey

func (g *GitlabClient) UpdateProjectDeployKey(pid interface{}, deployKey int, opt *gitlab.UpdateDeployKeyOptions, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)

type GitlabOperator

type GitlabOperator interface {
	NewGitlabClient(url, token string) (GitlabOperator, error)
	GetCurrentUser() (user *gitlab.User, res *gitlab.Response, err error)

	CreateProject(opt *gitlab.CreateProjectOptions, options ...gitlab.RequestOptionFunc) (project *gitlab.Project, res *gitlab.Response, err error)
	DeleteProject(pid interface{}) (res *gitlab.Response, err error)
	UpdateProject(pid interface{}, opt *gitlab.EditProjectOptions) (project *gitlab.Project, res *gitlab.Response, err error)
	GetProject(pid interface{}, opt *gitlab.GetProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	ListGroupProjects(gid interface{}, opt *gitlab.ListGroupProjectsOptions, options ...gitlab.RequestOptionFunc) (projects []*gitlab.Project, res *gitlab.Response, err error)
	ListProjects(search string) (projects []*gitlab.Project, res *gitlab.Response, err error)

	CreateGroup(opt *gitlab.CreateGroupOptions, options ...gitlab.RequestOptionFunc) (group *gitlab.Group, res *gitlab.Response, err error)
	DeleteGroup(gid interface{}, options ...gitlab.RequestOptionFunc) (res *gitlab.Response, err error)
	UpdateGroup(gid interface{}, opt *gitlab.UpdateGroupOptions, options ...gitlab.RequestOptionFunc) (group *gitlab.Group, res *gitlab.Response, err error)
	GetGroup(gid interface{}, opt *gitlab.GetGroupOptions, options ...gitlab.RequestOptionFunc) (group *gitlab.Group, res *gitlab.Response, err error)
	ListGroups(opt *gitlab.ListGroupsOptions, options ...gitlab.RequestOptionFunc) (groups []*gitlab.Group, res *gitlab.Response, err error)

	GetDeployKey(pid interface{}, deployKeyID int, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)
	ListDeployKeys(pid interface{}, opt *gitlab.ListProjectDeployKeysOptions, options ...gitlab.RequestOptionFunc) (keys []*gitlab.ProjectDeployKey, res *gitlab.Response, err error)
	ListAllDeployKeys(opt *gitlab.ListInstanceDeployKeysOptions, options ...gitlab.RequestOptionFunc) (keys []*gitlab.InstanceDeployKey, res *gitlab.Response, err error)
	AddDeployKey(pid interface{}, opt *gitlab.AddDeployKeyOptions, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)
	DeleteDeployKey(pid interface{}, deployKey int, options ...gitlab.RequestOptionFunc) (res *gitlab.Response, err error)
	EnableProjectDeployKey(pid interface{}, deployKey int, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)
	UpdateProjectDeployKey(pid interface{}, deployKey int, opt *gitlab.UpdateDeployKeyOptions, options ...gitlab.RequestOptionFunc) (key *gitlab.ProjectDeployKey, res *gitlab.Response, err error)
	GetProjectAccessToken(pid interface{}, id int, options ...gitlab.RequestOptionFunc) (token *gitlab.ProjectAccessToken, res *gitlab.Response, err error)
	ListProjectAccessToken(pid interface{}, opt *gitlab.ListProjectAccessTokensOptions, options ...gitlab.RequestOptionFunc) (tokens []*gitlab.ProjectAccessToken, res *gitlab.Response, err error)
	CreateProjectAccessToken(pid interface{}, opt *gitlab.CreateProjectAccessTokenOptions, options ...gitlab.RequestOptionFunc) (token *gitlab.ProjectAccessToken, res *gitlab.Response, err error)
	DeleteProjectAccessToken(pid interface{}, id int, options ...gitlab.RequestOptionFunc) (res *gitlab.Response, err error)
}

func NewGitlabOperator

func NewGitlabOperator() GitlabOperator

type MockGitlabOperator

type MockGitlabOperator struct {
	// contains filtered or unexported fields
}

MockGitlabOperator is a mock of GitlabOperator interface.

func NewMockGitlabOperator

func NewMockGitlabOperator(ctrl *gomock.Controller) *MockGitlabOperator

NewMockGitlabOperator creates a new mock instance.

func (*MockGitlabOperator) AddDeployKey

AddDeployKey mocks base method.

func (*MockGitlabOperator) CreateGroup

CreateGroup mocks base method.

func (*MockGitlabOperator) CreateProject

CreateProject mocks base method.

func (*MockGitlabOperator) CreateProjectAccessToken

CreateProjectAccessToken mocks base method.

func (*MockGitlabOperator) DeleteDeployKey

func (m *MockGitlabOperator) DeleteDeployKey(pid interface{}, deployKey int, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.Response, error)

DeleteDeployKey mocks base method.

func (*MockGitlabOperator) DeleteGroup

func (m *MockGitlabOperator) DeleteGroup(gid interface{}, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.Response, error)

DeleteGroup mocks base method.

func (*MockGitlabOperator) DeleteProject

func (m *MockGitlabOperator) DeleteProject(pid interface{}) (*go_gitlab.Response, error)

DeleteProject mocks base method.

func (*MockGitlabOperator) DeleteProjectAccessToken

func (m *MockGitlabOperator) DeleteProjectAccessToken(pid interface{}, id int, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.Response, error)

DeleteProjectAccessToken mocks base method.

func (*MockGitlabOperator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGitlabOperator) EnableProjectDeployKey

func (m *MockGitlabOperator) EnableProjectDeployKey(pid interface{}, deployKey int, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.ProjectDeployKey, *go_gitlab.Response, error)

EnableProjectDeployKey mocks base method.

func (*MockGitlabOperator) GetCurrentUser

func (m *MockGitlabOperator) GetCurrentUser() (*go_gitlab.User, *go_gitlab.Response, error)

GetCurrentUser mocks base method.

func (*MockGitlabOperator) GetDeployKey

func (m *MockGitlabOperator) GetDeployKey(pid interface{}, deployKeyID int, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.ProjectDeployKey, *go_gitlab.Response, error)

GetDeployKey mocks base method.

func (*MockGitlabOperator) GetGroup

func (m *MockGitlabOperator) GetGroup(gid interface{}, opt *go_gitlab.GetGroupOptions, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.Group, *go_gitlab.Response, error)

GetGroup mocks base method.

func (*MockGitlabOperator) GetProject

func (m *MockGitlabOperator) GetProject(pid interface{}, opt *go_gitlab.GetProjectOptions, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.Project, *go_gitlab.Response, error)

GetProject mocks base method.

func (*MockGitlabOperator) GetProjectAccessToken

func (m *MockGitlabOperator) GetProjectAccessToken(pid interface{}, id int, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.ProjectAccessToken, *go_gitlab.Response, error)

GetProjectAccessToken mocks base method.

func (*MockGitlabOperator) ListAllDeployKeys

ListAllDeployKeys mocks base method.

func (*MockGitlabOperator) ListDeployKeys

ListDeployKeys mocks base method.

func (*MockGitlabOperator) ListGroupProjects

func (m *MockGitlabOperator) ListGroupProjects(gid interface{}, opt *go_gitlab.ListGroupProjectsOptions, options ...go_gitlab.RequestOptionFunc) ([]*go_gitlab.Project, *go_gitlab.Response, error)

ListGroupProjects mocks base method.

func (*MockGitlabOperator) ListGroups

ListGroups mocks base method.

func (*MockGitlabOperator) ListProjectAccessToken

ListProjectAccessToken mocks base method.

func (*MockGitlabOperator) ListProjects

func (m *MockGitlabOperator) ListProjects(search string) ([]*go_gitlab.Project, *go_gitlab.Response, error)

ListProjects mocks base method.

func (*MockGitlabOperator) NewGitlabClient

func (m *MockGitlabOperator) NewGitlabClient(url, token string) (GitlabOperator, error)

NewGitlabClient mocks base method.

func (*MockGitlabOperator) UpdateGroup

func (m *MockGitlabOperator) UpdateGroup(gid interface{}, opt *go_gitlab.UpdateGroupOptions, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.Group, *go_gitlab.Response, error)

UpdateGroup mocks base method.

func (*MockGitlabOperator) UpdateProject

func (m *MockGitlabOperator) UpdateProject(pid interface{}, opt *go_gitlab.EditProjectOptions) (*go_gitlab.Project, *go_gitlab.Response, error)

UpdateProject mocks base method.

func (*MockGitlabOperator) UpdateProjectDeployKey

func (m *MockGitlabOperator) UpdateProjectDeployKey(pid interface{}, deployKey int, opt *go_gitlab.UpdateDeployKeyOptions, options ...go_gitlab.RequestOptionFunc) (*go_gitlab.ProjectDeployKey, *go_gitlab.Response, error)

UpdateProjectDeployKey mocks base method.

type MockGitlabOperatorMockRecorder

type MockGitlabOperatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockGitlabOperatorMockRecorder is the mock recorder for MockGitlabOperator.

func (*MockGitlabOperatorMockRecorder) AddDeployKey

func (mr *MockGitlabOperatorMockRecorder) AddDeployKey(pid, opt interface{}, options ...interface{}) *gomock.Call

AddDeployKey indicates an expected call of AddDeployKey.

func (*MockGitlabOperatorMockRecorder) CreateGroup

func (mr *MockGitlabOperatorMockRecorder) CreateGroup(opt interface{}, options ...interface{}) *gomock.Call

CreateGroup indicates an expected call of CreateGroup.

func (*MockGitlabOperatorMockRecorder) CreateProject

func (mr *MockGitlabOperatorMockRecorder) CreateProject(opt interface{}, options ...interface{}) *gomock.Call

CreateProject indicates an expected call of CreateProject.

func (*MockGitlabOperatorMockRecorder) CreateProjectAccessToken

func (mr *MockGitlabOperatorMockRecorder) CreateProjectAccessToken(pid, opt interface{}, options ...interface{}) *gomock.Call

CreateProjectAccessToken indicates an expected call of CreateProjectAccessToken.

func (*MockGitlabOperatorMockRecorder) DeleteDeployKey

func (mr *MockGitlabOperatorMockRecorder) DeleteDeployKey(pid, deployKey interface{}, options ...interface{}) *gomock.Call

DeleteDeployKey indicates an expected call of DeleteDeployKey.

func (*MockGitlabOperatorMockRecorder) DeleteGroup

func (mr *MockGitlabOperatorMockRecorder) DeleteGroup(gid interface{}, options ...interface{}) *gomock.Call

DeleteGroup indicates an expected call of DeleteGroup.

func (*MockGitlabOperatorMockRecorder) DeleteProject

func (mr *MockGitlabOperatorMockRecorder) DeleteProject(pid interface{}) *gomock.Call

DeleteProject indicates an expected call of DeleteProject.

func (*MockGitlabOperatorMockRecorder) DeleteProjectAccessToken

func (mr *MockGitlabOperatorMockRecorder) DeleteProjectAccessToken(pid, id interface{}, options ...interface{}) *gomock.Call

DeleteProjectAccessToken indicates an expected call of DeleteProjectAccessToken.

func (*MockGitlabOperatorMockRecorder) EnableProjectDeployKey

func (mr *MockGitlabOperatorMockRecorder) EnableProjectDeployKey(pid, deployKey interface{}, options ...interface{}) *gomock.Call

EnableProjectDeployKey indicates an expected call of EnableProjectDeployKey.

func (*MockGitlabOperatorMockRecorder) GetCurrentUser

func (mr *MockGitlabOperatorMockRecorder) GetCurrentUser() *gomock.Call

GetCurrentUser indicates an expected call of GetCurrentUser.

func (*MockGitlabOperatorMockRecorder) GetDeployKey

func (mr *MockGitlabOperatorMockRecorder) GetDeployKey(pid, deployKeyID interface{}, options ...interface{}) *gomock.Call

GetDeployKey indicates an expected call of GetDeployKey.

func (*MockGitlabOperatorMockRecorder) GetGroup

func (mr *MockGitlabOperatorMockRecorder) GetGroup(gid, opt interface{}, options ...interface{}) *gomock.Call

GetGroup indicates an expected call of GetGroup.

func (*MockGitlabOperatorMockRecorder) GetProject

func (mr *MockGitlabOperatorMockRecorder) GetProject(pid, opt interface{}, options ...interface{}) *gomock.Call

GetProject indicates an expected call of GetProject.

func (*MockGitlabOperatorMockRecorder) GetProjectAccessToken

func (mr *MockGitlabOperatorMockRecorder) GetProjectAccessToken(pid, id interface{}, options ...interface{}) *gomock.Call

GetProjectAccessToken indicates an expected call of GetProjectAccessToken.

func (*MockGitlabOperatorMockRecorder) ListAllDeployKeys

func (mr *MockGitlabOperatorMockRecorder) ListAllDeployKeys(opt interface{}, options ...interface{}) *gomock.Call

ListAllDeployKeys indicates an expected call of ListAllDeployKeys.

func (*MockGitlabOperatorMockRecorder) ListDeployKeys

func (mr *MockGitlabOperatorMockRecorder) ListDeployKeys(pid, opt interface{}, options ...interface{}) *gomock.Call

ListDeployKeys indicates an expected call of ListDeployKeys.

func (*MockGitlabOperatorMockRecorder) ListGroupProjects

func (mr *MockGitlabOperatorMockRecorder) ListGroupProjects(gid, opt interface{}, options ...interface{}) *gomock.Call

ListGroupProjects indicates an expected call of ListGroupProjects.

func (*MockGitlabOperatorMockRecorder) ListGroups

func (mr *MockGitlabOperatorMockRecorder) ListGroups(opt interface{}, options ...interface{}) *gomock.Call

ListGroups indicates an expected call of ListGroups.

func (*MockGitlabOperatorMockRecorder) ListProjectAccessToken

func (mr *MockGitlabOperatorMockRecorder) ListProjectAccessToken(pid, opt interface{}, options ...interface{}) *gomock.Call

ListProjectAccessToken indicates an expected call of ListProjectAccessToken.

func (*MockGitlabOperatorMockRecorder) ListProjects

func (mr *MockGitlabOperatorMockRecorder) ListProjects(search interface{}) *gomock.Call

ListProjects indicates an expected call of ListProjects.

func (*MockGitlabOperatorMockRecorder) NewGitlabClient

func (mr *MockGitlabOperatorMockRecorder) NewGitlabClient(url, token interface{}) *gomock.Call

NewGitlabClient indicates an expected call of NewGitlabClient.

func (*MockGitlabOperatorMockRecorder) UpdateGroup

func (mr *MockGitlabOperatorMockRecorder) UpdateGroup(gid, opt interface{}, options ...interface{}) *gomock.Call

UpdateGroup indicates an expected call of UpdateGroup.

func (*MockGitlabOperatorMockRecorder) UpdateProject

func (mr *MockGitlabOperatorMockRecorder) UpdateProject(pid, opt interface{}) *gomock.Call

UpdateProject indicates an expected call of UpdateProject.

func (*MockGitlabOperatorMockRecorder) UpdateProjectDeployKey

func (mr *MockGitlabOperatorMockRecorder) UpdateProjectDeployKey(pid, deployKey, opt interface{}, options ...interface{}) *gomock.Call

UpdateProjectDeployKey indicates an expected call of UpdateProjectDeployKey.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL