fake

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	projects.Client

	MockGetProject    func(pid any, opt *gitlab.GetProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	MockCreateProject func(opt *gitlab.CreateProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	MockEditProject   func(pid any, opt *gitlab.EditProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	MockDeleteProject func(pid any, opt *gitlab.DeleteProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	MockGetHook    func(pid any, hook int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	MockAddHook    func(pid any, opt *gitlab.AddProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	MockEditHook   func(pid any, hook int, opt *gitlab.EditProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	MockDeleteHook func(pid any, hook int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	MockGetMember    func(pid any, user int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	MockAddMember    func(pid any, opt *gitlab.AddProjectMemberOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	MockEditMember   func(pid any, user int, opt *gitlab.EditProjectMemberOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	MockDeleteMember func(pid any, user int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	MockCreateDeployToken     func(pid any, opt *gitlab.CreateProjectDeployTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *gitlab.Response, error)
	MockDeleteDeployToken     func(pid any, deployToken int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	MockGetProjectDeployToken func(pid any, deployToken int, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *gitlab.Response, error)

	MockGetVariable    func(pid any, key string, opt *gitlab.GetProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	MockCreateVariable func(pid any, opt *gitlab.CreateProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	MockUpdateVariable func(pid any, key string, opt *gitlab.UpdateProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	MockListVariables  func(pid any, opt *gitlab.ListProjectVariablesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProjectVariable, *gitlab.Response, error)
	MockRemoveVariable func(pid any, key string, opt *gitlab.RemoveProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	MockGetProjectAccessToken    func(pid any, id int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectAccessToken, *gitlab.Response, error)
	MockCreateProjectAccessToken func(pid any, opt *gitlab.CreateProjectAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectAccessToken, *gitlab.Response, error)
	MockRevokeProjectAccessToken func(pid any, id int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	MockAddDeployKey    func(pid any, opt *gitlab.AddDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
	MockDeleteDeployKey func(pid any, deployKey int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	MockUpdateDeployKey func(pid any, deployKey int, opt *gitlab.UpdateDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
	MockGetDeployKey    func(pid any, deployKey int, options ...*gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)

	MockGetPipelineSchedule            func(pid any, schedule int, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	MockCreatePipelineSchedule         func(pid any, opt *gitlab.CreatePipelineScheduleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	MockEditPipelineSchedule           func(pid any, schedule int, opt *gitlab.EditPipelineScheduleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	MockDeletePipelineSchedule         func(pid any, schedule int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	MockCreatePipelineScheduleVariable func(pid any, schedule int, opt *gitlab.CreatePipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
	MockEditPipelineScheduleVariable   func(pid any, schedule int, key string, opt *gitlab.EditPipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
	MockDeletePipelineScheduleVariable func(pid any, schedule int, key string, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)

	MockListUsers func(opt *gitlab.ListUsersOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.User, *gitlab.Response, error)

	MockGetProjectPushRules func(pid any, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectPushRules, *gitlab.Response, error)
	MockEditProjectPushRule func(pid any, opt *gitlab.EditProjectPushRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectPushRules, *gitlab.Response, error)

	MockGetProjectApprovalRule    func(pid any, ruleID int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	MockCreateProjectApprovalRule func(pid any, opt *gitlab.CreateProjectLevelRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	MockUpdateProjectApprovalRule func(pid any, approvalRule int, opt *gitlab.UpdateProjectLevelRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	MockDeleteProjectApprovalRule func(pid any, approvalRule int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

MockClient is a fake implementation of projects.Client.

func (*MockClient) AddDeployKey added in v0.4.0

AddDeployKey calls the underlying MockAddDeployKey

func (*MockClient) AddProjectHook

func (c *MockClient) AddProjectHook(pid any, opt *gitlab.AddProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)

AddProjectHook calls the underlying MockAddHook method. AddProjectHook calls the underlying MockAddHook method.

func (*MockClient) AddProjectMember

AddProjectMember calls the underlying MockAddMember method. AddProjectMember calls the underlying MockAddMember method.

func (*MockClient) CreatePipelineSchedule added in v0.4.0

CreatePipelineSchedule calls the underlying MockCreatePipelineSchedule method.

func (*MockClient) CreatePipelineScheduleVariable added in v0.4.0

func (c *MockClient) CreatePipelineScheduleVariable(pid any, schedule int, opt *gitlab.CreatePipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)

CreatePipelineScheduleVariable calls the underlying MockCreatePipelineScheduleVariable method.

func (*MockClient) CreateProject

CreateProject calls the underlying MockCreateProject method

func (*MockClient) CreateProjectAccessToken added in v0.4.0

CreateProjectAccessToken calls the underlying MockCreateProjectAccessToken method.

func (*MockClient) CreateProjectApprovalRule added in v0.12.0

func (c *MockClient) CreateProjectApprovalRule(pid any, opt *gitlab.CreateProjectLevelRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)

func (*MockClient) CreateProjectDeployToken

func (c *MockClient) CreateProjectDeployToken(pid any, opt *gitlab.CreateProjectDeployTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *gitlab.Response, error)

CreateProjectDeployToken calls the underlying MockCreateProjectDeployToken method.

func (*MockClient) CreateVariable

CreateVariable calls the underlying MockCreateProjectVariable

func (*MockClient) DeleteDeployKey added in v0.4.0

func (c *MockClient) DeleteDeployKey(pid any, deployKey int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

DeleteDeployKey calls the underlying MockDeleteDeployKey

func (*MockClient) DeletePipelineSchedule added in v0.4.0

func (c *MockClient) DeletePipelineSchedule(pid any, schedule int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

DeletePipelineSchedule calls the underlying MockDeletePipelineSchedule method.

func (*MockClient) DeletePipelineScheduleVariable added in v0.4.0

func (c *MockClient) DeletePipelineScheduleVariable(pid any, schedule int, key string, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)

DeletePipelineScheduleVariable calls the underlying MockDeletePipelineScheduleVariable method.

func (*MockClient) DeleteProject

func (c *MockClient) DeleteProject(pid any, opt *gitlab.DeleteProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

DeleteProject calls the underlying MockDeleteProject method

func (*MockClient) DeleteProjectApprovalRule added in v0.12.0

func (c *MockClient) DeleteProjectApprovalRule(pid any, approvalRule int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

func (*MockClient) DeleteProjectDeployToken

func (c *MockClient) DeleteProjectDeployToken(pid any, deployToken int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

DeleteProjectDeployToken calls the underlying MockDeleteProjectDeployToken method.

func (*MockClient) DeleteProjectHook

func (c *MockClient) DeleteProjectHook(pid any, hook int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

DeleteProjectHook calls the underlying MockDeleteProjectHook method.

func (*MockClient) DeleteProjectMember

func (c *MockClient) DeleteProjectMember(pid any, user int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

DeleteProjectMember calls the underlying MockDeleteMember method. DeleteProjectMember calls the underlying MockDeleteMember method.

func (*MockClient) EditPipelineSchedule added in v0.4.0

func (c *MockClient) EditPipelineSchedule(pid any, schedule int, opt *gitlab.EditPipelineScheduleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)

EditPipelineSchedule calls the underlying MockEditPipelineSchedule method.

func (*MockClient) EditPipelineScheduleVariable added in v0.4.0

func (c *MockClient) EditPipelineScheduleVariable(pid any, schedule int, key string, opt *gitlab.EditPipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)

EditPipelineScheduleVariable calls the underlying MockEditPipelineScheduleVariable method.

func (*MockClient) EditProject

func (c *MockClient) EditProject(pid any, opt *gitlab.EditProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)

EditProject calls the underlying MockEditProject method

func (*MockClient) EditProjectHook

func (c *MockClient) EditProjectHook(pid any, hook int, opt *gitlab.EditProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)

EditProjectHook calls the underlying MockEditProjectHook method.

func (*MockClient) EditProjectMember

func (c *MockClient) EditProjectMember(pid any, user int, opt *gitlab.EditProjectMemberOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)

EditProjectMember calls the underlying MockEditMember method. EditProjectMember calls the underlying MockEditMember method.

func (*MockClient) EditProjectPushRule added in v0.12.0

EditProjectPushRule calls the underlying MockEditProjectPushRule method.

func (*MockClient) GetDeployKey added in v0.4.0

func (c *MockClient) GetDeployKey(pid any, deployKey int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)

GetDeployKey calls the underlying MockGetDeployKey

func (*MockClient) GetPipelineSchedule added in v0.4.0

func (c *MockClient) GetPipelineSchedule(pid any, schedule int, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)

GetPipelineSchedule calls the underlying MockGetPipelineSchedule method.

func (*MockClient) GetProject

func (c *MockClient) GetProject(pid any, opt *gitlab.GetProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)

GetProject calls the underlying MockGetProject method.

func (*MockClient) GetProjectAccessToken added in v0.4.0

func (c *MockClient) GetProjectAccessToken(pid any, id int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectAccessToken, *gitlab.Response, error)

GetProjectAccessToken calls the underlying MockGetProjectAccessToken method.

func (*MockClient) GetProjectApprovalRule added in v0.12.0

func (c *MockClient) GetProjectApprovalRule(pid any, ruleID int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)

func (*MockClient) GetProjectDeployToken added in v0.4.0

func (c *MockClient) GetProjectDeployToken(pid any, deployToken int, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *gitlab.Response, error)

GetProjectDeployToken calls the underlying MockGetProjectDeployToken method.

func (*MockClient) GetProjectHook

func (c *MockClient) GetProjectHook(pid any, hook int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)

GetProjectHook calls the underlying MockGetProjectHook method.

func (*MockClient) GetProjectMember

func (c *MockClient) GetProjectMember(pid any, user int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)

GetProjectMember calls the underlying MockGetMember method. GetProjectMember calls the underlying MockGetMember method.

func (*MockClient) GetProjectPushRules added in v0.12.0

func (c *MockClient) GetProjectPushRules(pid any, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectPushRules, *gitlab.Response, error)

GetProjectPushRules calls the underlying MockGetProjectPushRules method.

func (*MockClient) GetVariable

GetVariable calls the underlying MockGetProjectVariable

func (*MockClient) ListUsers added in v0.5.0

func (c *MockClient) ListUsers(opt *gitlab.ListUsersOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.User, *gitlab.Response, error)

ListUsers calls the underlying MockListUsers method.

func (*MockClient) ListVariables added in v0.4.0

ListVariables calls the underlying MockListVariables

func (*MockClient) RemoveVariable

func (c *MockClient) RemoveVariable(pid any, key string, opt *gitlab.RemoveProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

RemoveVariable calls the underlying MockRemoveProjectVariable

func (*MockClient) RevokeProjectAccessToken added in v0.4.0

func (c *MockClient) RevokeProjectAccessToken(pid any, id int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

RevokeProjectAccessToken calls the underlying MockRevokeProjectAccessToken method.

func (*MockClient) UpdateDeployKey added in v0.4.0

func (c *MockClient) UpdateDeployKey(pid any, deployKey int, opt *gitlab.UpdateDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)

UpdateDeployKey cals the underlying MockUpdateDeployKey

func (*MockClient) UpdateProjectApprovalRule added in v0.12.0

func (c *MockClient) UpdateProjectApprovalRule(pid any, approvalRule int, opt *gitlab.UpdateProjectLevelRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)

func (*MockClient) UpdateVariable

UpdateVariable calls the underlying MockUpdateProjectVariable

Jump to

Keyboard shortcuts

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