Documentation ¶
Overview ¶
Package giteaservice is a generated GoMock package.
Index ¶
- type GiteaClient
- type MockGiteaClient
- func (m *MockGiteaClient) AddCollaborator(repoName, username string, accessLevel entity.AccessLevel) error
- func (m *MockGiteaClient) AddSSHKey(username, publicSSHKey string) error
- func (m *MockGiteaClient) DeleteRepo(repoName string) error
- func (m *MockGiteaClient) EXPECT() *MockGiteaClientMockRecorder
- func (m *MockGiteaClient) FindAllUsers() ([]entity.User, error)
- func (m *MockGiteaClient) MirrorRepo(url, repoName, userName, ownerUsername string, ...) error
- func (m *MockGiteaClient) RemoveCollaborator(repoName, username string) error
- func (m *MockGiteaClient) UpdateCollaboratorPermissions(repoName, username string, accessLevel entity.AccessLevel) error
- func (m *MockGiteaClient) UpdateSSHKey(username, newPublicSSHKey string) error
- func (m *MockGiteaClient) UpdateUserPermissions(username string, level entity.AccessLevel) error
- type MockGiteaClientMockRecorder
- func (mr *MockGiteaClientMockRecorder) AddCollaborator(repoName, username, accessLevel interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) AddSSHKey(username, publicSSHKey interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) DeleteRepo(repoName interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) FindAllUsers() *gomock.Call
- func (mr *MockGiteaClientMockRecorder) MirrorRepo(url, repoName, userName, ownerUsername, authMethod, userCredential interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) RemoveCollaborator(repoName, username interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) UpdateCollaboratorPermissions(repoName, username, accessLevel interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) UpdateSSHKey(username, newPublicSSHKey interface{}) *gomock.Call
- func (mr *MockGiteaClientMockRecorder) UpdateUserPermissions(username, level interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GiteaClient ¶
type GiteaClient interface { AddSSHKey(username, publicSSHKey string) error UpdateSSHKey(username string, newPublicSSHKey string) error AddCollaborator(repoName, username string, accessLevel entity.AccessLevel) error RemoveCollaborator(repoName, username string) error UpdateCollaboratorPermissions(repoName, username string, accessLevel entity.AccessLevel) error UpdateUserPermissions(username string, level entity.AccessLevel) error MirrorRepo(url, repoName, userName, ownerUsername string, authMethod entity.RepositoryAuthMethod, userCredential string) error DeleteRepo(repoName string) error FindAllUsers() ([]entity.User, error) }
GiteaClient defines all Gitea operations.
func NewGiteaService ¶
func NewGiteaService(logger logging.Logger, url, adminUser, adminPassword string) (GiteaClient, error)
NewGiteaService is a constructor function.
type MockGiteaClient ¶
type MockGiteaClient struct {
// contains filtered or unexported fields
}
MockGiteaClient is a mock of GiteaClient interface.
func NewMockGiteaClient ¶
func NewMockGiteaClient(ctrl *gomock.Controller) *MockGiteaClient
NewMockGiteaClient creates a new mock instance.
func (*MockGiteaClient) AddCollaborator ¶
func (m *MockGiteaClient) AddCollaborator(repoName, username string, accessLevel entity.AccessLevel) error
AddCollaborator mocks base method.
func (*MockGiteaClient) AddSSHKey ¶
func (m *MockGiteaClient) AddSSHKey(username, publicSSHKey string) error
AddSSHKey mocks base method.
func (*MockGiteaClient) DeleteRepo ¶
func (m *MockGiteaClient) DeleteRepo(repoName string) error
DeleteRepo mocks base method.
func (*MockGiteaClient) EXPECT ¶
func (m *MockGiteaClient) EXPECT() *MockGiteaClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockGiteaClient) FindAllUsers ¶
func (m *MockGiteaClient) FindAllUsers() ([]entity.User, error)
FindAllUsers mocks base method.
func (*MockGiteaClient) MirrorRepo ¶
func (m *MockGiteaClient) MirrorRepo(url, repoName, userName, ownerUsername string, authMethod entity.RepositoryAuthMethod, userCredential string) error
MirrorRepo mocks base method.
func (*MockGiteaClient) RemoveCollaborator ¶
func (m *MockGiteaClient) RemoveCollaborator(repoName, username string) error
RemoveCollaborator mocks base method.
func (*MockGiteaClient) UpdateCollaboratorPermissions ¶
func (m *MockGiteaClient) UpdateCollaboratorPermissions(repoName, username string, accessLevel entity.AccessLevel) error
UpdateCollaboratorPermissions mocks base method.
func (*MockGiteaClient) UpdateSSHKey ¶
func (m *MockGiteaClient) UpdateSSHKey(username, newPublicSSHKey string) error
UpdateSSHKey mocks base method.
func (*MockGiteaClient) UpdateUserPermissions ¶
func (m *MockGiteaClient) UpdateUserPermissions(username string, level entity.AccessLevel) error
UpdateUserPermissions mocks base method.
type MockGiteaClientMockRecorder ¶
type MockGiteaClientMockRecorder struct {
// contains filtered or unexported fields
}
MockGiteaClientMockRecorder is the mock recorder for MockGiteaClient.
func (*MockGiteaClientMockRecorder) AddCollaborator ¶
func (mr *MockGiteaClientMockRecorder) AddCollaborator(repoName, username, accessLevel interface{}) *gomock.Call
AddCollaborator indicates an expected call of AddCollaborator.
func (*MockGiteaClientMockRecorder) AddSSHKey ¶
func (mr *MockGiteaClientMockRecorder) AddSSHKey(username, publicSSHKey interface{}) *gomock.Call
AddSSHKey indicates an expected call of AddSSHKey.
func (*MockGiteaClientMockRecorder) DeleteRepo ¶
func (mr *MockGiteaClientMockRecorder) DeleteRepo(repoName interface{}) *gomock.Call
DeleteRepo indicates an expected call of DeleteRepo.
func (*MockGiteaClientMockRecorder) FindAllUsers ¶
func (mr *MockGiteaClientMockRecorder) FindAllUsers() *gomock.Call
FindAllUsers indicates an expected call of FindAllUsers.
func (*MockGiteaClientMockRecorder) MirrorRepo ¶
func (mr *MockGiteaClientMockRecorder) MirrorRepo(url, repoName, userName, ownerUsername, authMethod, userCredential interface{}) *gomock.Call
MirrorRepo indicates an expected call of MirrorRepo.
func (*MockGiteaClientMockRecorder) RemoveCollaborator ¶
func (mr *MockGiteaClientMockRecorder) RemoveCollaborator(repoName, username interface{}) *gomock.Call
RemoveCollaborator indicates an expected call of RemoveCollaborator.
func (*MockGiteaClientMockRecorder) UpdateCollaboratorPermissions ¶
func (mr *MockGiteaClientMockRecorder) UpdateCollaboratorPermissions(repoName, username, accessLevel interface{}) *gomock.Call
UpdateCollaboratorPermissions indicates an expected call of UpdateCollaboratorPermissions.
func (*MockGiteaClientMockRecorder) UpdateSSHKey ¶
func (mr *MockGiteaClientMockRecorder) UpdateSSHKey(username, newPublicSSHKey interface{}) *gomock.Call
UpdateSSHKey indicates an expected call of UpdateSSHKey.
func (*MockGiteaClientMockRecorder) UpdateUserPermissions ¶
func (mr *MockGiteaClientMockRecorder) UpdateUserPermissions(username, level interface{}) *gomock.Call
UpdateUserPermissions indicates an expected call of UpdateUserPermissions.