mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-09-05 20:07:25 +00:00
Add custom list opts with all (#6992)
This commit is contained in:
@@ -66,7 +66,7 @@ type MockBackend_DestroyStep_Call struct {
|
||||
// - ctx context.Context
|
||||
// - step *types.Step
|
||||
// - taskUUID string
|
||||
func (_e *MockBackend_Expecter) DestroyStep(ctx interface{}, step interface{}, taskUUID interface{}) *MockBackend_DestroyStep_Call {
|
||||
func (_e *MockBackend_Expecter) DestroyStep(ctx any, step any, taskUUID any) *MockBackend_DestroyStep_Call {
|
||||
return &MockBackend_DestroyStep_Call{Call: _e.mock.On("DestroyStep", ctx, step, taskUUID)}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ type MockBackend_DestroyWorkflow_Call struct {
|
||||
// - ctx context.Context
|
||||
// - conf *types.Config
|
||||
// - taskUUID string
|
||||
func (_e *MockBackend_Expecter) DestroyWorkflow(ctx interface{}, conf interface{}, taskUUID interface{}) *MockBackend_DestroyWorkflow_Call {
|
||||
func (_e *MockBackend_Expecter) DestroyWorkflow(ctx any, conf any, taskUUID any) *MockBackend_DestroyWorkflow_Call {
|
||||
return &MockBackend_DestroyWorkflow_Call{Call: _e.mock.On("DestroyWorkflow", ctx, conf, taskUUID)}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ type MockBackend_IsAvailable_Call struct {
|
||||
|
||||
// IsAvailable is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
func (_e *MockBackend_Expecter) IsAvailable(ctx interface{}) *MockBackend_IsAvailable_Call {
|
||||
func (_e *MockBackend_Expecter) IsAvailable(ctx any) *MockBackend_IsAvailable_Call {
|
||||
return &MockBackend_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)}
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ type MockBackend_Load_Call struct {
|
||||
|
||||
// Load is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
func (_e *MockBackend_Expecter) Load(ctx interface{}) *MockBackend_Load_Call {
|
||||
func (_e *MockBackend_Expecter) Load(ctx any) *MockBackend_Load_Call {
|
||||
return &MockBackend_Load_Call{Call: _e.mock.On("Load", ctx)}
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ type MockBackend_SetupWorkflow_Call struct {
|
||||
// - ctx context.Context
|
||||
// - conf *types.Config
|
||||
// - taskUUID string
|
||||
func (_e *MockBackend_Expecter) SetupWorkflow(ctx interface{}, conf interface{}, taskUUID interface{}) *MockBackend_SetupWorkflow_Call {
|
||||
func (_e *MockBackend_Expecter) SetupWorkflow(ctx any, conf any, taskUUID any) *MockBackend_SetupWorkflow_Call {
|
||||
return &MockBackend_SetupWorkflow_Call{Call: _e.mock.On("SetupWorkflow", ctx, conf, taskUUID)}
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ type MockBackend_StartStep_Call struct {
|
||||
// - ctx context.Context
|
||||
// - step *types.Step
|
||||
// - taskUUID string
|
||||
func (_e *MockBackend_Expecter) StartStep(ctx interface{}, step interface{}, taskUUID interface{}) *MockBackend_StartStep_Call {
|
||||
func (_e *MockBackend_Expecter) StartStep(ctx any, step any, taskUUID any) *MockBackend_StartStep_Call {
|
||||
return &MockBackend_StartStep_Call{Call: _e.mock.On("StartStep", ctx, step, taskUUID)}
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ type MockBackend_TailStep_Call struct {
|
||||
// - ctx context.Context
|
||||
// - step *types.Step
|
||||
// - taskUUID string
|
||||
func (_e *MockBackend_Expecter) TailStep(ctx interface{}, step interface{}, taskUUID interface{}) *MockBackend_TailStep_Call {
|
||||
func (_e *MockBackend_Expecter) TailStep(ctx any, step any, taskUUID any) *MockBackend_TailStep_Call {
|
||||
return &MockBackend_TailStep_Call{Call: _e.mock.On("TailStep", ctx, step, taskUUID)}
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@ type MockBackend_WaitStep_Call struct {
|
||||
// - ctx context.Context
|
||||
// - step *types.Step
|
||||
// - taskUUID string
|
||||
func (_e *MockBackend_Expecter) WaitStep(ctx interface{}, step interface{}, taskUUID interface{}) *MockBackend_WaitStep_Call {
|
||||
func (_e *MockBackend_Expecter) WaitStep(ctx any, step any, taskUUID any) *MockBackend_WaitStep_Call {
|
||||
return &MockBackend_WaitStep_Call{Call: _e.mock.On("WaitStep", ctx, step, taskUUID)}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ type MockTracer_Trace_Call struct {
|
||||
|
||||
// Trace is a helper method to define mock.On call
|
||||
// - state1 *state.State
|
||||
func (_e *MockTracer_Expecter) Trace(state1 interface{}) *MockTracer_Trace_Call {
|
||||
func (_e *MockTracer_Expecter) Trace(state1 any) *MockTracer_Trace_Call {
|
||||
return &MockTracer_Trace_Call{Call: _e.mock.On("Trace", state1)}
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -64,7 +64,7 @@ type MockPeer_Done_Call struct {
|
||||
// - c context.Context
|
||||
// - workflowID string
|
||||
// - state rpc.WorkflowState
|
||||
func (_e *MockPeer_Expecter) Done(c interface{}, workflowID interface{}, state interface{}) *MockPeer_Done_Call {
|
||||
func (_e *MockPeer_Expecter) Done(c any, workflowID any, state any) *MockPeer_Done_Call {
|
||||
return &MockPeer_Done_Call{Call: _e.mock.On("Done", c, workflowID, state)}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ type MockPeer_EnqueueLog_Call struct {
|
||||
|
||||
// EnqueueLog is a helper method to define mock.On call
|
||||
// - logEntry *rpc.LogEntry
|
||||
func (_e *MockPeer_Expecter) EnqueueLog(logEntry interface{}) *MockPeer_EnqueueLog_Call {
|
||||
func (_e *MockPeer_Expecter) EnqueueLog(logEntry any) *MockPeer_EnqueueLog_Call {
|
||||
return &MockPeer_EnqueueLog_Call{Call: _e.mock.On("EnqueueLog", logEntry)}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ type MockPeer_Extend_Call struct {
|
||||
// Extend is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - workflowID string
|
||||
func (_e *MockPeer_Expecter) Extend(c interface{}, workflowID interface{}) *MockPeer_Extend_Call {
|
||||
func (_e *MockPeer_Expecter) Extend(c any, workflowID any) *MockPeer_Extend_Call {
|
||||
return &MockPeer_Extend_Call{Call: _e.mock.On("Extend", c, workflowID)}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ type MockPeer_Init_Call struct {
|
||||
// - c context.Context
|
||||
// - workflowID string
|
||||
// - state rpc.WorkflowState
|
||||
func (_e *MockPeer_Expecter) Init(c interface{}, workflowID interface{}, state interface{}) *MockPeer_Init_Call {
|
||||
func (_e *MockPeer_Expecter) Init(c any, workflowID any, state any) *MockPeer_Init_Call {
|
||||
return &MockPeer_Init_Call{Call: _e.mock.On("Init", c, workflowID, state)}
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ type MockPeer_Next_Call struct {
|
||||
// Next is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - f rpc.Filter
|
||||
func (_e *MockPeer_Expecter) Next(c interface{}, f interface{}) *MockPeer_Next_Call {
|
||||
func (_e *MockPeer_Expecter) Next(c any, f any) *MockPeer_Next_Call {
|
||||
return &MockPeer_Next_Call{Call: _e.mock.On("Next", c, f)}
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ type MockPeer_RegisterAgent_Call struct {
|
||||
// RegisterAgent is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - info rpc.AgentInfo
|
||||
func (_e *MockPeer_Expecter) RegisterAgent(ctx interface{}, info interface{}) *MockPeer_RegisterAgent_Call {
|
||||
func (_e *MockPeer_Expecter) RegisterAgent(ctx any, info any) *MockPeer_RegisterAgent_Call {
|
||||
return &MockPeer_RegisterAgent_Call{Call: _e.mock.On("RegisterAgent", ctx, info)}
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ type MockPeer_ReportHealth_Call struct {
|
||||
|
||||
// ReportHealth is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
func (_e *MockPeer_Expecter) ReportHealth(c interface{}) *MockPeer_ReportHealth_Call {
|
||||
func (_e *MockPeer_Expecter) ReportHealth(c any) *MockPeer_ReportHealth_Call {
|
||||
return &MockPeer_ReportHealth_Call{Call: _e.mock.On("ReportHealth", c)}
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ type MockPeer_UnregisterAgent_Call struct {
|
||||
|
||||
// UnregisterAgent is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
func (_e *MockPeer_Expecter) UnregisterAgent(ctx interface{}) *MockPeer_UnregisterAgent_Call {
|
||||
func (_e *MockPeer_Expecter) UnregisterAgent(ctx any) *MockPeer_UnregisterAgent_Call {
|
||||
return &MockPeer_UnregisterAgent_Call{Call: _e.mock.On("UnregisterAgent", ctx)}
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ type MockPeer_Update_Call struct {
|
||||
// - c context.Context
|
||||
// - workflowID string
|
||||
// - state rpc.StepState
|
||||
func (_e *MockPeer_Expecter) Update(c interface{}, workflowID interface{}, state interface{}) *MockPeer_Update_Call {
|
||||
func (_e *MockPeer_Expecter) Update(c any, workflowID any, state any) *MockPeer_Update_Call {
|
||||
return &MockPeer_Update_Call{Call: _e.mock.On("Update", c, workflowID, state)}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ type MockPeer_Version_Call struct {
|
||||
|
||||
// Version is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
func (_e *MockPeer_Expecter) Version(c interface{}) *MockPeer_Version_Call {
|
||||
func (_e *MockPeer_Expecter) Version(c any) *MockPeer_Version_Call {
|
||||
return &MockPeer_Version_Call{Call: _e.mock.On("Version", c)}
|
||||
}
|
||||
|
||||
@@ -700,7 +700,7 @@ type MockPeer_Wait_Call struct {
|
||||
// Wait is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - workflowID string
|
||||
func (_e *MockPeer_Expecter) Wait(c interface{}, workflowID interface{}) *MockPeer_Wait_Call {
|
||||
func (_e *MockPeer_Expecter) Wait(c any, workflowID any) *MockPeer_Wait_Call {
|
||||
return &MockPeer_Wait_Call{Call: _e.mock.On("Wait", c, workflowID)}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.34.1
|
||||
// protoc-gen-go v1.36.12
|
||||
// protoc v7.35.1
|
||||
// source: woodpecker.proto
|
||||
|
||||
package proto
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.34.1
|
||||
// - protoc v7.35.1
|
||||
// source: woodpecker.proto
|
||||
|
||||
package proto
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ import (
|
||||
// @Param page query int false "for response pagination, page offset number" default(1)
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetAgents(c *gin.Context) {
|
||||
agents, err := store.FromContext(c).AgentList(session.Pagination(c))
|
||||
agents, err := store.FromContext(c).AgentList(session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting agent list. %s", err)
|
||||
return
|
||||
@@ -294,7 +294,7 @@ func GetOrgAgents(c *gin.Context) {
|
||||
_store := store.FromContext(c)
|
||||
org := session.Org(c)
|
||||
|
||||
agents, err := _store.AgentListForOrg(org.ID, session.Pagination(c))
|
||||
agents, err := _store.AgentListForOrg(org.ID, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting agent list. %s", err)
|
||||
return
|
||||
|
||||
+1
-1
@@ -187,7 +187,7 @@ func GetCC(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
pipelines, err := _store.GetPipelineList(repo, &model.ListOptions{Page: 1, PerPage: 1}, nil)
|
||||
pipelines, err := _store.GetPipelineList(repo, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 1}}, nil)
|
||||
if err != nil && !errors.Is(err, types.ErrRecordNotExist) {
|
||||
log.Warn().Err(err).Msg("could not get pipeline list")
|
||||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
|
||||
+1
-1
@@ -289,7 +289,7 @@ func PatchCron(c *gin.Context) {
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetCronList(c *gin.Context) {
|
||||
repo := session.Repo(c)
|
||||
list, err := store.FromContext(c).CronList(repo, session.Pagination(c))
|
||||
list, err := store.FromContext(c).CronList(repo, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting cron list. %s", err)
|
||||
return
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import (
|
||||
// @Param page query int false "for response pagination, page offset number" default(1)
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetForges(c *gin.Context) {
|
||||
forges, err := store.FromContext(c).ForgeList(session.Pagination(c))
|
||||
forges, err := store.FromContext(c).ForgeList(session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting forge list. %s", err)
|
||||
return
|
||||
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetGlobalRegistryList(c *gin.Context) {
|
||||
registryService := server.Config.Services.Manager.RegistryService()
|
||||
list, err := registryService.GlobalRegistryList(session.Pagination(c))
|
||||
list, err := registryService.GlobalRegistryList(session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting global registry list. %s", err)
|
||||
return
|
||||
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetGlobalSecretList(c *gin.Context) {
|
||||
secretService := server.Config.Services.Manager.SecretService()
|
||||
list, err := secretService.GlobalSecretList(session.Pagination(c))
|
||||
list, err := secretService.GlobalSecretList(session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting global secret list. %s", err)
|
||||
return
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import (
|
||||
// @Param page query int false "for response pagination, page offset number" default(1)
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetOrgs(c *gin.Context) {
|
||||
orgs, err := store.FromContext(c).OrgList(session.Pagination(c))
|
||||
orgs, err := store.FromContext(c).OrgList(session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting user list. %s", err)
|
||||
return
|
||||
|
||||
@@ -62,7 +62,7 @@ func GetOrgRegistryList(c *gin.Context) {
|
||||
org := session.Org(c)
|
||||
|
||||
registryService := server.Config.Services.Manager.RegistryService()
|
||||
list, err := registryService.OrgRegistryList(org.ID, session.Pagination(c))
|
||||
list, err := registryService.OrgRegistryList(org.ID, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting registry list for %q. %s", org.ID, err)
|
||||
return
|
||||
|
||||
@@ -62,7 +62,7 @@ func GetOrgSecretList(c *gin.Context) {
|
||||
org := session.Org(c)
|
||||
|
||||
secretService := server.Config.Services.Manager.SecretService()
|
||||
list, err := secretService.OrgSecretList(org.ID, session.Pagination(c))
|
||||
list, err := secretService.OrgSecretList(org.ID, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting secret list for %q. %s", org.ID, err)
|
||||
return
|
||||
|
||||
@@ -177,7 +177,7 @@ func GetPipelines(c *gin.Context) {
|
||||
filter.After = afterDt.Unix()
|
||||
}
|
||||
|
||||
pipelines, err := store.FromContext(c).GetPipelineList(repo, session.Pagination(c), filter)
|
||||
pipelines, err := store.FromContext(c).GetPipelineList(repo, session.Pagination(c).All(), filter)
|
||||
if err != nil {
|
||||
_ = c.AbortWithError(http.StatusInternalServerError, err)
|
||||
return
|
||||
|
||||
@@ -144,7 +144,7 @@ func PatchRegistry(c *gin.Context) {
|
||||
func GetRegistryList(c *gin.Context) {
|
||||
repo := session.Repo(c)
|
||||
registryService := server.Config.Services.Manager.RegistryServiceFromRepo(repo)
|
||||
list, err := registryService.RegistryList(repo, session.Pagination(c))
|
||||
list, err := registryService.RegistryList(repo, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting registry list. %s", err)
|
||||
return
|
||||
|
||||
+2
-2
@@ -683,7 +683,7 @@ func GetAllRepos(c *gin.Context) {
|
||||
|
||||
active, _ := strconv.ParseBool(c.Query("active"))
|
||||
|
||||
repos, err := _store.RepoListAll(active, session.Pagination(c))
|
||||
repos, err := _store.RepoListAll(active, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error fetching repository list. %s", err)
|
||||
return
|
||||
@@ -704,7 +704,7 @@ func GetAllRepos(c *gin.Context) {
|
||||
func RepairAllRepos(c *gin.Context) {
|
||||
_store := store.FromContext(c)
|
||||
|
||||
repos, err := _store.RepoListAll(true, &model.ListOptions{All: true})
|
||||
repos, err := _store.RepoListAll(true, &model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error fetching repository list. %s", err)
|
||||
return
|
||||
|
||||
@@ -154,7 +154,7 @@ func PatchSecret(c *gin.Context) {
|
||||
func GetSecretList(c *gin.Context) {
|
||||
repo := session.Repo(c)
|
||||
secretService := server.Config.Services.Manager.SecretServiceFromRepo(repo)
|
||||
list, err := secretService.SecretList(repo, session.Pagination(c))
|
||||
list, err := secretService.SecretList(repo, session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting secret list. %s", err)
|
||||
return
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ const defaultForgeID = 1
|
||||
// @Param page query int false "for response pagination, page offset number" default(1)
|
||||
// @Param perPage query int false "for response pagination, max items per page" default(50)
|
||||
func GetUsers(c *gin.Context) {
|
||||
users, err := store.FromContext(c).GetUserList(session.Pagination(c))
|
||||
users, err := store.FromContext(c).GetUserList(session.Pagination(c).All())
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error getting user list. %s", err)
|
||||
return
|
||||
|
||||
@@ -138,7 +138,6 @@ func TestBitbucket(t *testing.T) {
|
||||
assert.Error(t, err)
|
||||
|
||||
listOpts := model.ListOptions{
|
||||
All: false,
|
||||
Page: 1,
|
||||
PerPage: 10,
|
||||
}
|
||||
|
||||
@@ -362,18 +362,12 @@ func (c *client) Branches(ctx context.Context, u *model.User, r *model.Repo, p *
|
||||
|
||||
opts := &bitbucket.BranchSearchOptions{ListOptions: convertListOptions(p)}
|
||||
all := make([]string, 0, p.PerPage)
|
||||
for {
|
||||
branches, resp, err := bc.Projects.SearchBranches(ctx, r.Owner, r.Name, opts)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to list branches: %w", err)
|
||||
}
|
||||
for _, b := range branches {
|
||||
all = append(all, b.DisplayID)
|
||||
}
|
||||
if !p.All || resp.LastPage {
|
||||
break
|
||||
}
|
||||
opts.Start = resp.NextPageStart
|
||||
branches, _, err := bc.Projects.SearchBranches(ctx, r.Owner, r.Name, opts)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to list branches: %w", err)
|
||||
}
|
||||
for _, b := range branches {
|
||||
all = append(all, b.DisplayID)
|
||||
}
|
||||
|
||||
return all, nil
|
||||
@@ -410,18 +404,12 @@ func (c *client) PullRequests(ctx context.Context, u *model.User, r *model.Repo,
|
||||
|
||||
opts := &bitbucket.PullRequestSearchOptions{ListOptions: convertListOptions(p)}
|
||||
all := make([]*model.PullRequest, 0)
|
||||
for {
|
||||
prs, resp, err := bc.Projects.SearchPullRequests(ctx, r.Owner, r.Name, opts)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to list pull-requests: %w", err)
|
||||
}
|
||||
for _, pr := range prs {
|
||||
all = append(all, &model.PullRequest{Index: convertID(pr.ID), Title: pr.Title})
|
||||
}
|
||||
if !p.All || resp.LastPage {
|
||||
break
|
||||
}
|
||||
opts.Start = resp.NextPageStart
|
||||
prs, _, err := bc.Projects.SearchPullRequests(ctx, r.Owner, r.Name, opts)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to list pull-requests: %w", err)
|
||||
}
|
||||
for _, pr := range prs {
|
||||
all = append(all, &model.PullRequest{Index: convertID(pr.ID), Title: pr.Title})
|
||||
}
|
||||
|
||||
return all, nil
|
||||
|
||||
@@ -176,9 +176,6 @@ func bitbucketAvatarURL(baseURL, slug string) string {
|
||||
}
|
||||
|
||||
func convertListOptions(p *model.ListOptions) bitbucket.ListOptions {
|
||||
if p.All {
|
||||
return bitbucket.ListOptions{}
|
||||
}
|
||||
return bitbucket.ListOptions{Limit: uint(p.PerPage), Start: uint((p.Page - 1) * p.PerPage)}
|
||||
}
|
||||
|
||||
|
||||
@@ -368,12 +368,6 @@ func Test_convertProjectsToTeams(t *testing.T) {
|
||||
func Test_convertListOptions(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
t.Run("all returns empty options", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
got := convertListOptions(&model.ListOptions{All: true, Page: 3, PerPage: 50})
|
||||
assert.Equal(t, bitbucket.ListOptions{}, got)
|
||||
})
|
||||
|
||||
t.Run("paged computes limit and start", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
got := convertListOptions(&model.ListOptions{Page: 3, PerPage: 50})
|
||||
|
||||
@@ -67,7 +67,7 @@ type MockForge_Activate_Call struct {
|
||||
// - u *model.User
|
||||
// - r *model.Repo
|
||||
// - link string
|
||||
func (_e *MockForge_Expecter) Activate(ctx interface{}, u interface{}, r interface{}, link interface{}) *MockForge_Activate_Call {
|
||||
func (_e *MockForge_Expecter) Activate(ctx any, u any, r any, link any) *MockForge_Activate_Call {
|
||||
return &MockForge_Activate_Call{Call: _e.mock.On("Activate", ctx, u, r, link)}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ type MockForge_BranchHead_Call struct {
|
||||
// - u *model.User
|
||||
// - r *model.Repo
|
||||
// - branch string
|
||||
func (_e *MockForge_Expecter) BranchHead(ctx interface{}, u interface{}, r interface{}, branch interface{}) *MockForge_BranchHead_Call {
|
||||
func (_e *MockForge_Expecter) BranchHead(ctx any, u any, r any, branch any) *MockForge_BranchHead_Call {
|
||||
return &MockForge_BranchHead_Call{Call: _e.mock.On("BranchHead", ctx, u, r, branch)}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ type MockForge_Branches_Call struct {
|
||||
// - u *model.User
|
||||
// - r *model.Repo
|
||||
// - p *model.ListOptions
|
||||
func (_e *MockForge_Expecter) Branches(ctx interface{}, u interface{}, r interface{}, p interface{}) *MockForge_Branches_Call {
|
||||
func (_e *MockForge_Expecter) Branches(ctx any, u any, r any, p any) *MockForge_Branches_Call {
|
||||
return &MockForge_Branches_Call{Call: _e.mock.On("Branches", ctx, u, r, p)}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ type MockForge_Deactivate_Call struct {
|
||||
// - u *model.User
|
||||
// - r *model.Repo
|
||||
// - link string
|
||||
func (_e *MockForge_Expecter) Deactivate(ctx interface{}, u interface{}, r interface{}, link interface{}) *MockForge_Deactivate_Call {
|
||||
func (_e *MockForge_Expecter) Deactivate(ctx any, u any, r any, link any) *MockForge_Deactivate_Call {
|
||||
return &MockForge_Deactivate_Call{Call: _e.mock.On("Deactivate", ctx, u, r, link)}
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ type MockForge_Dir_Call struct {
|
||||
// - r *model.Repo
|
||||
// - b *model.Pipeline
|
||||
// - dirName string
|
||||
func (_e *MockForge_Expecter) Dir(ctx interface{}, u interface{}, r interface{}, b interface{}, dirName interface{}) *MockForge_Dir_Call {
|
||||
func (_e *MockForge_Expecter) Dir(ctx any, u any, r any, b any, dirName any) *MockForge_Dir_Call {
|
||||
return &MockForge_Dir_Call{Call: _e.mock.On("Dir", ctx, u, r, b, dirName)}
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ type MockForge_File_Call struct {
|
||||
// - r *model.Repo
|
||||
// - b *model.Pipeline
|
||||
// - fileName string
|
||||
func (_e *MockForge_Expecter) File(ctx interface{}, u interface{}, r interface{}, b interface{}, fileName interface{}) *MockForge_File_Call {
|
||||
func (_e *MockForge_Expecter) File(ctx any, u any, r any, b any, fileName any) *MockForge_File_Call {
|
||||
return &MockForge_File_Call{Call: _e.mock.On("File", ctx, u, r, b, fileName)}
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ type MockForge_Hook_Call struct {
|
||||
// Hook is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - r *http.Request
|
||||
func (_e *MockForge_Expecter) Hook(ctx interface{}, r interface{}) *MockForge_Hook_Call {
|
||||
func (_e *MockForge_Expecter) Hook(ctx any, r any) *MockForge_Hook_Call {
|
||||
return &MockForge_Hook_Call{Call: _e.mock.On("Hook", ctx, r)}
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ type MockForge_Login_Call struct {
|
||||
// Login is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - r *types.OAuthRequest
|
||||
func (_e *MockForge_Expecter) Login(ctx interface{}, r interface{}) *MockForge_Login_Call {
|
||||
func (_e *MockForge_Expecter) Login(ctx any, r any) *MockForge_Login_Call {
|
||||
return &MockForge_Login_Call{Call: _e.mock.On("Login", ctx, r)}
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@ type MockForge_Netrc_Call struct {
|
||||
// Netrc is a helper method to define mock.On call
|
||||
// - u *model.User
|
||||
// - r *model.Repo
|
||||
func (_e *MockForge_Expecter) Netrc(u interface{}, r interface{}) *MockForge_Netrc_Call {
|
||||
func (_e *MockForge_Expecter) Netrc(u any, r any) *MockForge_Netrc_Call {
|
||||
return &MockForge_Netrc_Call{Call: _e.mock.On("Netrc", u, r)}
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ type MockForge_Org_Call struct {
|
||||
// - ctx context.Context
|
||||
// - u *model.User
|
||||
// - org string
|
||||
func (_e *MockForge_Expecter) Org(ctx interface{}, u interface{}, org interface{}) *MockForge_Org_Call {
|
||||
func (_e *MockForge_Expecter) Org(ctx any, u any, org any) *MockForge_Org_Call {
|
||||
return &MockForge_Org_Call{Call: _e.mock.On("Org", ctx, u, org)}
|
||||
}
|
||||
|
||||
@@ -883,7 +883,7 @@ type MockForge_OrgMembership_Call struct {
|
||||
// - ctx context.Context
|
||||
// - u *model.User
|
||||
// - org string
|
||||
func (_e *MockForge_Expecter) OrgMembership(ctx interface{}, u interface{}, org interface{}) *MockForge_OrgMembership_Call {
|
||||
func (_e *MockForge_Expecter) OrgMembership(ctx any, u any, org any) *MockForge_OrgMembership_Call {
|
||||
return &MockForge_OrgMembership_Call{Call: _e.mock.On("OrgMembership", ctx, u, org)}
|
||||
}
|
||||
|
||||
@@ -958,7 +958,7 @@ type MockForge_PullRequests_Call struct {
|
||||
// - u *model.User
|
||||
// - r *model.Repo
|
||||
// - p *model.ListOptions
|
||||
func (_e *MockForge_Expecter) PullRequests(ctx interface{}, u interface{}, r interface{}, p interface{}) *MockForge_PullRequests_Call {
|
||||
func (_e *MockForge_Expecter) PullRequests(ctx any, u any, r any, p any) *MockForge_PullRequests_Call {
|
||||
return &MockForge_PullRequests_Call{Call: _e.mock.On("PullRequests", ctx, u, r, p)}
|
||||
}
|
||||
|
||||
@@ -1039,7 +1039,7 @@ type MockForge_Repo_Call struct {
|
||||
// - remoteID model.ForgeRemoteID
|
||||
// - owner string
|
||||
// - name string
|
||||
func (_e *MockForge_Expecter) Repo(ctx interface{}, u interface{}, remoteID interface{}, owner interface{}, name interface{}) *MockForge_Repo_Call {
|
||||
func (_e *MockForge_Expecter) Repo(ctx any, u any, remoteID any, owner any, name any) *MockForge_Repo_Call {
|
||||
return &MockForge_Repo_Call{Call: _e.mock.On("Repo", ctx, u, remoteID, owner, name)}
|
||||
}
|
||||
|
||||
@@ -1123,7 +1123,7 @@ type MockForge_Repos_Call struct {
|
||||
// - ctx context.Context
|
||||
// - u *model.User
|
||||
// - p *model.ListOptions
|
||||
func (_e *MockForge_Expecter) Repos(ctx interface{}, u interface{}, p interface{}) *MockForge_Repos_Call {
|
||||
func (_e *MockForge_Expecter) Repos(ctx any, u any, p any) *MockForge_Repos_Call {
|
||||
return &MockForge_Repos_Call{Call: _e.mock.On("Repos", ctx, u, p)}
|
||||
}
|
||||
|
||||
@@ -1188,7 +1188,7 @@ type MockForge_Status_Call struct {
|
||||
// - r *model.Repo
|
||||
// - b *model.Pipeline
|
||||
// - p *model.Workflow
|
||||
func (_e *MockForge_Expecter) Status(ctx interface{}, u interface{}, r interface{}, b interface{}, p interface{}) *MockForge_Status_Call {
|
||||
func (_e *MockForge_Expecter) Status(ctx any, u any, r any, b any, p any) *MockForge_Status_Call {
|
||||
return &MockForge_Status_Call{Call: _e.mock.On("Status", ctx, u, r, b, p)}
|
||||
}
|
||||
|
||||
@@ -1272,7 +1272,7 @@ type MockForge_Teams_Call struct {
|
||||
// - ctx context.Context
|
||||
// - u *model.User
|
||||
// - p *model.ListOptions
|
||||
func (_e *MockForge_Expecter) Teams(ctx interface{}, u interface{}, p interface{}) *MockForge_Teams_Call {
|
||||
func (_e *MockForge_Expecter) Teams(ctx any, u any, p any) *MockForge_Teams_Call {
|
||||
return &MockForge_Teams_Call{Call: _e.mock.On("Teams", ctx, u, p)}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ type MockRefresher_Refresh_Call struct {
|
||||
// Refresh is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - u *model.User
|
||||
func (_e *MockRefresher_Expecter) Refresh(ctx interface{}, u interface{}) *MockRefresher_Refresh_Call {
|
||||
func (_e *MockRefresher_Expecter) Refresh(ctx any, u any) *MockRefresher_Refresh_Call {
|
||||
return &MockRefresher_Refresh_Call{Call: _e.mock.On("Refresh", ctx, u)}
|
||||
}
|
||||
|
||||
|
||||
+13
-25
@@ -14,18 +14,24 @@
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ListOptions struct {
|
||||
All bool
|
||||
Page int
|
||||
PerPage int
|
||||
}
|
||||
|
||||
func ApplyPagination[T any](d *ListOptions, slice []T) []T {
|
||||
func (d *ListOptions) All() *ListOptionsWithAll {
|
||||
return &ListOptionsWithAll{
|
||||
ListOptions: d,
|
||||
All: false,
|
||||
}
|
||||
}
|
||||
|
||||
type ListOptionsWithAll struct {
|
||||
*ListOptions
|
||||
All bool
|
||||
}
|
||||
|
||||
func ApplyPagination[T any](d *ListOptionsWithAll, slice []T) []T {
|
||||
if d.All {
|
||||
return slice
|
||||
}
|
||||
@@ -37,21 +43,3 @@ func ApplyPagination[T any](d *ListOptions, slice []T) []T {
|
||||
}
|
||||
return slice[d.PerPage*(d.Page-1) : d.PerPage*d.Page]
|
||||
}
|
||||
|
||||
func (d *ListOptions) Encode() string {
|
||||
var query []string
|
||||
|
||||
if d.Page != 0 {
|
||||
query = append(query, fmt.Sprintf("page=%d", d.Page))
|
||||
}
|
||||
|
||||
if d.PerPage != 0 {
|
||||
query = append(query, fmt.Sprintf("per_page=%d", d.PerPage))
|
||||
}
|
||||
|
||||
if d.All {
|
||||
query = append(query, "all=true")
|
||||
}
|
||||
|
||||
return strings.Join(query, "&")
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ func TestApplyPagination(t *testing.T) {
|
||||
0, 1, 2,
|
||||
}
|
||||
|
||||
assert.Equal(t, ApplyPagination(&ListOptions{All: true}, example), example)
|
||||
assert.Equal(t, ApplyPagination(&ListOptions{Page: 1, PerPage: 1}, example), []int{0})
|
||||
assert.Equal(t, ApplyPagination(&ListOptions{Page: 2, PerPage: 2}, example), []int{2})
|
||||
assert.Equal(t, ApplyPagination(&ListOptions{Page: 3, PerPage: 1}, example), []int{2})
|
||||
assert.Equal(t, ApplyPagination(&ListOptions{Page: 4, PerPage: 1}, example), []int{})
|
||||
assert.Equal(t, ApplyPagination(&ListOptions{Page: 5, PerPage: 1}, example), []int{})
|
||||
assert.Equal(t, ApplyPagination(&ListOptionsWithAll{All: true}, example), example)
|
||||
assert.Equal(t, ApplyPagination(&ListOptionsWithAll{ListOptions: &ListOptions{Page: 1, PerPage: 1}}, example), []int{0})
|
||||
assert.Equal(t, ApplyPagination(&ListOptionsWithAll{ListOptions: &ListOptions{Page: 2, PerPage: 2}}, example), []int{2})
|
||||
assert.Equal(t, ApplyPagination(&ListOptionsWithAll{ListOptions: &ListOptions{Page: 3, PerPage: 1}}, example), []int{2})
|
||||
assert.Equal(t, ApplyPagination(&ListOptionsWithAll{ListOptions: &ListOptions{Page: 4, PerPage: 1}}, example), []int{})
|
||||
assert.Equal(t, ApplyPagination(&ListOptionsWithAll{ListOptions: &ListOptions{Page: 5, PerPage: 1}}, example), []int{})
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ type MockQueue_Done_Call struct {
|
||||
// - c context.Context
|
||||
// - id string
|
||||
// - exitStatus model.StatusValue
|
||||
func (_e *MockQueue_Expecter) Done(c interface{}, id interface{}, exitStatus interface{}) *MockQueue_Done_Call {
|
||||
func (_e *MockQueue_Expecter) Done(c any, id any, exitStatus any) *MockQueue_Done_Call {
|
||||
return &MockQueue_Done_Call{Call: _e.mock.On("Done", c, id, exitStatus)}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ type MockQueue_Error_Call struct {
|
||||
// - c context.Context
|
||||
// - id string
|
||||
// - err error
|
||||
func (_e *MockQueue_Expecter) Error(c interface{}, id interface{}, err interface{}) *MockQueue_Error_Call {
|
||||
func (_e *MockQueue_Expecter) Error(c any, id any, err any) *MockQueue_Error_Call {
|
||||
return &MockQueue_Error_Call{Call: _e.mock.On("Error", c, id, err)}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ type MockQueue_ErrorAtOnce_Call struct {
|
||||
// - c context.Context
|
||||
// - ids []string
|
||||
// - err error
|
||||
func (_e *MockQueue_Expecter) ErrorAtOnce(c interface{}, ids interface{}, err interface{}) *MockQueue_ErrorAtOnce_Call {
|
||||
func (_e *MockQueue_Expecter) ErrorAtOnce(c any, ids any, err any) *MockQueue_ErrorAtOnce_Call {
|
||||
return &MockQueue_ErrorAtOnce_Call{Call: _e.mock.On("ErrorAtOnce", c, ids, err)}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ type MockQueue_Extend_Call struct {
|
||||
// - c context.Context
|
||||
// - agentID int64
|
||||
// - workflowID string
|
||||
func (_e *MockQueue_Expecter) Extend(c interface{}, agentID interface{}, workflowID interface{}) *MockQueue_Extend_Call {
|
||||
func (_e *MockQueue_Expecter) Extend(c any, agentID any, workflowID any) *MockQueue_Extend_Call {
|
||||
return &MockQueue_Extend_Call{Call: _e.mock.On("Extend", c, agentID, workflowID)}
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ type MockQueue_Info_Call struct {
|
||||
|
||||
// Info is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
func (_e *MockQueue_Expecter) Info(c interface{}) *MockQueue_Info_Call {
|
||||
func (_e *MockQueue_Expecter) Info(c any) *MockQueue_Info_Call {
|
||||
return &MockQueue_Info_Call{Call: _e.mock.On("Info", c)}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ type MockQueue_KickAgentWorkers_Call struct {
|
||||
|
||||
// KickAgentWorkers is a helper method to define mock.On call
|
||||
// - agentID int64
|
||||
func (_e *MockQueue_Expecter) KickAgentWorkers(agentID interface{}) *MockQueue_KickAgentWorkers_Call {
|
||||
func (_e *MockQueue_Expecter) KickAgentWorkers(agentID any) *MockQueue_KickAgentWorkers_Call {
|
||||
return &MockQueue_KickAgentWorkers_Call{Call: _e.mock.On("KickAgentWorkers", agentID)}
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ type MockQueue_Poll_Call struct {
|
||||
// - c context.Context
|
||||
// - agentID int64
|
||||
// - f func(*model.Task) (bool, int)
|
||||
func (_e *MockQueue_Expecter) Poll(c interface{}, agentID interface{}, f interface{}) *MockQueue_Poll_Call {
|
||||
func (_e *MockQueue_Expecter) Poll(c any, agentID any, f any) *MockQueue_Poll_Call {
|
||||
return &MockQueue_Poll_Call{Call: _e.mock.On("Poll", c, agentID, f)}
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ type MockQueue_PushAtOnce_Call struct {
|
||||
// PushAtOnce is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - tasks []*model.Task
|
||||
func (_e *MockQueue_Expecter) PushAtOnce(c interface{}, tasks interface{}) *MockQueue_PushAtOnce_Call {
|
||||
func (_e *MockQueue_Expecter) PushAtOnce(c any, tasks any) *MockQueue_PushAtOnce_Call {
|
||||
return &MockQueue_PushAtOnce_Call{Call: _e.mock.On("PushAtOnce", c, tasks)}
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ type MockQueue_Wait_Call struct {
|
||||
// Wait is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - id string
|
||||
func (_e *MockQueue_Expecter) Wait(c interface{}, id interface{}) *MockQueue_Wait_Call {
|
||||
func (_e *MockQueue_Expecter) Wait(c any, id any) *MockQueue_Wait_Call {
|
||||
return &MockQueue_Wait_Call{Call: _e.mock.On("Wait", c, id)}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ type MockScheduler_CancelWorkflows_Call struct {
|
||||
// CancelWorkflows is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - workflowIDs []string
|
||||
func (_e *MockScheduler_Expecter) CancelWorkflows(c interface{}, workflowIDs interface{}) *MockScheduler_CancelWorkflows_Call {
|
||||
func (_e *MockScheduler_Expecter) CancelWorkflows(c any, workflowIDs any) *MockScheduler_CancelWorkflows_Call {
|
||||
return &MockScheduler_CancelWorkflows_Call{Call: _e.mock.On("CancelWorkflows", c, workflowIDs)}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ type MockScheduler_Done_Call struct {
|
||||
// - c context.Context
|
||||
// - id string
|
||||
// - exitStatus model.StatusValue
|
||||
func (_e *MockScheduler_Expecter) Done(c interface{}, id interface{}, exitStatus interface{}) *MockScheduler_Done_Call {
|
||||
func (_e *MockScheduler_Expecter) Done(c any, id any, exitStatus any) *MockScheduler_Done_Call {
|
||||
return &MockScheduler_Done_Call{Call: _e.mock.On("Done", c, id, exitStatus)}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ type MockScheduler_Error_Call struct {
|
||||
// - c context.Context
|
||||
// - id string
|
||||
// - err error
|
||||
func (_e *MockScheduler_Expecter) Error(c interface{}, id interface{}, err interface{}) *MockScheduler_Error_Call {
|
||||
func (_e *MockScheduler_Expecter) Error(c any, id any, err any) *MockScheduler_Error_Call {
|
||||
return &MockScheduler_Error_Call{Call: _e.mock.On("Error", c, id, err)}
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ type MockScheduler_Extend_Call struct {
|
||||
// - c context.Context
|
||||
// - agentID int64
|
||||
// - workflowID string
|
||||
func (_e *MockScheduler_Expecter) Extend(c interface{}, agentID interface{}, workflowID interface{}) *MockScheduler_Extend_Call {
|
||||
func (_e *MockScheduler_Expecter) Extend(c any, agentID any, workflowID any) *MockScheduler_Extend_Call {
|
||||
return &MockScheduler_Extend_Call{Call: _e.mock.On("Extend", c, agentID, workflowID)}
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ type MockScheduler_Info_Call struct {
|
||||
|
||||
// Info is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
func (_e *MockScheduler_Expecter) Info(c interface{}) *MockScheduler_Info_Call {
|
||||
func (_e *MockScheduler_Expecter) Info(c any) *MockScheduler_Info_Call {
|
||||
return &MockScheduler_Info_Call{Call: _e.mock.On("Info", c)}
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ type MockScheduler_KickAgentWorkers_Call struct {
|
||||
|
||||
// KickAgentWorkers is a helper method to define mock.On call
|
||||
// - agentID int64
|
||||
func (_e *MockScheduler_Expecter) KickAgentWorkers(agentID interface{}) *MockScheduler_KickAgentWorkers_Call {
|
||||
func (_e *MockScheduler_Expecter) KickAgentWorkers(agentID any) *MockScheduler_KickAgentWorkers_Call {
|
||||
return &MockScheduler_KickAgentWorkers_Call{Call: _e.mock.On("KickAgentWorkers", agentID)}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ type MockScheduler_Poll_Call struct {
|
||||
// - agentID int64
|
||||
// - agentFilter rpc.Filter
|
||||
// - markSkipped func(taskID string) error
|
||||
func (_e *MockScheduler_Expecter) Poll(c interface{}, agentID interface{}, agentFilter interface{}, markSkipped interface{}) *MockScheduler_Poll_Call {
|
||||
func (_e *MockScheduler_Expecter) Poll(c any, agentID any, agentFilter any, markSkipped any) *MockScheduler_Poll_Call {
|
||||
return &MockScheduler_Poll_Call{Call: _e.mock.On("Poll", c, agentID, agentFilter, markSkipped)}
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ type MockScheduler_PublishPipelineEvent_Call struct {
|
||||
// - c context.Context
|
||||
// - repo *model.Repo
|
||||
// - pipeline *model.Pipeline
|
||||
func (_e *MockScheduler_Expecter) PublishPipelineEvent(c interface{}, repo interface{}, pipeline interface{}) *MockScheduler_PublishPipelineEvent_Call {
|
||||
func (_e *MockScheduler_Expecter) PublishPipelineEvent(c any, repo any, pipeline any) *MockScheduler_PublishPipelineEvent_Call {
|
||||
return &MockScheduler_PublishPipelineEvent_Call{Call: _e.mock.On("PublishPipelineEvent", c, repo, pipeline)}
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ type MockScheduler_StartPipeline_Call struct {
|
||||
// - repo *model.Repo
|
||||
// - pipeline *model.Pipeline
|
||||
// - tasks []*model.Task
|
||||
func (_e *MockScheduler_Expecter) StartPipeline(c interface{}, repo interface{}, pipeline interface{}, tasks interface{}) *MockScheduler_StartPipeline_Call {
|
||||
func (_e *MockScheduler_Expecter) StartPipeline(c any, repo any, pipeline any, tasks any) *MockScheduler_StartPipeline_Call {
|
||||
return &MockScheduler_StartPipeline_Call{Call: _e.mock.On("StartPipeline", c, repo, pipeline, tasks)}
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@ type MockScheduler_Subscribe_Call struct {
|
||||
// - c context.Context
|
||||
// - t pubsub.Topics
|
||||
// - r pubsub.Receiver
|
||||
func (_e *MockScheduler_Expecter) Subscribe(c interface{}, t interface{}, r interface{}) *MockScheduler_Subscribe_Call {
|
||||
func (_e *MockScheduler_Expecter) Subscribe(c any, t any, r any) *MockScheduler_Subscribe_Call {
|
||||
return &MockScheduler_Subscribe_Call{Call: _e.mock.On("Subscribe", c, t, r)}
|
||||
}
|
||||
|
||||
@@ -744,7 +744,7 @@ type MockScheduler_Wait_Call struct {
|
||||
// Wait is a helper method to define mock.On call
|
||||
// - c context.Context
|
||||
// - id string
|
||||
func (_e *MockScheduler_Expecter) Wait(c interface{}, id interface{}) *MockScheduler_Wait_Call {
|
||||
func (_e *MockScheduler_Expecter) Wait(c any, id any) *MockScheduler_Wait_Call {
|
||||
return &MockScheduler_Wait_Call{Call: _e.mock.On("Wait", c, id)}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ type MockService_Fetch_Call struct {
|
||||
// - pipeline *model.Pipeline
|
||||
// - oldConfigData []*types.FileMeta
|
||||
// - restart bool
|
||||
func (_e *MockService_Expecter) Fetch(ctx interface{}, forge1 interface{}, user interface{}, repo interface{}, pipeline interface{}, oldConfigData interface{}, restart interface{}) *MockService_Fetch_Call {
|
||||
func (_e *MockService_Expecter) Fetch(ctx any, forge1 any, user any, repo any, pipeline any, oldConfigData any, restart any) *MockService_Fetch_Call {
|
||||
return &MockService_Fetch_Call{Call: _e.mock.On("Fetch", ctx, forge1, user, repo, pipeline, oldConfigData, restart)}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ type MockService_EnvironList_Call struct {
|
||||
|
||||
// EnvironList is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
func (_e *MockService_Expecter) EnvironList(repo interface{}) *MockService_EnvironList_Call {
|
||||
func (_e *MockService_Expecter) EnvironList(repo any) *MockService_EnvironList_Call {
|
||||
return &MockService_EnvironList_Call{Call: _e.mock.On("EnvironList", repo)}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ type MockService_LogAppend_Call struct {
|
||||
// LogAppend is a helper method to define mock.On call
|
||||
// - step *model.Step
|
||||
// - logEntries []*model.LogEntry
|
||||
func (_e *MockService_Expecter) LogAppend(step interface{}, logEntries interface{}) *MockService_LogAppend_Call {
|
||||
func (_e *MockService_Expecter) LogAppend(step any, logEntries any) *MockService_LogAppend_Call {
|
||||
return &MockService_LogAppend_Call{Call: _e.mock.On("LogAppend", step, logEntries)}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ type MockService_LogDelete_Call struct {
|
||||
|
||||
// LogDelete is a helper method to define mock.On call
|
||||
// - step *model.Step
|
||||
func (_e *MockService_Expecter) LogDelete(step interface{}) *MockService_LogDelete_Call {
|
||||
func (_e *MockService_Expecter) LogDelete(step any) *MockService_LogDelete_Call {
|
||||
return &MockService_LogDelete_Call{Call: _e.mock.On("LogDelete", step)}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ type MockService_LogFind_Call struct {
|
||||
|
||||
// LogFind is a helper method to define mock.On call
|
||||
// - step *model.Step
|
||||
func (_e *MockService_Expecter) LogFind(step interface{}) *MockService_LogFind_Call {
|
||||
func (_e *MockService_Expecter) LogFind(step any) *MockService_LogFind_Call {
|
||||
return &MockService_LogFind_Call{Call: _e.mock.On("LogFind", step)}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ type MockService_StepFinished_Call struct {
|
||||
|
||||
// StepFinished is a helper method to define mock.On call
|
||||
// - step *model.Step
|
||||
func (_e *MockService_Expecter) StepFinished(step interface{}) *MockService_StepFinished_Call {
|
||||
func (_e *MockService_Expecter) StepFinished(step any) *MockService_StepFinished_Call {
|
||||
return &MockService_StepFinished_Call{Call: _e.mock.On("StepFinished", step)}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ type MockManager_ConfigServiceFromRepo_Call struct {
|
||||
|
||||
// ConfigServiceFromRepo is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
func (_e *MockManager_Expecter) ConfigServiceFromRepo(repo interface{}) *MockManager_ConfigServiceFromRepo_Call {
|
||||
func (_e *MockManager_Expecter) ConfigServiceFromRepo(repo any) *MockManager_ConfigServiceFromRepo_Call {
|
||||
return &MockManager_ConfigServiceFromRepo_Call{Call: _e.mock.On("ConfigServiceFromRepo", repo)}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ type MockManager_ForgeByID_Call struct {
|
||||
|
||||
// ForgeByID is a helper method to define mock.On call
|
||||
// - forgeID int64
|
||||
func (_e *MockManager_Expecter) ForgeByID(forgeID interface{}) *MockManager_ForgeByID_Call {
|
||||
func (_e *MockManager_Expecter) ForgeByID(forgeID any) *MockManager_ForgeByID_Call {
|
||||
return &MockManager_ForgeByID_Call{Call: _e.mock.On("ForgeByID", forgeID)}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ type MockManager_ForgeFromRepo_Call struct {
|
||||
|
||||
// ForgeFromRepo is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
func (_e *MockManager_Expecter) ForgeFromRepo(repo interface{}) *MockManager_ForgeFromRepo_Call {
|
||||
func (_e *MockManager_Expecter) ForgeFromRepo(repo any) *MockManager_ForgeFromRepo_Call {
|
||||
return &MockManager_ForgeFromRepo_Call{Call: _e.mock.On("ForgeFromRepo", repo)}
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ type MockManager_ForgeFromUser_Call struct {
|
||||
|
||||
// ForgeFromUser is a helper method to define mock.On call
|
||||
// - user *model.User
|
||||
func (_e *MockManager_Expecter) ForgeFromUser(user interface{}) *MockManager_ForgeFromUser_Call {
|
||||
func (_e *MockManager_Expecter) ForgeFromUser(user any) *MockManager_ForgeFromUser_Call {
|
||||
return &MockManager_ForgeFromUser_Call{Call: _e.mock.On("ForgeFromUser", user)}
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ type MockManager_RegistryServiceFromRepo_Call struct {
|
||||
|
||||
// RegistryServiceFromRepo is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
func (_e *MockManager_Expecter) RegistryServiceFromRepo(repo interface{}) *MockManager_RegistryServiceFromRepo_Call {
|
||||
func (_e *MockManager_Expecter) RegistryServiceFromRepo(repo any) *MockManager_RegistryServiceFromRepo_Call {
|
||||
return &MockManager_RegistryServiceFromRepo_Call{Call: _e.mock.On("RegistryServiceFromRepo", repo)}
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ type MockManager_SecretServiceFromRepo_Call struct {
|
||||
|
||||
// SecretServiceFromRepo is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
func (_e *MockManager_Expecter) SecretServiceFromRepo(repo interface{}) *MockManager_SecretServiceFromRepo_Call {
|
||||
func (_e *MockManager_Expecter) SecretServiceFromRepo(repo any) *MockManager_SecretServiceFromRepo_Call {
|
||||
return &MockManager_SecretServiceFromRepo_Call{Call: _e.mock.On("SecretServiceFromRepo", repo)}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ func (c *combined) RegistryFind(repo *model.Repo, addr string) (*model.Registry,
|
||||
return c.dbRegistry.RegistryFind(repo, addr)
|
||||
}
|
||||
|
||||
func (c *combined) RegistryList(repo *model.Repo, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (c *combined) RegistryList(repo *model.Repo, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return c.dbRegistry.RegistryList(repo, p)
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ func (c *combined) RegistryListPipeline(ctx context.Context, repo *model.Repo, p
|
||||
}
|
||||
|
||||
for _, registry := range c.registries {
|
||||
list, err := registry.GlobalRegistryList(&model.ListOptions{All: true})
|
||||
list, err := registry.GlobalRegistryList(&model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func (c *combined) OrgRegistryFind(owner int64, addr string) (*model.Registry, e
|
||||
return c.dbRegistry.OrgRegistryFind(owner, addr)
|
||||
}
|
||||
|
||||
func (c *combined) OrgRegistryList(owner int64, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (c *combined) OrgRegistryList(owner int64, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return c.dbRegistry.OrgRegistryList(owner, p)
|
||||
}
|
||||
|
||||
@@ -123,8 +123,8 @@ func (c *combined) GlobalRegistryFind(addr string) (*model.Registry, error) {
|
||||
return nil, types.ErrRecordNotExist
|
||||
}
|
||||
|
||||
func (c *combined) GlobalRegistryList(p *model.ListOptions) ([]*model.Registry, error) {
|
||||
dbRegistries, err := c.dbRegistry.GlobalRegistryList(&model.ListOptions{All: true})
|
||||
func (c *combined) GlobalRegistryList(p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
dbRegistries, err := c.dbRegistry.GlobalRegistryList(&model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -139,7 +139,7 @@ func (c *combined) GlobalRegistryList(p *model.ListOptions) ([]*model.Registry,
|
||||
}
|
||||
|
||||
for _, registry := range c.registries {
|
||||
list, err := registry.GlobalRegistryList(&model.ListOptions{All: true})
|
||||
list, err := registry.GlobalRegistryList(&model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -34,12 +34,12 @@ func (d *db) RegistryFind(repo *model.Repo, addr string) (*model.Registry, error
|
||||
return d.store.RegistryFind(repo, addr)
|
||||
}
|
||||
|
||||
func (d *db) RegistryList(repo *model.Repo, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (d *db) RegistryList(repo *model.Repo, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return d.store.RegistryList(repo, false, p)
|
||||
}
|
||||
|
||||
func (d *db) RegistryListPipeline(_ context.Context, repo *model.Repo, _ *model.Pipeline, _ *model.Netrc) ([]*model.Registry, error) {
|
||||
r, err := d.store.RegistryList(repo, true, &model.ListOptions{All: true})
|
||||
r, err := d.store.RegistryList(repo, true, &model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func (d *db) OrgRegistryFind(owner int64, name string) (*model.Registry, error)
|
||||
return d.store.OrgRegistryFind(owner, name)
|
||||
}
|
||||
|
||||
func (d *db) OrgRegistryList(owner int64, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (d *db) OrgRegistryList(owner int64, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return d.store.OrgRegistryList(owner, p)
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (d *db) GlobalRegistryFind(addr string) (*model.Registry, error) {
|
||||
return d.store.GlobalRegistryFind(addr)
|
||||
}
|
||||
|
||||
func (d *db) GlobalRegistryList(p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (d *db) GlobalRegistryList(p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return d.store.GlobalRegistryList(p)
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ func parseDockerConfig(path string) ([]*model.Registry, error) {
|
||||
}
|
||||
|
||||
func (f *filesystem) GlobalRegistryFind(addr string) (*model.Registry, error) {
|
||||
registries, err := f.GlobalRegistryList(&model.ListOptions{All: true})
|
||||
registries, err := f.GlobalRegistryList(&model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func (f *filesystem) GlobalRegistryFind(addr string) (*model.Registry, error) {
|
||||
return nil, store_types.ErrRecordNotExist
|
||||
}
|
||||
|
||||
func (f *filesystem) GlobalRegistryList(p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (f *filesystem) GlobalRegistryList(p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
regs, err := parseDockerConfig(f.path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -71,7 +71,7 @@ type MockReadOnlyService_GlobalRegistryFind_Call struct {
|
||||
|
||||
// GlobalRegistryFind is a helper method to define mock.On call
|
||||
// - s string
|
||||
func (_e *MockReadOnlyService_Expecter) GlobalRegistryFind(s interface{}) *MockReadOnlyService_GlobalRegistryFind_Call {
|
||||
func (_e *MockReadOnlyService_Expecter) GlobalRegistryFind(s any) *MockReadOnlyService_GlobalRegistryFind_Call {
|
||||
return &MockReadOnlyService_GlobalRegistryFind_Call{Call: _e.mock.On("GlobalRegistryFind", s)}
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ func (_c *MockReadOnlyService_GlobalRegistryFind_Call) RunAndReturn(run func(s s
|
||||
}
|
||||
|
||||
// GlobalRegistryList provides a mock function for the type MockReadOnlyService
|
||||
func (_mock *MockReadOnlyService) GlobalRegistryList(listOptions *model.ListOptions) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(listOptions)
|
||||
func (_mock *MockReadOnlyService) GlobalRegistryList(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GlobalRegistryList")
|
||||
@@ -108,18 +108,18 @@ func (_mock *MockReadOnlyService) GlobalRegistryList(listOptions *model.ListOpti
|
||||
|
||||
var r0 []*model.Registry
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.Registry); ok {
|
||||
r0 = returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.Registry); ok {
|
||||
r0 = returnFunc(listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Registry)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.ListOptions) error); ok {
|
||||
r1 = returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -132,16 +132,16 @@ type MockReadOnlyService_GlobalRegistryList_Call struct {
|
||||
}
|
||||
|
||||
// GlobalRegistryList is a helper method to define mock.On call
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockReadOnlyService_Expecter) GlobalRegistryList(listOptions interface{}) *MockReadOnlyService_GlobalRegistryList_Call {
|
||||
return &MockReadOnlyService_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockReadOnlyService_Expecter) GlobalRegistryList(listOptionsWithAll any) *MockReadOnlyService_GlobalRegistryList_Call {
|
||||
return &MockReadOnlyService_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockReadOnlyService_GlobalRegistryList_Call) Run(run func(listOptions *model.ListOptions)) *MockReadOnlyService_GlobalRegistryList_Call {
|
||||
func (_c *MockReadOnlyService_GlobalRegistryList_Call) Run(run func(listOptionsWithAll *model.ListOptionsWithAll)) *MockReadOnlyService_GlobalRegistryList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 *model.ListOptions
|
||||
var arg0 *model.ListOptionsWithAll
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(*model.ListOptions)
|
||||
arg0 = args[0].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -155,7 +155,7 @@ func (_c *MockReadOnlyService_GlobalRegistryList_Call) Return(registrys []*model
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockReadOnlyService_GlobalRegistryList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Registry, error)) *MockReadOnlyService_GlobalRegistryList_Call {
|
||||
func (_c *MockReadOnlyService_GlobalRegistryList_Call) RunAndReturn(run func(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockReadOnlyService_GlobalRegistryList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ type MockService_GlobalRegistryCreate_Call struct {
|
||||
|
||||
// GlobalRegistryCreate is a helper method to define mock.On call
|
||||
// - registry *model.Registry
|
||||
func (_e *MockService_Expecter) GlobalRegistryCreate(registry interface{}) *MockService_GlobalRegistryCreate_Call {
|
||||
func (_e *MockService_Expecter) GlobalRegistryCreate(registry any) *MockService_GlobalRegistryCreate_Call {
|
||||
return &MockService_GlobalRegistryCreate_Call{Call: _e.mock.On("GlobalRegistryCreate", registry)}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ type MockService_GlobalRegistryDelete_Call struct {
|
||||
|
||||
// GlobalRegistryDelete is a helper method to define mock.On call
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) GlobalRegistryDelete(s interface{}) *MockService_GlobalRegistryDelete_Call {
|
||||
func (_e *MockService_Expecter) GlobalRegistryDelete(s any) *MockService_GlobalRegistryDelete_Call {
|
||||
return &MockService_GlobalRegistryDelete_Call{Call: _e.mock.On("GlobalRegistryDelete", s)}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ type MockService_GlobalRegistryFind_Call struct {
|
||||
|
||||
// GlobalRegistryFind is a helper method to define mock.On call
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) GlobalRegistryFind(s interface{}) *MockService_GlobalRegistryFind_Call {
|
||||
func (_e *MockService_Expecter) GlobalRegistryFind(s any) *MockService_GlobalRegistryFind_Call {
|
||||
return &MockService_GlobalRegistryFind_Call{Call: _e.mock.On("GlobalRegistryFind", s)}
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ func (_c *MockService_GlobalRegistryFind_Call) RunAndReturn(run func(s string) (
|
||||
}
|
||||
|
||||
// GlobalRegistryList provides a mock function for the type MockService
|
||||
func (_mock *MockService) GlobalRegistryList(listOptions *model.ListOptions) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(listOptions)
|
||||
func (_mock *MockService) GlobalRegistryList(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GlobalRegistryList")
|
||||
@@ -212,18 +212,18 @@ func (_mock *MockService) GlobalRegistryList(listOptions *model.ListOptions) ([]
|
||||
|
||||
var r0 []*model.Registry
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.Registry); ok {
|
||||
r0 = returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.Registry); ok {
|
||||
r0 = returnFunc(listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Registry)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.ListOptions) error); ok {
|
||||
r1 = returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -236,16 +236,16 @@ type MockService_GlobalRegistryList_Call struct {
|
||||
}
|
||||
|
||||
// GlobalRegistryList is a helper method to define mock.On call
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockService_Expecter) GlobalRegistryList(listOptions interface{}) *MockService_GlobalRegistryList_Call {
|
||||
return &MockService_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockService_Expecter) GlobalRegistryList(listOptionsWithAll any) *MockService_GlobalRegistryList_Call {
|
||||
return &MockService_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockService_GlobalRegistryList_Call) Run(run func(listOptions *model.ListOptions)) *MockService_GlobalRegistryList_Call {
|
||||
func (_c *MockService_GlobalRegistryList_Call) Run(run func(listOptionsWithAll *model.ListOptionsWithAll)) *MockService_GlobalRegistryList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 *model.ListOptions
|
||||
var arg0 *model.ListOptionsWithAll
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(*model.ListOptions)
|
||||
arg0 = args[0].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -259,7 +259,7 @@ func (_c *MockService_GlobalRegistryList_Call) Return(registrys []*model.Registr
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockService_GlobalRegistryList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Registry, error)) *MockService_GlobalRegistryList_Call {
|
||||
func (_c *MockService_GlobalRegistryList_Call) RunAndReturn(run func(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockService_GlobalRegistryList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
@@ -288,7 +288,7 @@ type MockService_GlobalRegistryUpdate_Call struct {
|
||||
|
||||
// GlobalRegistryUpdate is a helper method to define mock.On call
|
||||
// - registry *model.Registry
|
||||
func (_e *MockService_Expecter) GlobalRegistryUpdate(registry interface{}) *MockService_GlobalRegistryUpdate_Call {
|
||||
func (_e *MockService_Expecter) GlobalRegistryUpdate(registry any) *MockService_GlobalRegistryUpdate_Call {
|
||||
return &MockService_GlobalRegistryUpdate_Call{Call: _e.mock.On("GlobalRegistryUpdate", registry)}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ type MockService_OrgRegistryCreate_Call struct {
|
||||
// OrgRegistryCreate is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - registry *model.Registry
|
||||
func (_e *MockService_Expecter) OrgRegistryCreate(n interface{}, registry interface{}) *MockService_OrgRegistryCreate_Call {
|
||||
func (_e *MockService_Expecter) OrgRegistryCreate(n any, registry any) *MockService_OrgRegistryCreate_Call {
|
||||
return &MockService_OrgRegistryCreate_Call{Call: _e.mock.On("OrgRegistryCreate", n, registry)}
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ type MockService_OrgRegistryDelete_Call struct {
|
||||
// OrgRegistryDelete is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) OrgRegistryDelete(n interface{}, s interface{}) *MockService_OrgRegistryDelete_Call {
|
||||
func (_e *MockService_Expecter) OrgRegistryDelete(n any, s any) *MockService_OrgRegistryDelete_Call {
|
||||
return &MockService_OrgRegistryDelete_Call{Call: _e.mock.On("OrgRegistryDelete", n, s)}
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ type MockService_OrgRegistryFind_Call struct {
|
||||
// OrgRegistryFind is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) OrgRegistryFind(n interface{}, s interface{}) *MockService_OrgRegistryFind_Call {
|
||||
func (_e *MockService_Expecter) OrgRegistryFind(n any, s any) *MockService_OrgRegistryFind_Call {
|
||||
return &MockService_OrgRegistryFind_Call{Call: _e.mock.On("OrgRegistryFind", n, s)}
|
||||
}
|
||||
|
||||
@@ -498,8 +498,8 @@ func (_c *MockService_OrgRegistryFind_Call) RunAndReturn(run func(n int64, s str
|
||||
}
|
||||
|
||||
// OrgRegistryList provides a mock function for the type MockService
|
||||
func (_mock *MockService) OrgRegistryList(n int64, listOptions *model.ListOptions) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(n, listOptions)
|
||||
func (_mock *MockService) OrgRegistryList(n int64, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(n, listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for OrgRegistryList")
|
||||
@@ -507,18 +507,18 @@ func (_mock *MockService) OrgRegistryList(n int64, listOptions *model.ListOption
|
||||
|
||||
var r0 []*model.Registry
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(n, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptionsWithAll) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(n, listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) []*model.Registry); ok {
|
||||
r0 = returnFunc(n, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptionsWithAll) []*model.Registry); ok {
|
||||
r0 = returnFunc(n, listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Registry)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptions) error); ok {
|
||||
r1 = returnFunc(n, listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(n, listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -532,20 +532,20 @@ type MockService_OrgRegistryList_Call struct {
|
||||
|
||||
// OrgRegistryList is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockService_Expecter) OrgRegistryList(n interface{}, listOptions interface{}) *MockService_OrgRegistryList_Call {
|
||||
return &MockService_OrgRegistryList_Call{Call: _e.mock.On("OrgRegistryList", n, listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockService_Expecter) OrgRegistryList(n any, listOptionsWithAll any) *MockService_OrgRegistryList_Call {
|
||||
return &MockService_OrgRegistryList_Call{Call: _e.mock.On("OrgRegistryList", n, listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockService_OrgRegistryList_Call) Run(run func(n int64, listOptions *model.ListOptions)) *MockService_OrgRegistryList_Call {
|
||||
func (_c *MockService_OrgRegistryList_Call) Run(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll)) *MockService_OrgRegistryList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 int64
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(int64)
|
||||
}
|
||||
var arg1 *model.ListOptions
|
||||
var arg1 *model.ListOptionsWithAll
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*model.ListOptions)
|
||||
arg1 = args[1].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -560,7 +560,7 @@ func (_c *MockService_OrgRegistryList_Call) Return(registrys []*model.Registry,
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockService_OrgRegistryList_Call) RunAndReturn(run func(n int64, listOptions *model.ListOptions) ([]*model.Registry, error)) *MockService_OrgRegistryList_Call {
|
||||
func (_c *MockService_OrgRegistryList_Call) RunAndReturn(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockService_OrgRegistryList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
@@ -590,7 +590,7 @@ type MockService_OrgRegistryUpdate_Call struct {
|
||||
// OrgRegistryUpdate is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - registry *model.Registry
|
||||
func (_e *MockService_Expecter) OrgRegistryUpdate(n interface{}, registry interface{}) *MockService_OrgRegistryUpdate_Call {
|
||||
func (_e *MockService_Expecter) OrgRegistryUpdate(n any, registry any) *MockService_OrgRegistryUpdate_Call {
|
||||
return &MockService_OrgRegistryUpdate_Call{Call: _e.mock.On("OrgRegistryUpdate", n, registry)}
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ type MockService_RegistryCreate_Call struct {
|
||||
// RegistryCreate is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - registry *model.Registry
|
||||
func (_e *MockService_Expecter) RegistryCreate(repo interface{}, registry interface{}) *MockService_RegistryCreate_Call {
|
||||
func (_e *MockService_Expecter) RegistryCreate(repo any, registry any) *MockService_RegistryCreate_Call {
|
||||
return &MockService_RegistryCreate_Call{Call: _e.mock.On("RegistryCreate", repo, registry)}
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ type MockService_RegistryDelete_Call struct {
|
||||
// RegistryDelete is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) RegistryDelete(repo interface{}, s interface{}) *MockService_RegistryDelete_Call {
|
||||
func (_e *MockService_Expecter) RegistryDelete(repo any, s any) *MockService_RegistryDelete_Call {
|
||||
return &MockService_RegistryDelete_Call{Call: _e.mock.On("RegistryDelete", repo, s)}
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ type MockService_RegistryFind_Call struct {
|
||||
// RegistryFind is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) RegistryFind(repo interface{}, s interface{}) *MockService_RegistryFind_Call {
|
||||
func (_e *MockService_Expecter) RegistryFind(repo any, s any) *MockService_RegistryFind_Call {
|
||||
return &MockService_RegistryFind_Call{Call: _e.mock.On("RegistryFind", repo, s)}
|
||||
}
|
||||
|
||||
@@ -805,8 +805,8 @@ func (_c *MockService_RegistryFind_Call) RunAndReturn(run func(repo *model.Repo,
|
||||
}
|
||||
|
||||
// RegistryList provides a mock function for the type MockService
|
||||
func (_mock *MockService) RegistryList(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(repo, listOptions)
|
||||
func (_mock *MockService) RegistryList(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
ret := _mock.Called(repo, listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RegistryList")
|
||||
@@ -814,18 +814,18 @@ func (_mock *MockService) RegistryList(repo *model.Repo, listOptions *model.List
|
||||
|
||||
var r0 []*model.Registry
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(repo, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll) ([]*model.Registry, error)); ok {
|
||||
return returnFunc(repo, listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) []*model.Registry); ok {
|
||||
r0 = returnFunc(repo, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll) []*model.Registry); ok {
|
||||
r0 = returnFunc(repo, listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Registry)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.Repo, *model.ListOptions) error); ok {
|
||||
r1 = returnFunc(repo, listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.Repo, *model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(repo, listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -839,20 +839,20 @@ type MockService_RegistryList_Call struct {
|
||||
|
||||
// RegistryList is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockService_Expecter) RegistryList(repo interface{}, listOptions interface{}) *MockService_RegistryList_Call {
|
||||
return &MockService_RegistryList_Call{Call: _e.mock.On("RegistryList", repo, listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockService_Expecter) RegistryList(repo any, listOptionsWithAll any) *MockService_RegistryList_Call {
|
||||
return &MockService_RegistryList_Call{Call: _e.mock.On("RegistryList", repo, listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockService_RegistryList_Call) Run(run func(repo *model.Repo, listOptions *model.ListOptions)) *MockService_RegistryList_Call {
|
||||
func (_c *MockService_RegistryList_Call) Run(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll)) *MockService_RegistryList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 *model.Repo
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(*model.Repo)
|
||||
}
|
||||
var arg1 *model.ListOptions
|
||||
var arg1 *model.ListOptionsWithAll
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*model.ListOptions)
|
||||
arg1 = args[1].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -867,7 +867,7 @@ func (_c *MockService_RegistryList_Call) Return(registrys []*model.Registry, err
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockService_RegistryList_Call) RunAndReturn(run func(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Registry, error)) *MockService_RegistryList_Call {
|
||||
func (_c *MockService_RegistryList_Call) RunAndReturn(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockService_RegistryList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
@@ -910,7 +910,7 @@ type MockService_RegistryListPipeline_Call struct {
|
||||
// - repo *model.Repo
|
||||
// - pipeline *model.Pipeline
|
||||
// - netrc *model.Netrc
|
||||
func (_e *MockService_Expecter) RegistryListPipeline(context1 interface{}, repo interface{}, pipeline interface{}, netrc interface{}) *MockService_RegistryListPipeline_Call {
|
||||
func (_e *MockService_Expecter) RegistryListPipeline(context1 any, repo any, pipeline any, netrc any) *MockService_RegistryListPipeline_Call {
|
||||
return &MockService_RegistryListPipeline_Call{Call: _e.mock.On("RegistryListPipeline", context1, repo, pipeline, netrc)}
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ type MockService_RegistryUpdate_Call struct {
|
||||
// RegistryUpdate is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - registry *model.Registry
|
||||
func (_e *MockService_Expecter) RegistryUpdate(repo interface{}, registry interface{}) *MockService_RegistryUpdate_Call {
|
||||
func (_e *MockService_Expecter) RegistryUpdate(repo any, registry any) *MockService_RegistryUpdate_Call {
|
||||
return &MockService_RegistryUpdate_Call{Call: _e.mock.On("RegistryUpdate", repo, registry)}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,19 +25,19 @@ type Service interface {
|
||||
RegistryListPipeline(context.Context, *model.Repo, *model.Pipeline, *model.Netrc) ([]*model.Registry, error)
|
||||
// Repository registries
|
||||
RegistryFind(*model.Repo, string) (*model.Registry, error)
|
||||
RegistryList(*model.Repo, *model.ListOptions) ([]*model.Registry, error)
|
||||
RegistryList(*model.Repo, *model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
RegistryCreate(*model.Repo, *model.Registry) error
|
||||
RegistryUpdate(*model.Repo, *model.Registry) error
|
||||
RegistryDelete(*model.Repo, string) error
|
||||
// Organization registries
|
||||
OrgRegistryFind(int64, string) (*model.Registry, error)
|
||||
OrgRegistryList(int64, *model.ListOptions) ([]*model.Registry, error)
|
||||
OrgRegistryList(int64, *model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
OrgRegistryCreate(int64, *model.Registry) error
|
||||
OrgRegistryUpdate(int64, *model.Registry) error
|
||||
OrgRegistryDelete(int64, string) error
|
||||
// Global registries
|
||||
GlobalRegistryFind(string) (*model.Registry, error)
|
||||
GlobalRegistryList(*model.ListOptions) ([]*model.Registry, error)
|
||||
GlobalRegistryList(*model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
GlobalRegistryCreate(*model.Registry) error
|
||||
GlobalRegistryUpdate(*model.Registry) error
|
||||
GlobalRegistryDelete(string) error
|
||||
@@ -46,5 +46,5 @@ type Service interface {
|
||||
// ReadOnlyService defines a service for managing registries.
|
||||
type ReadOnlyService interface {
|
||||
GlobalRegistryFind(string) (*model.Registry, error)
|
||||
GlobalRegistryList(*model.ListOptions) ([]*model.Registry, error)
|
||||
GlobalRegistryList(*model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ func (w *withExtension) RegistryFind(repo *model.Repo, addr string) (*model.Regi
|
||||
return w.base.RegistryFind(repo, addr)
|
||||
}
|
||||
|
||||
func (w *withExtension) RegistryList(repo *model.Repo, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (w *withExtension) RegistryList(repo *model.Repo, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return w.base.RegistryList(repo, p)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ func (w *withExtension) OrgRegistryFind(owner int64, addr string) (*model.Regist
|
||||
return w.base.OrgRegistryFind(owner, addr)
|
||||
}
|
||||
|
||||
func (w *withExtension) OrgRegistryList(owner int64, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (w *withExtension) OrgRegistryList(owner int64, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return w.base.OrgRegistryList(owner, p)
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ func (w *withExtension) GlobalRegistryFind(addr string) (*model.Registry, error)
|
||||
return w.base.GlobalRegistryFind(addr)
|
||||
}
|
||||
|
||||
func (w *withExtension) GlobalRegistryList(p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (w *withExtension) GlobalRegistryList(p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
return w.base.GlobalRegistryList(p)
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ func (c *combined) SecretFind(repo *model.Repo, name string) (*model.Secret, err
|
||||
return c.base.SecretFind(repo, name)
|
||||
}
|
||||
|
||||
func (c *combined) SecretList(repo *model.Repo, p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (c *combined) SecretList(repo *model.Repo, p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
return c.base.SecretList(repo, p)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ func (c *combined) OrgSecretFind(orgID int64, name string) (*model.Secret, error
|
||||
return c.base.OrgSecretFind(orgID, name)
|
||||
}
|
||||
|
||||
func (c *combined) OrgSecretList(orgID int64, p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (c *combined) OrgSecretList(orgID int64, p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
return c.base.OrgSecretList(orgID, p)
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *combined) GlobalSecretFind(name string) (*model.Secret, error) {
|
||||
return c.base.GlobalSecretFind(name)
|
||||
}
|
||||
|
||||
func (c *combined) GlobalSecretList(p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (c *combined) GlobalSecretList(p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
return c.base.GlobalSecretList(p)
|
||||
}
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@ func (d *db) SecretFind(repo *model.Repo, name string) (*model.Secret, error) {
|
||||
return d.store.SecretFind(repo, name)
|
||||
}
|
||||
|
||||
func (d *db) SecretList(repo *model.Repo, p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (d *db) SecretList(repo *model.Repo, p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
return d.store.SecretList(repo, false, p)
|
||||
}
|
||||
|
||||
func (d *db) SecretListPipeline(_ context.Context, repo *model.Repo, _ *model.Pipeline, _ *model.Netrc) ([]*model.Secret, error) {
|
||||
s, err := d.store.SecretList(repo, true, &model.ListOptions{All: true})
|
||||
s, err := d.store.SecretList(repo, true, &model.ListOptionsWithAll{All: true})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func (d *db) OrgSecretFind(owner int64, name string) (*model.Secret, error) {
|
||||
return d.store.OrgSecretFind(owner, name)
|
||||
}
|
||||
|
||||
func (d *db) OrgSecretList(owner int64, p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (d *db) OrgSecretList(owner int64, p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
return d.store.OrgSecretList(owner, p)
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (d *db) GlobalSecretFind(owner string) (*model.Secret, error) {
|
||||
return d.store.GlobalSecretFind(owner)
|
||||
}
|
||||
|
||||
func (d *db) GlobalSecretList(p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (d *db) GlobalSecretList(p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
return d.store.GlobalSecretList(p)
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ type MockService_GlobalSecretCreate_Call struct {
|
||||
|
||||
// GlobalSecretCreate is a helper method to define mock.On call
|
||||
// - secret *model.Secret
|
||||
func (_e *MockService_Expecter) GlobalSecretCreate(secret interface{}) *MockService_GlobalSecretCreate_Call {
|
||||
func (_e *MockService_Expecter) GlobalSecretCreate(secret any) *MockService_GlobalSecretCreate_Call {
|
||||
return &MockService_GlobalSecretCreate_Call{Call: _e.mock.On("GlobalSecretCreate", secret)}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ type MockService_GlobalSecretDelete_Call struct {
|
||||
|
||||
// GlobalSecretDelete is a helper method to define mock.On call
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) GlobalSecretDelete(s interface{}) *MockService_GlobalSecretDelete_Call {
|
||||
func (_e *MockService_Expecter) GlobalSecretDelete(s any) *MockService_GlobalSecretDelete_Call {
|
||||
return &MockService_GlobalSecretDelete_Call{Call: _e.mock.On("GlobalSecretDelete", s)}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ type MockService_GlobalSecretFind_Call struct {
|
||||
|
||||
// GlobalSecretFind is a helper method to define mock.On call
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) GlobalSecretFind(s interface{}) *MockService_GlobalSecretFind_Call {
|
||||
func (_e *MockService_Expecter) GlobalSecretFind(s any) *MockService_GlobalSecretFind_Call {
|
||||
return &MockService_GlobalSecretFind_Call{Call: _e.mock.On("GlobalSecretFind", s)}
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ func (_c *MockService_GlobalSecretFind_Call) RunAndReturn(run func(s string) (*m
|
||||
}
|
||||
|
||||
// GlobalSecretList provides a mock function for the type MockService
|
||||
func (_mock *MockService) GlobalSecretList(listOptions *model.ListOptions) ([]*model.Secret, error) {
|
||||
ret := _mock.Called(listOptions)
|
||||
func (_mock *MockService) GlobalSecretList(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
ret := _mock.Called(listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GlobalSecretList")
|
||||
@@ -212,18 +212,18 @@ func (_mock *MockService) GlobalSecretList(listOptions *model.ListOptions) ([]*m
|
||||
|
||||
var r0 []*model.Secret
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Secret, error)); ok {
|
||||
return returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.Secret, error)); ok {
|
||||
return returnFunc(listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.Secret); ok {
|
||||
r0 = returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.Secret); ok {
|
||||
r0 = returnFunc(listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Secret)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.ListOptions) error); ok {
|
||||
r1 = returnFunc(listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -236,16 +236,16 @@ type MockService_GlobalSecretList_Call struct {
|
||||
}
|
||||
|
||||
// GlobalSecretList is a helper method to define mock.On call
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockService_Expecter) GlobalSecretList(listOptions interface{}) *MockService_GlobalSecretList_Call {
|
||||
return &MockService_GlobalSecretList_Call{Call: _e.mock.On("GlobalSecretList", listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockService_Expecter) GlobalSecretList(listOptionsWithAll any) *MockService_GlobalSecretList_Call {
|
||||
return &MockService_GlobalSecretList_Call{Call: _e.mock.On("GlobalSecretList", listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockService_GlobalSecretList_Call) Run(run func(listOptions *model.ListOptions)) *MockService_GlobalSecretList_Call {
|
||||
func (_c *MockService_GlobalSecretList_Call) Run(run func(listOptionsWithAll *model.ListOptionsWithAll)) *MockService_GlobalSecretList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 *model.ListOptions
|
||||
var arg0 *model.ListOptionsWithAll
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(*model.ListOptions)
|
||||
arg0 = args[0].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -259,7 +259,7 @@ func (_c *MockService_GlobalSecretList_Call) Return(secrets []*model.Secret, err
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockService_GlobalSecretList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Secret, error)) *MockService_GlobalSecretList_Call {
|
||||
func (_c *MockService_GlobalSecretList_Call) RunAndReturn(run func(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error)) *MockService_GlobalSecretList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
@@ -288,7 +288,7 @@ type MockService_GlobalSecretUpdate_Call struct {
|
||||
|
||||
// GlobalSecretUpdate is a helper method to define mock.On call
|
||||
// - secret *model.Secret
|
||||
func (_e *MockService_Expecter) GlobalSecretUpdate(secret interface{}) *MockService_GlobalSecretUpdate_Call {
|
||||
func (_e *MockService_Expecter) GlobalSecretUpdate(secret any) *MockService_GlobalSecretUpdate_Call {
|
||||
return &MockService_GlobalSecretUpdate_Call{Call: _e.mock.On("GlobalSecretUpdate", secret)}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ type MockService_OrgSecretCreate_Call struct {
|
||||
// OrgSecretCreate is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - secret *model.Secret
|
||||
func (_e *MockService_Expecter) OrgSecretCreate(n interface{}, secret interface{}) *MockService_OrgSecretCreate_Call {
|
||||
func (_e *MockService_Expecter) OrgSecretCreate(n any, secret any) *MockService_OrgSecretCreate_Call {
|
||||
return &MockService_OrgSecretCreate_Call{Call: _e.mock.On("OrgSecretCreate", n, secret)}
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ type MockService_OrgSecretDelete_Call struct {
|
||||
// OrgSecretDelete is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) OrgSecretDelete(n interface{}, s interface{}) *MockService_OrgSecretDelete_Call {
|
||||
func (_e *MockService_Expecter) OrgSecretDelete(n any, s any) *MockService_OrgSecretDelete_Call {
|
||||
return &MockService_OrgSecretDelete_Call{Call: _e.mock.On("OrgSecretDelete", n, s)}
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ type MockService_OrgSecretFind_Call struct {
|
||||
// OrgSecretFind is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) OrgSecretFind(n interface{}, s interface{}) *MockService_OrgSecretFind_Call {
|
||||
func (_e *MockService_Expecter) OrgSecretFind(n any, s any) *MockService_OrgSecretFind_Call {
|
||||
return &MockService_OrgSecretFind_Call{Call: _e.mock.On("OrgSecretFind", n, s)}
|
||||
}
|
||||
|
||||
@@ -498,8 +498,8 @@ func (_c *MockService_OrgSecretFind_Call) RunAndReturn(run func(n int64, s strin
|
||||
}
|
||||
|
||||
// OrgSecretList provides a mock function for the type MockService
|
||||
func (_mock *MockService) OrgSecretList(n int64, listOptions *model.ListOptions) ([]*model.Secret, error) {
|
||||
ret := _mock.Called(n, listOptions)
|
||||
func (_mock *MockService) OrgSecretList(n int64, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
ret := _mock.Called(n, listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for OrgSecretList")
|
||||
@@ -507,18 +507,18 @@ func (_mock *MockService) OrgSecretList(n int64, listOptions *model.ListOptions)
|
||||
|
||||
var r0 []*model.Secret
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) ([]*model.Secret, error)); ok {
|
||||
return returnFunc(n, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptionsWithAll) ([]*model.Secret, error)); ok {
|
||||
return returnFunc(n, listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) []*model.Secret); ok {
|
||||
r0 = returnFunc(n, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptionsWithAll) []*model.Secret); ok {
|
||||
r0 = returnFunc(n, listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Secret)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptions) error); ok {
|
||||
r1 = returnFunc(n, listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(n, listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -532,20 +532,20 @@ type MockService_OrgSecretList_Call struct {
|
||||
|
||||
// OrgSecretList is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockService_Expecter) OrgSecretList(n interface{}, listOptions interface{}) *MockService_OrgSecretList_Call {
|
||||
return &MockService_OrgSecretList_Call{Call: _e.mock.On("OrgSecretList", n, listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockService_Expecter) OrgSecretList(n any, listOptionsWithAll any) *MockService_OrgSecretList_Call {
|
||||
return &MockService_OrgSecretList_Call{Call: _e.mock.On("OrgSecretList", n, listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockService_OrgSecretList_Call) Run(run func(n int64, listOptions *model.ListOptions)) *MockService_OrgSecretList_Call {
|
||||
func (_c *MockService_OrgSecretList_Call) Run(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll)) *MockService_OrgSecretList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 int64
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(int64)
|
||||
}
|
||||
var arg1 *model.ListOptions
|
||||
var arg1 *model.ListOptionsWithAll
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*model.ListOptions)
|
||||
arg1 = args[1].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -560,7 +560,7 @@ func (_c *MockService_OrgSecretList_Call) Return(secrets []*model.Secret, err er
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockService_OrgSecretList_Call) RunAndReturn(run func(n int64, listOptions *model.ListOptions) ([]*model.Secret, error)) *MockService_OrgSecretList_Call {
|
||||
func (_c *MockService_OrgSecretList_Call) RunAndReturn(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error)) *MockService_OrgSecretList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
@@ -590,7 +590,7 @@ type MockService_OrgSecretUpdate_Call struct {
|
||||
// OrgSecretUpdate is a helper method to define mock.On call
|
||||
// - n int64
|
||||
// - secret *model.Secret
|
||||
func (_e *MockService_Expecter) OrgSecretUpdate(n interface{}, secret interface{}) *MockService_OrgSecretUpdate_Call {
|
||||
func (_e *MockService_Expecter) OrgSecretUpdate(n any, secret any) *MockService_OrgSecretUpdate_Call {
|
||||
return &MockService_OrgSecretUpdate_Call{Call: _e.mock.On("OrgSecretUpdate", n, secret)}
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ type MockService_SecretCreate_Call struct {
|
||||
// SecretCreate is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - secret *model.Secret
|
||||
func (_e *MockService_Expecter) SecretCreate(repo interface{}, secret interface{}) *MockService_SecretCreate_Call {
|
||||
func (_e *MockService_Expecter) SecretCreate(repo any, secret any) *MockService_SecretCreate_Call {
|
||||
return &MockService_SecretCreate_Call{Call: _e.mock.On("SecretCreate", repo, secret)}
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ type MockService_SecretDelete_Call struct {
|
||||
// SecretDelete is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) SecretDelete(repo interface{}, s interface{}) *MockService_SecretDelete_Call {
|
||||
func (_e *MockService_Expecter) SecretDelete(repo any, s any) *MockService_SecretDelete_Call {
|
||||
return &MockService_SecretDelete_Call{Call: _e.mock.On("SecretDelete", repo, s)}
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ type MockService_SecretFind_Call struct {
|
||||
// SecretFind is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - s string
|
||||
func (_e *MockService_Expecter) SecretFind(repo interface{}, s interface{}) *MockService_SecretFind_Call {
|
||||
func (_e *MockService_Expecter) SecretFind(repo any, s any) *MockService_SecretFind_Call {
|
||||
return &MockService_SecretFind_Call{Call: _e.mock.On("SecretFind", repo, s)}
|
||||
}
|
||||
|
||||
@@ -805,8 +805,8 @@ func (_c *MockService_SecretFind_Call) RunAndReturn(run func(repo *model.Repo, s
|
||||
}
|
||||
|
||||
// SecretList provides a mock function for the type MockService
|
||||
func (_mock *MockService) SecretList(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Secret, error) {
|
||||
ret := _mock.Called(repo, listOptions)
|
||||
func (_mock *MockService) SecretList(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
ret := _mock.Called(repo, listOptionsWithAll)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SecretList")
|
||||
@@ -814,18 +814,18 @@ func (_mock *MockService) SecretList(repo *model.Repo, listOptions *model.ListOp
|
||||
|
||||
var r0 []*model.Secret
|
||||
var r1 error
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) ([]*model.Secret, error)); ok {
|
||||
return returnFunc(repo, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll) ([]*model.Secret, error)); ok {
|
||||
return returnFunc(repo, listOptionsWithAll)
|
||||
}
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) []*model.Secret); ok {
|
||||
r0 = returnFunc(repo, listOptions)
|
||||
if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll) []*model.Secret); ok {
|
||||
r0 = returnFunc(repo, listOptionsWithAll)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Secret)
|
||||
}
|
||||
}
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.Repo, *model.ListOptions) error); ok {
|
||||
r1 = returnFunc(repo, listOptions)
|
||||
if returnFunc, ok := ret.Get(1).(func(*model.Repo, *model.ListOptionsWithAll) error); ok {
|
||||
r1 = returnFunc(repo, listOptionsWithAll)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
@@ -839,20 +839,20 @@ type MockService_SecretList_Call struct {
|
||||
|
||||
// SecretList is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - listOptions *model.ListOptions
|
||||
func (_e *MockService_Expecter) SecretList(repo interface{}, listOptions interface{}) *MockService_SecretList_Call {
|
||||
return &MockService_SecretList_Call{Call: _e.mock.On("SecretList", repo, listOptions)}
|
||||
// - listOptionsWithAll *model.ListOptionsWithAll
|
||||
func (_e *MockService_Expecter) SecretList(repo any, listOptionsWithAll any) *MockService_SecretList_Call {
|
||||
return &MockService_SecretList_Call{Call: _e.mock.On("SecretList", repo, listOptionsWithAll)}
|
||||
}
|
||||
|
||||
func (_c *MockService_SecretList_Call) Run(run func(repo *model.Repo, listOptions *model.ListOptions)) *MockService_SecretList_Call {
|
||||
func (_c *MockService_SecretList_Call) Run(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll)) *MockService_SecretList_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
var arg0 *model.Repo
|
||||
if args[0] != nil {
|
||||
arg0 = args[0].(*model.Repo)
|
||||
}
|
||||
var arg1 *model.ListOptions
|
||||
var arg1 *model.ListOptionsWithAll
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*model.ListOptions)
|
||||
arg1 = args[1].(*model.ListOptionsWithAll)
|
||||
}
|
||||
run(
|
||||
arg0,
|
||||
@@ -867,7 +867,7 @@ func (_c *MockService_SecretList_Call) Return(secrets []*model.Secret, err error
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockService_SecretList_Call) RunAndReturn(run func(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Secret, error)) *MockService_SecretList_Call {
|
||||
func (_c *MockService_SecretList_Call) RunAndReturn(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error)) *MockService_SecretList_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
@@ -910,7 +910,7 @@ type MockService_SecretListPipeline_Call struct {
|
||||
// - repo *model.Repo
|
||||
// - pipeline *model.Pipeline
|
||||
// - netrc *model.Netrc
|
||||
func (_e *MockService_Expecter) SecretListPipeline(context1 interface{}, repo interface{}, pipeline interface{}, netrc interface{}) *MockService_SecretListPipeline_Call {
|
||||
func (_e *MockService_Expecter) SecretListPipeline(context1 any, repo any, pipeline any, netrc any) *MockService_SecretListPipeline_Call {
|
||||
return &MockService_SecretListPipeline_Call{Call: _e.mock.On("SecretListPipeline", context1, repo, pipeline, netrc)}
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ type MockService_SecretUpdate_Call struct {
|
||||
// SecretUpdate is a helper method to define mock.On call
|
||||
// - repo *model.Repo
|
||||
// - secret *model.Secret
|
||||
func (_e *MockService_Expecter) SecretUpdate(repo interface{}, secret interface{}) *MockService_SecretUpdate_Call {
|
||||
func (_e *MockService_Expecter) SecretUpdate(repo any, secret any) *MockService_SecretUpdate_Call {
|
||||
return &MockService_SecretUpdate_Call{Call: _e.mock.On("SecretUpdate", repo, secret)}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,19 +25,19 @@ type Service interface {
|
||||
SecretListPipeline(context.Context, *model.Repo, *model.Pipeline, *model.Netrc) ([]*model.Secret, error)
|
||||
// Repository secrets
|
||||
SecretFind(*model.Repo, string) (*model.Secret, error)
|
||||
SecretList(*model.Repo, *model.ListOptions) ([]*model.Secret, error)
|
||||
SecretList(*model.Repo, *model.ListOptionsWithAll) ([]*model.Secret, error)
|
||||
SecretCreate(*model.Repo, *model.Secret) error
|
||||
SecretUpdate(*model.Repo, *model.Secret) error
|
||||
SecretDelete(*model.Repo, string) error
|
||||
// Organization secrets
|
||||
OrgSecretFind(int64, string) (*model.Secret, error)
|
||||
OrgSecretList(int64, *model.ListOptions) ([]*model.Secret, error)
|
||||
OrgSecretList(int64, *model.ListOptionsWithAll) ([]*model.Secret, error)
|
||||
OrgSecretCreate(int64, *model.Secret) error
|
||||
OrgSecretUpdate(int64, *model.Secret) error
|
||||
OrgSecretDelete(int64, string) error
|
||||
// Global secrets
|
||||
GlobalSecretFind(string) (*model.Secret, error)
|
||||
GlobalSecretList(*model.ListOptions) ([]*model.Secret, error)
|
||||
GlobalSecretList(*model.ListOptionsWithAll) ([]*model.Secret, error)
|
||||
GlobalSecretCreate(*model.Secret) error
|
||||
GlobalSecretUpdate(*model.Secret) error
|
||||
GlobalSecretDelete(string) error
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
var ErrNoTokenProvided = errors.New("please provide a token")
|
||||
|
||||
func (s storage) AgentList(p *model.ListOptions) (agents []*model.Agent, _ error) {
|
||||
func (s storage) AgentList(p *model.ListOptionsWithAll) (agents []*model.Agent, _ error) {
|
||||
return agents, s.paginate(p).OrderBy("id").Find(&agents)
|
||||
}
|
||||
|
||||
@@ -54,6 +54,6 @@ func (s storage) AgentDelete(agent *model.Agent) error {
|
||||
return wrapDelete(s.engine.ID(agent.ID).Delete(new(model.Agent)))
|
||||
}
|
||||
|
||||
func (s storage) AgentListForOrg(orgID int64, p *model.ListOptions) (agents []*model.Agent, _ error) {
|
||||
func (s storage) AgentListForOrg(orgID int64, p *model.ListOptionsWithAll) (agents []*model.Agent, _ error) {
|
||||
return agents, s.paginate(p).Where("org_id = ?", orgID).OrderBy("id").Find(&agents)
|
||||
}
|
||||
|
||||
@@ -77,11 +77,11 @@ func TestAgentList(t *testing.T) {
|
||||
err = store.AgentCreate(agent2)
|
||||
assert.NoError(t, err)
|
||||
|
||||
agents, err := store.AgentList(&model.ListOptions{All: true})
|
||||
agents, err := store.AgentList(&model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 2, len(agents))
|
||||
|
||||
agents, err = store.AgentList(&model.ListOptions{Page: 1, PerPage: 1})
|
||||
agents, err = store.AgentList(&model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 1}})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(agents))
|
||||
}
|
||||
@@ -128,18 +128,18 @@ func TestAgentListForOrg(t *testing.T) {
|
||||
assert.NoError(t, store.AgentCreate(agent2))
|
||||
assert.NoError(t, store.AgentCreate(agent3))
|
||||
|
||||
agents, err := store.AgentListForOrg(100, &model.ListOptions{All: true})
|
||||
agents, err := store.AgentListForOrg(100, &model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 2, len(agents))
|
||||
assert.Equal(t, "test-1", agents[0].Name)
|
||||
assert.Equal(t, "test-2", agents[1].Name)
|
||||
|
||||
agents, err = store.AgentListForOrg(200, &model.ListOptions{All: true})
|
||||
agents, err = store.AgentListForOrg(200, &model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(agents))
|
||||
assert.Equal(t, "test-3", agents[0].Name)
|
||||
|
||||
agents, err = store.AgentListForOrg(100, &model.ListOptions{Page: 1, PerPage: 1})
|
||||
agents, err = store.AgentListForOrg(100, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 1}})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(agents))
|
||||
assert.Equal(t, "test-1", agents[0].Name)
|
||||
|
||||
@@ -40,7 +40,7 @@ func (s storage) CronFind(repo *model.Repo, id int64) (*model.Cron, error) {
|
||||
return cron, wrapGet(s.engine.ID(id).Where("repo_id = ?", repo.ID).Get(cron))
|
||||
}
|
||||
|
||||
func (s storage) CronList(repo *model.Repo, p *model.ListOptions) ([]*model.Cron, error) {
|
||||
func (s storage) CronList(repo *model.Repo, p *model.ListOptionsWithAll) ([]*model.Cron, error) {
|
||||
var crons []*model.Cron
|
||||
return crons, s.paginate(p).Where("repo_id = ?", repo.ID).OrderBy("name").Find(&crons)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func (s storage) ForgeGet(id int64) (*model.Forge, error) {
|
||||
return forge, wrapGet(s.engine.ID(id).Get(forge))
|
||||
}
|
||||
|
||||
func (s storage) ForgeList(p *model.ListOptions) ([]*model.Forge, error) {
|
||||
func (s storage) ForgeList(p *model.ListOptionsWithAll) ([]*model.Forge, error) {
|
||||
forges := make([]*model.Forge, 0, 10)
|
||||
return forges, s.paginate(p).Find(&forges)
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ func TestForgeCRUD(t *testing.T) {
|
||||
assert.NoError(t, store.ForgeCreate(&model.Forge{Type: "gitea"}))
|
||||
|
||||
// get all repos for a specific forge
|
||||
forges, err := store.ForgeList(&model.ListOptions{All: true})
|
||||
forges, err := store.ForgeList(&model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, forges, 3)
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ func wrapInsert(c int64, err error) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s storage) paginate(p *model.ListOptions) *xorm.Session {
|
||||
func (s storage) paginate(p *model.ListOptionsWithAll) *xorm.Session {
|
||||
if p == nil || p.All {
|
||||
return s.engine.NewSession()
|
||||
}
|
||||
|
||||
@@ -99,12 +99,12 @@ func (s storage) OrgLookup(name string) (*model.Org, error) {
|
||||
return orgs[0], nil
|
||||
}
|
||||
|
||||
func (s storage) OrgRepoList(org *model.Org, p *model.ListOptions) ([]*model.Repo, error) {
|
||||
func (s storage) OrgRepoList(org *model.Org, p *model.ListOptionsWithAll) ([]*model.Repo, error) {
|
||||
var repos []*model.Repo
|
||||
return repos, s.paginate(p).OrderBy("id").Where("org_id = ?", org.ID).Find(&repos)
|
||||
}
|
||||
|
||||
func (s storage) OrgList(p *model.ListOptions) ([]*model.Org, error) {
|
||||
func (s storage) OrgList(p *model.ListOptionsWithAll) ([]*model.Org, error) {
|
||||
var orgs []*model.Org
|
||||
return orgs, s.paginate(p).Where("is_user = ?", false).OrderBy("id").Find(&orgs)
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestOrgCRUD(t *testing.T) {
|
||||
assert.Error(t, store.OrgCreate(&model.Org{Name: ""}), "expect to fail if name is empty")
|
||||
|
||||
// get all repos for a specific org
|
||||
repos, err := store.OrgRepoList(someUser, &model.ListOptions{All: true})
|
||||
repos, err := store.OrgRepoList(someUser, &model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, repos, 2)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ func (s storage) GetPipelineLastBefore(repo *model.Repo, branch string, num int6
|
||||
Get(pipeline))
|
||||
}
|
||||
|
||||
func (s storage) GetPipelineList(repo *model.Repo, p *model.ListOptions, f *model.PipelineFilter) ([]*model.Pipeline, error) {
|
||||
func (s storage) GetPipelineList(repo *model.Repo, p *model.ListOptionsWithAll, f *model.PipelineFilter) ([]*model.Pipeline, error) {
|
||||
pipelines := make([]*model.Pipeline, 0, 16)
|
||||
|
||||
cond := builder.NewCond().And(builder.Eq{"repo_id": repo.ID})
|
||||
|
||||
@@ -154,7 +154,7 @@ func TestPipelineListFilter(t *testing.T) {
|
||||
err = store.CreatePipeline(pipeline2, []*model.Step{}...)
|
||||
assert.NoError(t, err)
|
||||
|
||||
pipelines, err := store.GetPipelineList(&model.Repo{ID: 1}, &model.ListOptions{Page: 1, PerPage: 50}, nil)
|
||||
pipelines, err := store.GetPipelineList(&model.Repo{ID: 1}, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 50}}, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, pipelines, 2)
|
||||
assert.Equal(t, pipeline2.ID, pipelines[0].ID)
|
||||
@@ -183,7 +183,7 @@ func TestPipelineListFilter(t *testing.T) {
|
||||
assert.Len(t, pipelines, 1)
|
||||
assert.Equal(t, pipeline2.ID, pipelines[0].ID)
|
||||
|
||||
pipelines, err3 := store.GetPipelineList(&model.Repo{ID: 1}, &model.ListOptions{Page: 1, PerPage: 50}, &model.PipelineFilter{Before: before})
|
||||
pipelines, err3 := store.GetPipelineList(&model.Repo{ID: 1}, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 50}}, &model.PipelineFilter{Before: before})
|
||||
assert.NoError(t, err3)
|
||||
assert.Len(t, pipelines, 1)
|
||||
assert.Equal(t, pipeline1.ID, pipelines[0].ID)
|
||||
|
||||
@@ -29,7 +29,7 @@ func (s storage) RegistryFind(repo *model.Repo, addr string) (*model.Registry, e
|
||||
).Get(reg))
|
||||
}
|
||||
|
||||
func (s storage) RegistryList(repo *model.Repo, includeGlobalAndOrg bool, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (s storage) RegistryList(repo *model.Repo, includeGlobalAndOrg bool, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
var regs []*model.Registry
|
||||
var cond builder.Cond = builder.Eq{"repo_id": repo.ID}
|
||||
if includeGlobalAndOrg {
|
||||
@@ -65,7 +65,7 @@ func (s storage) OrgRegistryFind(orgID int64, name string) (*model.Registry, err
|
||||
).Get(registry))
|
||||
}
|
||||
|
||||
func (s storage) OrgRegistryList(orgID int64, p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (s storage) OrgRegistryList(orgID int64, p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
registries := make([]*model.Registry, 0)
|
||||
return registries, s.paginate(p).Where("org_id = ?", orgID).OrderBy(orderRegistriesBy).Find(®istries)
|
||||
}
|
||||
@@ -77,7 +77,7 @@ func (s storage) GlobalRegistryFind(name string) (*model.Registry, error) {
|
||||
).Get(registry))
|
||||
}
|
||||
|
||||
func (s storage) GlobalRegistryList(p *model.ListOptions) ([]*model.Registry, error) {
|
||||
func (s storage) GlobalRegistryList(p *model.ListOptionsWithAll) ([]*model.Registry, error) {
|
||||
registries := make([]*model.Registry, 0)
|
||||
return registries, s.paginate(p).Where(
|
||||
builder.Eq{"org_id": 0, "repo_id": 0},
|
||||
|
||||
@@ -61,7 +61,7 @@ func TestRegistryList(t *testing.T) {
|
||||
Password: "bar",
|
||||
}))
|
||||
|
||||
list, err := store.RegistryList(&model.Repo{ID: 1}, false, &model.ListOptions{Page: 1, PerPage: 50})
|
||||
list, err := store.RegistryList(&model.Repo{ID: 1}, false, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 50}})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, list, 2)
|
||||
}
|
||||
@@ -164,7 +164,7 @@ func TestOrgRegistryList(t *testing.T) {
|
||||
|
||||
createTestRegistries(t, store)
|
||||
|
||||
list, err := store.OrgRegistryList(12, &model.ListOptions{All: true})
|
||||
list, err := store.OrgRegistryList(12, &model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
require.Len(t, list, 1)
|
||||
|
||||
@@ -195,7 +195,7 @@ func TestGlobalRegistryList(t *testing.T) {
|
||||
|
||||
createTestRegistries(t, store)
|
||||
|
||||
list, err := store.GlobalRegistryList(&model.ListOptions{All: true})
|
||||
list, err := store.GlobalRegistryList(&model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, list, 1)
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ func (s storage) RepoList(user *model.User, owned, active bool, f *model.RepoFil
|
||||
}
|
||||
|
||||
// RepoListAll list all repos.
|
||||
func (s storage) RepoListAll(active bool, p *model.ListOptions) ([]*model.Repo, error) {
|
||||
func (s storage) RepoListAll(active bool, p *model.ListOptionsWithAll) ([]*model.Repo, error) {
|
||||
repos := make([]*model.Repo, 0)
|
||||
sess := s.paginate(p).Table("repos")
|
||||
if active {
|
||||
|
||||
@@ -29,7 +29,7 @@ func (s storage) SecretFind(repo *model.Repo, name string) (*model.Secret, error
|
||||
).Get(secret))
|
||||
}
|
||||
|
||||
func (s storage) SecretList(repo *model.Repo, includeGlobalAndOrgSecrets bool, p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (s storage) SecretList(repo *model.Repo, includeGlobalAndOrgSecrets bool, p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
var secrets []*model.Secret
|
||||
var cond builder.Cond = builder.Eq{"repo_id": repo.ID}
|
||||
if includeGlobalAndOrgSecrets {
|
||||
@@ -65,7 +65,7 @@ func (s storage) OrgSecretFind(orgID int64, name string) (*model.Secret, error)
|
||||
).Get(secret))
|
||||
}
|
||||
|
||||
func (s storage) OrgSecretList(orgID int64, p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (s storage) OrgSecretList(orgID int64, p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
secrets := make([]*model.Secret, 0)
|
||||
return secrets, s.paginate(p).Where("org_id = ?", orgID).OrderBy(orderSecretsBy).Find(&secrets)
|
||||
}
|
||||
@@ -77,7 +77,7 @@ func (s storage) GlobalSecretFind(name string) (*model.Secret, error) {
|
||||
).Get(secret))
|
||||
}
|
||||
|
||||
func (s storage) GlobalSecretList(p *model.ListOptions) ([]*model.Secret, error) {
|
||||
func (s storage) GlobalSecretList(p *model.ListOptionsWithAll) ([]*model.Secret, error) {
|
||||
secrets := make([]*model.Secret, 0)
|
||||
return secrets, s.paginate(p).Where(
|
||||
builder.Eq{"org_id": 0, "repo_id": 0},
|
||||
|
||||
@@ -53,7 +53,7 @@ func TestSecretList(t *testing.T) {
|
||||
|
||||
createTestSecrets(t, store)
|
||||
|
||||
list, err := store.SecretList(&model.Repo{ID: 1, OrgID: 12}, false, &model.ListOptions{Page: 1, PerPage: 50})
|
||||
list, err := store.SecretList(&model.Repo{ID: 1, OrgID: 12}, false, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 50}})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, list, 2)
|
||||
}
|
||||
@@ -75,7 +75,7 @@ func TestSecretPipelineList(t *testing.T) {
|
||||
|
||||
createTestSecrets(t, store)
|
||||
|
||||
list, err := store.SecretList(&model.Repo{ID: 1, OrgID: 12}, true, &model.ListOptions{Page: 1, PerPage: 50})
|
||||
list, err := store.SecretList(&model.Repo{ID: 1, OrgID: 12}, true, &model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 50}})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, list, 4)
|
||||
}
|
||||
@@ -184,7 +184,7 @@ func TestOrgSecretList(t *testing.T) {
|
||||
|
||||
createTestSecrets(t, store)
|
||||
|
||||
list, err := store.OrgSecretList(12, &model.ListOptions{All: true})
|
||||
list, err := store.OrgSecretList(12, &model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, list, 1)
|
||||
|
||||
@@ -219,7 +219,7 @@ func TestGlobalSecretList(t *testing.T) {
|
||||
|
||||
createTestSecrets(t, store)
|
||||
|
||||
list, err := store.GlobalSecretList(&model.ListOptions{All: true})
|
||||
list, err := store.GlobalSecretList(&model.ListOptionsWithAll{All: true})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, list, 1)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ func (s storage) GetUserByLogin(forgeID int64, login string) (*model.User, error
|
||||
return user, wrapGet(sess.Where("forge_id = ? AND login=?", forgeID, login).Get(user))
|
||||
}
|
||||
|
||||
func (s storage) GetUserList(p *model.ListOptions) ([]*model.User, error) {
|
||||
func (s storage) GetUserList(p *model.ListOptionsWithAll) ([]*model.User, error) {
|
||||
var users []*model.User
|
||||
return users, s.paginate(p).OrderBy("login").Find(&users)
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ func TestUsers(t *testing.T) {
|
||||
Hash: "A",
|
||||
}
|
||||
assert.NoError(t, store.CreateUser(&user2))
|
||||
users, err := store.GetUserList(&model.ListOptions{Page: 1, PerPage: 50})
|
||||
users, err := store.GetUserList(&model.ListOptionsWithAll{ListOptions: &model.ListOptions{Page: 1, PerPage: 50}})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, users, 2)
|
||||
// "jane" user is first due to alphabetic sorting
|
||||
|
||||
+289
-289
File diff suppressed because it is too large
Load Diff
+15
-15
@@ -31,7 +31,7 @@ type Store interface {
|
||||
// GetUserByLogin gets a user by its login name.
|
||||
GetUserByLogin(int64, string) (*model.User, error)
|
||||
// GetUserList gets a list of all users in the system.
|
||||
GetUserList(p *model.ListOptions) ([]*model.User, error)
|
||||
GetUserList(p *model.ListOptionsWithAll) ([]*model.User, error)
|
||||
// GetUserCount gets a count of all users in the system.
|
||||
GetUserCount() (int64, error)
|
||||
// CreateUser creates a new user account.
|
||||
@@ -77,7 +77,7 @@ type Store interface {
|
||||
// GetPipelineLastBefore gets the last pipeline before pipeline number N.
|
||||
GetPipelineLastBefore(*model.Repo, string, int64) (*model.Pipeline, error)
|
||||
// GetPipelineList gets a list of pipelines for the repository
|
||||
GetPipelineList(*model.Repo, *model.ListOptions, *model.PipelineFilter) ([]*model.Pipeline, error)
|
||||
GetPipelineList(*model.Repo, *model.ListOptionsWithAll, *model.PipelineFilter) ([]*model.Pipeline, error)
|
||||
// GetRepoLatestPipelines gets the latest pipelines for the given repo IDs.
|
||||
GetRepoLatestPipelines([]int64) ([]*model.Pipeline, error)
|
||||
// GetActivePipelineList gets a list of the active pipelines for the repository
|
||||
@@ -99,7 +99,7 @@ type Store interface {
|
||||
// Repositories
|
||||
RepoList(user *model.User, owned, active bool, filter *model.RepoFilter) ([]*model.Repo, error)
|
||||
RepoListLatest(*model.User) ([]*model.Feed, error)
|
||||
RepoListAll(active bool, p *model.ListOptions) ([]*model.Repo, error)
|
||||
RepoListAll(active bool, p *model.ListOptionsWithAll) ([]*model.Repo, error)
|
||||
|
||||
// Permissions
|
||||
PermFind(user *model.User, repo *model.Repo) (*model.Perm, error)
|
||||
@@ -113,27 +113,27 @@ type Store interface {
|
||||
|
||||
// Secrets
|
||||
SecretFind(*model.Repo, string) (*model.Secret, error)
|
||||
SecretList(*model.Repo, bool, *model.ListOptions) ([]*model.Secret, error)
|
||||
SecretList(*model.Repo, bool, *model.ListOptionsWithAll) ([]*model.Secret, error)
|
||||
SecretListAll() ([]*model.Secret, error)
|
||||
SecretCreate(*model.Secret) error
|
||||
SecretUpdate(*model.Secret) error
|
||||
SecretDelete(*model.Secret) error
|
||||
OrgSecretFind(int64, string) (*model.Secret, error)
|
||||
OrgSecretList(int64, *model.ListOptions) ([]*model.Secret, error)
|
||||
OrgSecretList(int64, *model.ListOptionsWithAll) ([]*model.Secret, error)
|
||||
GlobalSecretFind(string) (*model.Secret, error)
|
||||
GlobalSecretList(*model.ListOptions) ([]*model.Secret, error)
|
||||
GlobalSecretList(*model.ListOptionsWithAll) ([]*model.Secret, error)
|
||||
|
||||
// Registries
|
||||
RegistryFind(*model.Repo, string) (*model.Registry, error)
|
||||
RegistryList(*model.Repo, bool, *model.ListOptions) ([]*model.Registry, error)
|
||||
RegistryList(*model.Repo, bool, *model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
RegistryListAll() ([]*model.Registry, error)
|
||||
RegistryCreate(*model.Registry) error
|
||||
RegistryUpdate(*model.Registry) error
|
||||
RegistryDelete(*model.Registry) error
|
||||
OrgRegistryFind(int64, string) (*model.Registry, error)
|
||||
OrgRegistryList(int64, *model.ListOptions) ([]*model.Registry, error)
|
||||
OrgRegistryList(int64, *model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
GlobalRegistryFind(string) (*model.Registry, error)
|
||||
GlobalRegistryList(*model.ListOptions) ([]*model.Registry, error)
|
||||
GlobalRegistryList(*model.ListOptionsWithAll) ([]*model.Registry, error)
|
||||
|
||||
// Steps
|
||||
StepLoad(pipelineID, stepID int64) (*model.Step, error)
|
||||
@@ -162,7 +162,7 @@ type Store interface {
|
||||
// Cron
|
||||
CronCreate(*model.Cron) error
|
||||
CronFind(*model.Repo, int64) (*model.Cron, error)
|
||||
CronList(*model.Repo, *model.ListOptions) ([]*model.Cron, error)
|
||||
CronList(*model.Repo, *model.ListOptionsWithAll) ([]*model.Cron, error)
|
||||
CronUpdate(*model.Repo, *model.Cron) error
|
||||
CronDelete(*model.Repo, int64) error
|
||||
CronListNextExecute(int64, int64) ([]*model.Cron, error)
|
||||
@@ -171,7 +171,7 @@ type Store interface {
|
||||
// Forge
|
||||
ForgeCreate(*model.Forge) error
|
||||
ForgeGet(int64) (*model.Forge, error)
|
||||
ForgeList(p *model.ListOptions) ([]*model.Forge, error)
|
||||
ForgeList(p *model.ListOptionsWithAll) ([]*model.Forge, error)
|
||||
ForgeUpdate(*model.Forge) error
|
||||
ForgeDelete(*model.Forge) error
|
||||
|
||||
@@ -179,10 +179,10 @@ type Store interface {
|
||||
AgentCreate(*model.Agent) error
|
||||
AgentFind(int64) (*model.Agent, error)
|
||||
AgentFindByToken(string) (*model.Agent, error)
|
||||
AgentList(p *model.ListOptions) ([]*model.Agent, error)
|
||||
AgentList(p *model.ListOptionsWithAll) ([]*model.Agent, error)
|
||||
AgentUpdate(*model.Agent) error
|
||||
AgentDelete(*model.Agent) error
|
||||
AgentListForOrg(orgID int64, opt *model.ListOptions) ([]*model.Agent, error)
|
||||
AgentListForOrg(orgID int64, opt *model.ListOptionsWithAll) ([]*model.Agent, error)
|
||||
|
||||
// Workflow
|
||||
WorkflowGetTree(*model.Pipeline) ([]*model.Workflow, error)
|
||||
@@ -199,10 +199,10 @@ type Store interface {
|
||||
OrgLookup(string) (*model.Org, error)
|
||||
OrgUpdate(*model.Org) error
|
||||
OrgDelete(int64) error
|
||||
OrgList(*model.ListOptions) ([]*model.Org, error)
|
||||
OrgList(*model.ListOptionsWithAll) ([]*model.Org, error)
|
||||
|
||||
// Org repos
|
||||
OrgRepoList(*model.Org, *model.ListOptions) ([]*model.Repo, error)
|
||||
OrgRepoList(*model.Org, *model.ListOptionsWithAll) ([]*model.Repo, error)
|
||||
|
||||
// Store operations
|
||||
Ping() error
|
||||
|
||||
@@ -73,7 +73,7 @@ type MockClient_Agent_Call struct {
|
||||
|
||||
// Agent is a helper method to define mock.On call
|
||||
// - n int64
|
||||
func (_e *MockClient_Expecter) Agent(n interface{}) *MockClient_Agent_Call {
|
||||
func (_e *MockClient_Expecter) Agent(n any) *MockClient_Agent_Call {
|
||||
return &MockClient_Agent_Call{Call: _e.mock.On("Agent", n)}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ type MockClient_AgentCreate_Call struct {
|
||||
|
||||
// AgentCreate is a helper method to define mock.On call
|
||||
// - agent *woodpecker.Agent
|
||||
func (_e *MockClient_Expecter) AgentCreate(agent interface{}) *MockClient_AgentCreate_Call {
|
||||
func (_e *MockClient_Expecter) AgentCreate(agent any) *MockClient_AgentCreate_Call {
|
||||
return &MockClient_AgentCreate_Call{Call: _e.mock.On("AgentCreate", agent)}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ type MockClient_AgentDelete_Call struct {
|
||||
|
||||
// AgentDelete is a helper method to define mock.On call
|
||||
// - n int64
|
||||
func (_e *MockClient_Expecter) AgentDelete(n interface{}) *MockClient_AgentDelete_Call {
|
||||
func (_e *MockClient_Expecter) AgentDelete(n any) *MockClient_AgentDelete_Call {
|
||||
return &MockClient_AgentDelete_Call{Call: _e.mock.On("AgentDelete", n)}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ type MockClient_AgentTasksList_Call struct {
|
||||
|
||||
// AgentTasksList is a helper method to define mock.On call
|
||||
// - n int64
|
||||
func (_e *MockClient_Expecter) AgentTasksList(n interface{}) *MockClient_AgentTasksList_Call {
|
||||
func (_e *MockClient_Expecter) AgentTasksList(n any) *MockClient_AgentTasksList_Call {
|
||||
return &MockClient_AgentTasksList_Call{Call: _e.mock.On("AgentTasksList", n)}
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ type MockClient_AgentUpdate_Call struct {
|
||||
|
||||
// AgentUpdate is a helper method to define mock.On call
|
||||
// - agent *woodpecker.Agent
|
||||
func (_e *MockClient_Expecter) AgentUpdate(agent interface{}) *MockClient_AgentUpdate_Call {
|
||||
func (_e *MockClient_Expecter) AgentUpdate(agent any) *MockClient_AgentUpdate_Call {
|
||||
return &MockClient_AgentUpdate_Call{Call: _e.mock.On("AgentUpdate", agent)}
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ type MockClient_CronCreate_Call struct {
|
||||
// CronCreate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - cron *woodpecker.Cron
|
||||
func (_e *MockClient_Expecter) CronCreate(repoID interface{}, cron interface{}) *MockClient_CronCreate_Call {
|
||||
func (_e *MockClient_Expecter) CronCreate(repoID any, cron any) *MockClient_CronCreate_Call {
|
||||
return &MockClient_CronCreate_Call{Call: _e.mock.On("CronCreate", repoID, cron)}
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ type MockClient_CronDelete_Call struct {
|
||||
// CronDelete is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - cronID int64
|
||||
func (_e *MockClient_Expecter) CronDelete(repoID interface{}, cronID interface{}) *MockClient_CronDelete_Call {
|
||||
func (_e *MockClient_Expecter) CronDelete(repoID any, cronID any) *MockClient_CronDelete_Call {
|
||||
return &MockClient_CronDelete_Call{Call: _e.mock.On("CronDelete", repoID, cronID)}
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ type MockClient_CronGet_Call struct {
|
||||
// CronGet is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - cronID int64
|
||||
func (_e *MockClient_Expecter) CronGet(repoID interface{}, cronID interface{}) *MockClient_CronGet_Call {
|
||||
func (_e *MockClient_Expecter) CronGet(repoID any, cronID any) *MockClient_CronGet_Call {
|
||||
return &MockClient_CronGet_Call{Call: _e.mock.On("CronGet", repoID, cronID)}
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ type MockClient_CronList_Call struct {
|
||||
// CronList is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opt woodpecker.CronListOptions
|
||||
func (_e *MockClient_Expecter) CronList(repoID interface{}, opt interface{}) *MockClient_CronList_Call {
|
||||
func (_e *MockClient_Expecter) CronList(repoID any, opt any) *MockClient_CronList_Call {
|
||||
return &MockClient_CronList_Call{Call: _e.mock.On("CronList", repoID, opt)}
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ type MockClient_CronUpdate_Call struct {
|
||||
// CronUpdate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - cron *woodpecker.Cron
|
||||
func (_e *MockClient_Expecter) CronUpdate(repoID interface{}, cron interface{}) *MockClient_CronUpdate_Call {
|
||||
func (_e *MockClient_Expecter) CronUpdate(repoID any, cron any) *MockClient_CronUpdate_Call {
|
||||
return &MockClient_CronUpdate_Call{Call: _e.mock.On("CronUpdate", repoID, cron)}
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ type MockClient_Deploy_Call struct {
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
// - opt woodpecker.DeployOptions
|
||||
func (_e *MockClient_Expecter) Deploy(repoID interface{}, pipeline interface{}, opt interface{}) *MockClient_Deploy_Call {
|
||||
func (_e *MockClient_Expecter) Deploy(repoID any, pipeline any, opt any) *MockClient_Deploy_Call {
|
||||
return &MockClient_Deploy_Call{Call: _e.mock.On("Deploy", repoID, pipeline, opt)}
|
||||
}
|
||||
|
||||
@@ -830,7 +830,7 @@ type MockClient_GlobalRegistry_Call struct {
|
||||
|
||||
// GlobalRegistry is a helper method to define mock.On call
|
||||
// - registry string
|
||||
func (_e *MockClient_Expecter) GlobalRegistry(registry interface{}) *MockClient_GlobalRegistry_Call {
|
||||
func (_e *MockClient_Expecter) GlobalRegistry(registry any) *MockClient_GlobalRegistry_Call {
|
||||
return &MockClient_GlobalRegistry_Call{Call: _e.mock.On("GlobalRegistry", registry)}
|
||||
}
|
||||
|
||||
@@ -892,7 +892,7 @@ type MockClient_GlobalRegistryCreate_Call struct {
|
||||
|
||||
// GlobalRegistryCreate is a helper method to define mock.On call
|
||||
// - registry *woodpecker.Registry
|
||||
func (_e *MockClient_Expecter) GlobalRegistryCreate(registry interface{}) *MockClient_GlobalRegistryCreate_Call {
|
||||
func (_e *MockClient_Expecter) GlobalRegistryCreate(registry any) *MockClient_GlobalRegistryCreate_Call {
|
||||
return &MockClient_GlobalRegistryCreate_Call{Call: _e.mock.On("GlobalRegistryCreate", registry)}
|
||||
}
|
||||
|
||||
@@ -943,7 +943,7 @@ type MockClient_GlobalRegistryDelete_Call struct {
|
||||
|
||||
// GlobalRegistryDelete is a helper method to define mock.On call
|
||||
// - registry string
|
||||
func (_e *MockClient_Expecter) GlobalRegistryDelete(registry interface{}) *MockClient_GlobalRegistryDelete_Call {
|
||||
func (_e *MockClient_Expecter) GlobalRegistryDelete(registry any) *MockClient_GlobalRegistryDelete_Call {
|
||||
return &MockClient_GlobalRegistryDelete_Call{Call: _e.mock.On("GlobalRegistryDelete", registry)}
|
||||
}
|
||||
|
||||
@@ -1005,7 +1005,7 @@ type MockClient_GlobalRegistryList_Call struct {
|
||||
|
||||
// GlobalRegistryList is a helper method to define mock.On call
|
||||
// - opt woodpecker.RegistryListOptions
|
||||
func (_e *MockClient_Expecter) GlobalRegistryList(opt interface{}) *MockClient_GlobalRegistryList_Call {
|
||||
func (_e *MockClient_Expecter) GlobalRegistryList(opt any) *MockClient_GlobalRegistryList_Call {
|
||||
return &MockClient_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", opt)}
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ type MockClient_GlobalRegistryUpdate_Call struct {
|
||||
|
||||
// GlobalRegistryUpdate is a helper method to define mock.On call
|
||||
// - registry *woodpecker.Registry
|
||||
func (_e *MockClient_Expecter) GlobalRegistryUpdate(registry interface{}) *MockClient_GlobalRegistryUpdate_Call {
|
||||
func (_e *MockClient_Expecter) GlobalRegistryUpdate(registry any) *MockClient_GlobalRegistryUpdate_Call {
|
||||
return &MockClient_GlobalRegistryUpdate_Call{Call: _e.mock.On("GlobalRegistryUpdate", registry)}
|
||||
}
|
||||
|
||||
@@ -1129,7 +1129,7 @@ type MockClient_GlobalSecret_Call struct {
|
||||
|
||||
// GlobalSecret is a helper method to define mock.On call
|
||||
// - secret string
|
||||
func (_e *MockClient_Expecter) GlobalSecret(secret interface{}) *MockClient_GlobalSecret_Call {
|
||||
func (_e *MockClient_Expecter) GlobalSecret(secret any) *MockClient_GlobalSecret_Call {
|
||||
return &MockClient_GlobalSecret_Call{Call: _e.mock.On("GlobalSecret", secret)}
|
||||
}
|
||||
|
||||
@@ -1191,7 +1191,7 @@ type MockClient_GlobalSecretCreate_Call struct {
|
||||
|
||||
// GlobalSecretCreate is a helper method to define mock.On call
|
||||
// - secret *woodpecker.Secret
|
||||
func (_e *MockClient_Expecter) GlobalSecretCreate(secret interface{}) *MockClient_GlobalSecretCreate_Call {
|
||||
func (_e *MockClient_Expecter) GlobalSecretCreate(secret any) *MockClient_GlobalSecretCreate_Call {
|
||||
return &MockClient_GlobalSecretCreate_Call{Call: _e.mock.On("GlobalSecretCreate", secret)}
|
||||
}
|
||||
|
||||
@@ -1242,7 +1242,7 @@ type MockClient_GlobalSecretDelete_Call struct {
|
||||
|
||||
// GlobalSecretDelete is a helper method to define mock.On call
|
||||
// - secret string
|
||||
func (_e *MockClient_Expecter) GlobalSecretDelete(secret interface{}) *MockClient_GlobalSecretDelete_Call {
|
||||
func (_e *MockClient_Expecter) GlobalSecretDelete(secret any) *MockClient_GlobalSecretDelete_Call {
|
||||
return &MockClient_GlobalSecretDelete_Call{Call: _e.mock.On("GlobalSecretDelete", secret)}
|
||||
}
|
||||
|
||||
@@ -1304,7 +1304,7 @@ type MockClient_GlobalSecretList_Call struct {
|
||||
|
||||
// GlobalSecretList is a helper method to define mock.On call
|
||||
// - opt woodpecker.SecretListOptions
|
||||
func (_e *MockClient_Expecter) GlobalSecretList(opt interface{}) *MockClient_GlobalSecretList_Call {
|
||||
func (_e *MockClient_Expecter) GlobalSecretList(opt any) *MockClient_GlobalSecretList_Call {
|
||||
return &MockClient_GlobalSecretList_Call{Call: _e.mock.On("GlobalSecretList", opt)}
|
||||
}
|
||||
|
||||
@@ -1366,7 +1366,7 @@ type MockClient_GlobalSecretUpdate_Call struct {
|
||||
|
||||
// GlobalSecretUpdate is a helper method to define mock.On call
|
||||
// - secret *woodpecker.Secret
|
||||
func (_e *MockClient_Expecter) GlobalSecretUpdate(secret interface{}) *MockClient_GlobalSecretUpdate_Call {
|
||||
func (_e *MockClient_Expecter) GlobalSecretUpdate(secret any) *MockClient_GlobalSecretUpdate_Call {
|
||||
return &MockClient_GlobalSecretUpdate_Call{Call: _e.mock.On("GlobalSecretUpdate", secret)}
|
||||
}
|
||||
|
||||
@@ -1473,7 +1473,7 @@ type MockClient_LogsPurge_Call struct {
|
||||
// LogsPurge is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
func (_e *MockClient_Expecter) LogsPurge(repoID interface{}, pipeline interface{}) *MockClient_LogsPurge_Call {
|
||||
func (_e *MockClient_Expecter) LogsPurge(repoID any, pipeline any) *MockClient_LogsPurge_Call {
|
||||
return &MockClient_LogsPurge_Call{Call: _e.mock.On("LogsPurge", repoID, pipeline)}
|
||||
}
|
||||
|
||||
@@ -1540,7 +1540,7 @@ type MockClient_Org_Call struct {
|
||||
|
||||
// Org is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
func (_e *MockClient_Expecter) Org(orgID interface{}) *MockClient_Org_Call {
|
||||
func (_e *MockClient_Expecter) Org(orgID any) *MockClient_Org_Call {
|
||||
return &MockClient_Org_Call{Call: _e.mock.On("Org", orgID)}
|
||||
}
|
||||
|
||||
@@ -1602,7 +1602,7 @@ type MockClient_OrgList_Call struct {
|
||||
|
||||
// OrgList is a helper method to define mock.On call
|
||||
// - opt woodpecker.ListOptions
|
||||
func (_e *MockClient_Expecter) OrgList(opt interface{}) *MockClient_OrgList_Call {
|
||||
func (_e *MockClient_Expecter) OrgList(opt any) *MockClient_OrgList_Call {
|
||||
return &MockClient_OrgList_Call{Call: _e.mock.On("OrgList", opt)}
|
||||
}
|
||||
|
||||
@@ -1664,7 +1664,7 @@ type MockClient_OrgLookup_Call struct {
|
||||
|
||||
// OrgLookup is a helper method to define mock.On call
|
||||
// - orgName string
|
||||
func (_e *MockClient_Expecter) OrgLookup(orgName interface{}) *MockClient_OrgLookup_Call {
|
||||
func (_e *MockClient_Expecter) OrgLookup(orgName any) *MockClient_OrgLookup_Call {
|
||||
return &MockClient_OrgLookup_Call{Call: _e.mock.On("OrgLookup", orgName)}
|
||||
}
|
||||
|
||||
@@ -1727,7 +1727,7 @@ type MockClient_OrgRegistry_Call struct {
|
||||
// OrgRegistry is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - registry string
|
||||
func (_e *MockClient_Expecter) OrgRegistry(orgID interface{}, registry interface{}) *MockClient_OrgRegistry_Call {
|
||||
func (_e *MockClient_Expecter) OrgRegistry(orgID any, registry any) *MockClient_OrgRegistry_Call {
|
||||
return &MockClient_OrgRegistry_Call{Call: _e.mock.On("OrgRegistry", orgID, registry)}
|
||||
}
|
||||
|
||||
@@ -1795,7 +1795,7 @@ type MockClient_OrgRegistryCreate_Call struct {
|
||||
// OrgRegistryCreate is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - registry *woodpecker.Registry
|
||||
func (_e *MockClient_Expecter) OrgRegistryCreate(orgID interface{}, registry interface{}) *MockClient_OrgRegistryCreate_Call {
|
||||
func (_e *MockClient_Expecter) OrgRegistryCreate(orgID any, registry any) *MockClient_OrgRegistryCreate_Call {
|
||||
return &MockClient_OrgRegistryCreate_Call{Call: _e.mock.On("OrgRegistryCreate", orgID, registry)}
|
||||
}
|
||||
|
||||
@@ -1852,7 +1852,7 @@ type MockClient_OrgRegistryDelete_Call struct {
|
||||
// OrgRegistryDelete is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - registry string
|
||||
func (_e *MockClient_Expecter) OrgRegistryDelete(orgID interface{}, registry interface{}) *MockClient_OrgRegistryDelete_Call {
|
||||
func (_e *MockClient_Expecter) OrgRegistryDelete(orgID any, registry any) *MockClient_OrgRegistryDelete_Call {
|
||||
return &MockClient_OrgRegistryDelete_Call{Call: _e.mock.On("OrgRegistryDelete", orgID, registry)}
|
||||
}
|
||||
|
||||
@@ -1920,7 +1920,7 @@ type MockClient_OrgRegistryList_Call struct {
|
||||
// OrgRegistryList is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - opt woodpecker.RegistryListOptions
|
||||
func (_e *MockClient_Expecter) OrgRegistryList(orgID interface{}, opt interface{}) *MockClient_OrgRegistryList_Call {
|
||||
func (_e *MockClient_Expecter) OrgRegistryList(orgID any, opt any) *MockClient_OrgRegistryList_Call {
|
||||
return &MockClient_OrgRegistryList_Call{Call: _e.mock.On("OrgRegistryList", orgID, opt)}
|
||||
}
|
||||
|
||||
@@ -1988,7 +1988,7 @@ type MockClient_OrgRegistryUpdate_Call struct {
|
||||
// OrgRegistryUpdate is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - registry *woodpecker.Registry
|
||||
func (_e *MockClient_Expecter) OrgRegistryUpdate(orgID interface{}, registry interface{}) *MockClient_OrgRegistryUpdate_Call {
|
||||
func (_e *MockClient_Expecter) OrgRegistryUpdate(orgID any, registry any) *MockClient_OrgRegistryUpdate_Call {
|
||||
return &MockClient_OrgRegistryUpdate_Call{Call: _e.mock.On("OrgRegistryUpdate", orgID, registry)}
|
||||
}
|
||||
|
||||
@@ -2056,7 +2056,7 @@ type MockClient_OrgSecret_Call struct {
|
||||
// OrgSecret is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - secret string
|
||||
func (_e *MockClient_Expecter) OrgSecret(orgID interface{}, secret interface{}) *MockClient_OrgSecret_Call {
|
||||
func (_e *MockClient_Expecter) OrgSecret(orgID any, secret any) *MockClient_OrgSecret_Call {
|
||||
return &MockClient_OrgSecret_Call{Call: _e.mock.On("OrgSecret", orgID, secret)}
|
||||
}
|
||||
|
||||
@@ -2124,7 +2124,7 @@ type MockClient_OrgSecretCreate_Call struct {
|
||||
// OrgSecretCreate is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - secret *woodpecker.Secret
|
||||
func (_e *MockClient_Expecter) OrgSecretCreate(orgID interface{}, secret interface{}) *MockClient_OrgSecretCreate_Call {
|
||||
func (_e *MockClient_Expecter) OrgSecretCreate(orgID any, secret any) *MockClient_OrgSecretCreate_Call {
|
||||
return &MockClient_OrgSecretCreate_Call{Call: _e.mock.On("OrgSecretCreate", orgID, secret)}
|
||||
}
|
||||
|
||||
@@ -2181,7 +2181,7 @@ type MockClient_OrgSecretDelete_Call struct {
|
||||
// OrgSecretDelete is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - secret string
|
||||
func (_e *MockClient_Expecter) OrgSecretDelete(orgID interface{}, secret interface{}) *MockClient_OrgSecretDelete_Call {
|
||||
func (_e *MockClient_Expecter) OrgSecretDelete(orgID any, secret any) *MockClient_OrgSecretDelete_Call {
|
||||
return &MockClient_OrgSecretDelete_Call{Call: _e.mock.On("OrgSecretDelete", orgID, secret)}
|
||||
}
|
||||
|
||||
@@ -2249,7 +2249,7 @@ type MockClient_OrgSecretList_Call struct {
|
||||
// OrgSecretList is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - opt woodpecker.SecretListOptions
|
||||
func (_e *MockClient_Expecter) OrgSecretList(orgID interface{}, opt interface{}) *MockClient_OrgSecretList_Call {
|
||||
func (_e *MockClient_Expecter) OrgSecretList(orgID any, opt any) *MockClient_OrgSecretList_Call {
|
||||
return &MockClient_OrgSecretList_Call{Call: _e.mock.On("OrgSecretList", orgID, opt)}
|
||||
}
|
||||
|
||||
@@ -2317,7 +2317,7 @@ type MockClient_OrgSecretUpdate_Call struct {
|
||||
// OrgSecretUpdate is a helper method to define mock.On call
|
||||
// - orgID int64
|
||||
// - secret *woodpecker.Secret
|
||||
func (_e *MockClient_Expecter) OrgSecretUpdate(orgID interface{}, secret interface{}) *MockClient_OrgSecretUpdate_Call {
|
||||
func (_e *MockClient_Expecter) OrgSecretUpdate(orgID any, secret any) *MockClient_OrgSecretUpdate_Call {
|
||||
return &MockClient_OrgSecretUpdate_Call{Call: _e.mock.On("OrgSecretUpdate", orgID, secret)}
|
||||
}
|
||||
|
||||
@@ -2385,7 +2385,7 @@ type MockClient_Pipeline_Call struct {
|
||||
// Pipeline is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
func (_e *MockClient_Expecter) Pipeline(repoID interface{}, pipeline interface{}) *MockClient_Pipeline_Call {
|
||||
func (_e *MockClient_Expecter) Pipeline(repoID any, pipeline any) *MockClient_Pipeline_Call {
|
||||
return &MockClient_Pipeline_Call{Call: _e.mock.On("Pipeline", repoID, pipeline)}
|
||||
}
|
||||
|
||||
@@ -2453,7 +2453,7 @@ type MockClient_PipelineApprove_Call struct {
|
||||
// PipelineApprove is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
func (_e *MockClient_Expecter) PipelineApprove(repoID interface{}, pipeline interface{}) *MockClient_PipelineApprove_Call {
|
||||
func (_e *MockClient_Expecter) PipelineApprove(repoID any, pipeline any) *MockClient_PipelineApprove_Call {
|
||||
return &MockClient_PipelineApprove_Call{Call: _e.mock.On("PipelineApprove", repoID, pipeline)}
|
||||
}
|
||||
|
||||
@@ -2521,7 +2521,7 @@ type MockClient_PipelineCreate_Call struct {
|
||||
// PipelineCreate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opts *woodpecker.PipelineOptions
|
||||
func (_e *MockClient_Expecter) PipelineCreate(repoID interface{}, opts interface{}) *MockClient_PipelineCreate_Call {
|
||||
func (_e *MockClient_Expecter) PipelineCreate(repoID any, opts any) *MockClient_PipelineCreate_Call {
|
||||
return &MockClient_PipelineCreate_Call{Call: _e.mock.On("PipelineCreate", repoID, opts)}
|
||||
}
|
||||
|
||||
@@ -2589,7 +2589,7 @@ type MockClient_PipelineDecline_Call struct {
|
||||
// PipelineDecline is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
func (_e *MockClient_Expecter) PipelineDecline(repoID interface{}, pipeline interface{}) *MockClient_PipelineDecline_Call {
|
||||
func (_e *MockClient_Expecter) PipelineDecline(repoID any, pipeline any) *MockClient_PipelineDecline_Call {
|
||||
return &MockClient_PipelineDecline_Call{Call: _e.mock.On("PipelineDecline", repoID, pipeline)}
|
||||
}
|
||||
|
||||
@@ -2646,7 +2646,7 @@ type MockClient_PipelineDelete_Call struct {
|
||||
// PipelineDelete is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
func (_e *MockClient_Expecter) PipelineDelete(repoID interface{}, pipeline interface{}) *MockClient_PipelineDelete_Call {
|
||||
func (_e *MockClient_Expecter) PipelineDelete(repoID any, pipeline any) *MockClient_PipelineDelete_Call {
|
||||
return &MockClient_PipelineDelete_Call{Call: _e.mock.On("PipelineDelete", repoID, pipeline)}
|
||||
}
|
||||
|
||||
@@ -2714,7 +2714,7 @@ type MockClient_PipelineLast_Call struct {
|
||||
// PipelineLast is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opt woodpecker.PipelineLastOptions
|
||||
func (_e *MockClient_Expecter) PipelineLast(repoID interface{}, opt interface{}) *MockClient_PipelineLast_Call {
|
||||
func (_e *MockClient_Expecter) PipelineLast(repoID any, opt any) *MockClient_PipelineLast_Call {
|
||||
return &MockClient_PipelineLast_Call{Call: _e.mock.On("PipelineLast", repoID, opt)}
|
||||
}
|
||||
|
||||
@@ -2782,7 +2782,7 @@ type MockClient_PipelineList_Call struct {
|
||||
// PipelineList is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opt woodpecker.PipelineListOptions
|
||||
func (_e *MockClient_Expecter) PipelineList(repoID interface{}, opt interface{}) *MockClient_PipelineList_Call {
|
||||
func (_e *MockClient_Expecter) PipelineList(repoID any, opt any) *MockClient_PipelineList_Call {
|
||||
return &MockClient_PipelineList_Call{Call: _e.mock.On("PipelineList", repoID, opt)}
|
||||
}
|
||||
|
||||
@@ -2850,7 +2850,7 @@ type MockClient_PipelineMetadata_Call struct {
|
||||
// PipelineMetadata is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipelineNumber int
|
||||
func (_e *MockClient_Expecter) PipelineMetadata(repoID interface{}, pipelineNumber interface{}) *MockClient_PipelineMetadata_Call {
|
||||
func (_e *MockClient_Expecter) PipelineMetadata(repoID any, pipelineNumber any) *MockClient_PipelineMetadata_Call {
|
||||
return &MockClient_PipelineMetadata_Call{Call: _e.mock.On("PipelineMetadata", repoID, pipelineNumber)}
|
||||
}
|
||||
|
||||
@@ -2974,7 +2974,7 @@ type MockClient_PipelineStart_Call struct {
|
||||
// - repoID int64
|
||||
// - num int64
|
||||
// - opt woodpecker.PipelineStartOptions
|
||||
func (_e *MockClient_Expecter) PipelineStart(repoID interface{}, num interface{}, opt interface{}) *MockClient_PipelineStart_Call {
|
||||
func (_e *MockClient_Expecter) PipelineStart(repoID any, num any, opt any) *MockClient_PipelineStart_Call {
|
||||
return &MockClient_PipelineStart_Call{Call: _e.mock.On("PipelineStart", repoID, num, opt)}
|
||||
}
|
||||
|
||||
@@ -3036,7 +3036,7 @@ type MockClient_PipelineStop_Call struct {
|
||||
// PipelineStop is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
func (_e *MockClient_Expecter) PipelineStop(repoID interface{}, pipeline interface{}) *MockClient_PipelineStop_Call {
|
||||
func (_e *MockClient_Expecter) PipelineStop(repoID any, pipeline any) *MockClient_PipelineStop_Call {
|
||||
return &MockClient_PipelineStop_Call{Call: _e.mock.On("PipelineStop", repoID, pipeline)}
|
||||
}
|
||||
|
||||
@@ -3159,7 +3159,7 @@ type MockClient_Registry_Call struct {
|
||||
// Registry is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - hostname string
|
||||
func (_e *MockClient_Expecter) Registry(repoID interface{}, hostname interface{}) *MockClient_Registry_Call {
|
||||
func (_e *MockClient_Expecter) Registry(repoID any, hostname any) *MockClient_Registry_Call {
|
||||
return &MockClient_Registry_Call{Call: _e.mock.On("Registry", repoID, hostname)}
|
||||
}
|
||||
|
||||
@@ -3227,7 +3227,7 @@ type MockClient_RegistryCreate_Call struct {
|
||||
// RegistryCreate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - registry *woodpecker.Registry
|
||||
func (_e *MockClient_Expecter) RegistryCreate(repoID interface{}, registry interface{}) *MockClient_RegistryCreate_Call {
|
||||
func (_e *MockClient_Expecter) RegistryCreate(repoID any, registry any) *MockClient_RegistryCreate_Call {
|
||||
return &MockClient_RegistryCreate_Call{Call: _e.mock.On("RegistryCreate", repoID, registry)}
|
||||
}
|
||||
|
||||
@@ -3284,7 +3284,7 @@ type MockClient_RegistryDelete_Call struct {
|
||||
// RegistryDelete is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - hostname string
|
||||
func (_e *MockClient_Expecter) RegistryDelete(repoID interface{}, hostname interface{}) *MockClient_RegistryDelete_Call {
|
||||
func (_e *MockClient_Expecter) RegistryDelete(repoID any, hostname any) *MockClient_RegistryDelete_Call {
|
||||
return &MockClient_RegistryDelete_Call{Call: _e.mock.On("RegistryDelete", repoID, hostname)}
|
||||
}
|
||||
|
||||
@@ -3352,7 +3352,7 @@ type MockClient_RegistryList_Call struct {
|
||||
// RegistryList is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opt woodpecker.RegistryListOptions
|
||||
func (_e *MockClient_Expecter) RegistryList(repoID interface{}, opt interface{}) *MockClient_RegistryList_Call {
|
||||
func (_e *MockClient_Expecter) RegistryList(repoID any, opt any) *MockClient_RegistryList_Call {
|
||||
return &MockClient_RegistryList_Call{Call: _e.mock.On("RegistryList", repoID, opt)}
|
||||
}
|
||||
|
||||
@@ -3420,7 +3420,7 @@ type MockClient_RegistryUpdate_Call struct {
|
||||
// RegistryUpdate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - registry *woodpecker.Registry
|
||||
func (_e *MockClient_Expecter) RegistryUpdate(repoID interface{}, registry interface{}) *MockClient_RegistryUpdate_Call {
|
||||
func (_e *MockClient_Expecter) RegistryUpdate(repoID any, registry any) *MockClient_RegistryUpdate_Call {
|
||||
return &MockClient_RegistryUpdate_Call{Call: _e.mock.On("RegistryUpdate", repoID, registry)}
|
||||
}
|
||||
|
||||
@@ -3487,7 +3487,7 @@ type MockClient_Repo_Call struct {
|
||||
|
||||
// Repo is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
func (_e *MockClient_Expecter) Repo(repoID interface{}) *MockClient_Repo_Call {
|
||||
func (_e *MockClient_Expecter) Repo(repoID any) *MockClient_Repo_Call {
|
||||
return &MockClient_Repo_Call{Call: _e.mock.On("Repo", repoID)}
|
||||
}
|
||||
|
||||
@@ -3549,7 +3549,7 @@ type MockClient_RepoChown_Call struct {
|
||||
|
||||
// RepoChown is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
func (_e *MockClient_Expecter) RepoChown(repoID interface{}) *MockClient_RepoChown_Call {
|
||||
func (_e *MockClient_Expecter) RepoChown(repoID any) *MockClient_RepoChown_Call {
|
||||
return &MockClient_RepoChown_Call{Call: _e.mock.On("RepoChown", repoID)}
|
||||
}
|
||||
|
||||
@@ -3600,7 +3600,7 @@ type MockClient_RepoDel_Call struct {
|
||||
|
||||
// RepoDel is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
func (_e *MockClient_Expecter) RepoDel(repoID interface{}) *MockClient_RepoDel_Call {
|
||||
func (_e *MockClient_Expecter) RepoDel(repoID any) *MockClient_RepoDel_Call {
|
||||
return &MockClient_RepoDel_Call{Call: _e.mock.On("RepoDel", repoID)}
|
||||
}
|
||||
|
||||
@@ -3662,7 +3662,7 @@ type MockClient_RepoList_Call struct {
|
||||
|
||||
// RepoList is a helper method to define mock.On call
|
||||
// - opt woodpecker.RepoListOptions
|
||||
func (_e *MockClient_Expecter) RepoList(opt interface{}) *MockClient_RepoList_Call {
|
||||
func (_e *MockClient_Expecter) RepoList(opt any) *MockClient_RepoList_Call {
|
||||
return &MockClient_RepoList_Call{Call: _e.mock.On("RepoList", opt)}
|
||||
}
|
||||
|
||||
@@ -3724,7 +3724,7 @@ type MockClient_RepoLookup_Call struct {
|
||||
|
||||
// RepoLookup is a helper method to define mock.On call
|
||||
// - repoFullName string
|
||||
func (_e *MockClient_Expecter) RepoLookup(repoFullName interface{}) *MockClient_RepoLookup_Call {
|
||||
func (_e *MockClient_Expecter) RepoLookup(repoFullName any) *MockClient_RepoLookup_Call {
|
||||
return &MockClient_RepoLookup_Call{Call: _e.mock.On("RepoLookup", repoFullName)}
|
||||
}
|
||||
|
||||
@@ -3776,7 +3776,7 @@ type MockClient_RepoMove_Call struct {
|
||||
// RepoMove is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opt woodpecker.RepoMoveOptions
|
||||
func (_e *MockClient_Expecter) RepoMove(repoID interface{}, opt interface{}) *MockClient_RepoMove_Call {
|
||||
func (_e *MockClient_Expecter) RepoMove(repoID any, opt any) *MockClient_RepoMove_Call {
|
||||
return &MockClient_RepoMove_Call{Call: _e.mock.On("RepoMove", repoID, opt)}
|
||||
}
|
||||
|
||||
@@ -3844,7 +3844,7 @@ type MockClient_RepoPatch_Call struct {
|
||||
// RepoPatch is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - repo *woodpecker.RepoPatch
|
||||
func (_e *MockClient_Expecter) RepoPatch(repoID interface{}, repo interface{}) *MockClient_RepoPatch_Call {
|
||||
func (_e *MockClient_Expecter) RepoPatch(repoID any, repo any) *MockClient_RepoPatch_Call {
|
||||
return &MockClient_RepoPatch_Call{Call: _e.mock.On("RepoPatch", repoID, repo)}
|
||||
}
|
||||
|
||||
@@ -3911,7 +3911,7 @@ type MockClient_RepoPost_Call struct {
|
||||
|
||||
// RepoPost is a helper method to define mock.On call
|
||||
// - opt woodpecker.RepoPostOptions
|
||||
func (_e *MockClient_Expecter) RepoPost(opt interface{}) *MockClient_RepoPost_Call {
|
||||
func (_e *MockClient_Expecter) RepoPost(opt any) *MockClient_RepoPost_Call {
|
||||
return &MockClient_RepoPost_Call{Call: _e.mock.On("RepoPost", opt)}
|
||||
}
|
||||
|
||||
@@ -3962,7 +3962,7 @@ type MockClient_RepoRepair_Call struct {
|
||||
|
||||
// RepoRepair is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
func (_e *MockClient_Expecter) RepoRepair(repoID interface{}) *MockClient_RepoRepair_Call {
|
||||
func (_e *MockClient_Expecter) RepoRepair(repoID any) *MockClient_RepoRepair_Call {
|
||||
return &MockClient_RepoRepair_Call{Call: _e.mock.On("RepoRepair", repoID)}
|
||||
}
|
||||
|
||||
@@ -4025,7 +4025,7 @@ type MockClient_Secret_Call struct {
|
||||
// Secret is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - secret string
|
||||
func (_e *MockClient_Expecter) Secret(repoID interface{}, secret interface{}) *MockClient_Secret_Call {
|
||||
func (_e *MockClient_Expecter) Secret(repoID any, secret any) *MockClient_Secret_Call {
|
||||
return &MockClient_Secret_Call{Call: _e.mock.On("Secret", repoID, secret)}
|
||||
}
|
||||
|
||||
@@ -4093,7 +4093,7 @@ type MockClient_SecretCreate_Call struct {
|
||||
// SecretCreate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - secret *woodpecker.Secret
|
||||
func (_e *MockClient_Expecter) SecretCreate(repoID interface{}, secret interface{}) *MockClient_SecretCreate_Call {
|
||||
func (_e *MockClient_Expecter) SecretCreate(repoID any, secret any) *MockClient_SecretCreate_Call {
|
||||
return &MockClient_SecretCreate_Call{Call: _e.mock.On("SecretCreate", repoID, secret)}
|
||||
}
|
||||
|
||||
@@ -4150,7 +4150,7 @@ type MockClient_SecretDelete_Call struct {
|
||||
// SecretDelete is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - secret string
|
||||
func (_e *MockClient_Expecter) SecretDelete(repoID interface{}, secret interface{}) *MockClient_SecretDelete_Call {
|
||||
func (_e *MockClient_Expecter) SecretDelete(repoID any, secret any) *MockClient_SecretDelete_Call {
|
||||
return &MockClient_SecretDelete_Call{Call: _e.mock.On("SecretDelete", repoID, secret)}
|
||||
}
|
||||
|
||||
@@ -4218,7 +4218,7 @@ type MockClient_SecretList_Call struct {
|
||||
// SecretList is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - opt woodpecker.SecretListOptions
|
||||
func (_e *MockClient_Expecter) SecretList(repoID interface{}, opt interface{}) *MockClient_SecretList_Call {
|
||||
func (_e *MockClient_Expecter) SecretList(repoID any, opt any) *MockClient_SecretList_Call {
|
||||
return &MockClient_SecretList_Call{Call: _e.mock.On("SecretList", repoID, opt)}
|
||||
}
|
||||
|
||||
@@ -4286,7 +4286,7 @@ type MockClient_SecretUpdate_Call struct {
|
||||
// SecretUpdate is a helper method to define mock.On call
|
||||
// - repoID int64
|
||||
// - secret *woodpecker.Secret
|
||||
func (_e *MockClient_Expecter) SecretUpdate(repoID interface{}, secret interface{}) *MockClient_SecretUpdate_Call {
|
||||
func (_e *MockClient_Expecter) SecretUpdate(repoID any, secret any) *MockClient_SecretUpdate_Call {
|
||||
return &MockClient_SecretUpdate_Call{Call: _e.mock.On("SecretUpdate", repoID, secret)}
|
||||
}
|
||||
|
||||
@@ -4386,7 +4386,7 @@ type MockClient_SetAddress_Call struct {
|
||||
|
||||
// SetAddress is a helper method to define mock.On call
|
||||
// - s string
|
||||
func (_e *MockClient_Expecter) SetAddress(s interface{}) *MockClient_SetAddress_Call {
|
||||
func (_e *MockClient_Expecter) SetAddress(s any) *MockClient_SetAddress_Call {
|
||||
return &MockClient_SetAddress_Call{Call: _e.mock.On("SetAddress", s)}
|
||||
}
|
||||
|
||||
@@ -4426,7 +4426,7 @@ type MockClient_SetClient_Call struct {
|
||||
|
||||
// SetClient is a helper method to define mock.On call
|
||||
// - client *http.Client
|
||||
func (_e *MockClient_Expecter) SetClient(client interface{}) *MockClient_SetClient_Call {
|
||||
func (_e *MockClient_Expecter) SetClient(client any) *MockClient_SetClient_Call {
|
||||
return &MockClient_SetClient_Call{Call: _e.mock.On("SetClient", client)}
|
||||
}
|
||||
|
||||
@@ -4488,7 +4488,7 @@ type MockClient_SetLogLevel_Call struct {
|
||||
|
||||
// SetLogLevel is a helper method to define mock.On call
|
||||
// - logLevel *woodpecker.LogLevel
|
||||
func (_e *MockClient_Expecter) SetLogLevel(logLevel interface{}) *MockClient_SetLogLevel_Call {
|
||||
func (_e *MockClient_Expecter) SetLogLevel(logLevel any) *MockClient_SetLogLevel_Call {
|
||||
return &MockClient_SetLogLevel_Call{Call: _e.mock.On("SetLogLevel", logLevel)}
|
||||
}
|
||||
|
||||
@@ -4552,7 +4552,7 @@ type MockClient_StepLogEntries_Call struct {
|
||||
// - repoID int64
|
||||
// - pipeline int64
|
||||
// - stepID int64
|
||||
func (_e *MockClient_Expecter) StepLogEntries(repoID interface{}, pipeline interface{}, stepID interface{}) *MockClient_StepLogEntries_Call {
|
||||
func (_e *MockClient_Expecter) StepLogEntries(repoID any, pipeline any, stepID any) *MockClient_StepLogEntries_Call {
|
||||
return &MockClient_StepLogEntries_Call{Call: _e.mock.On("StepLogEntries", repoID, pipeline, stepID)}
|
||||
}
|
||||
|
||||
@@ -4615,7 +4615,7 @@ type MockClient_StepLogsPurge_Call struct {
|
||||
// - repoID int64
|
||||
// - pipelineNumber int64
|
||||
// - stepID int64
|
||||
func (_e *MockClient_Expecter) StepLogsPurge(repoID interface{}, pipelineNumber interface{}, stepID interface{}) *MockClient_StepLogsPurge_Call {
|
||||
func (_e *MockClient_Expecter) StepLogsPurge(repoID any, pipelineNumber any, stepID any) *MockClient_StepLogsPurge_Call {
|
||||
return &MockClient_StepLogsPurge_Call{Call: _e.mock.On("StepLogsPurge", repoID, pipelineNumber, stepID)}
|
||||
}
|
||||
|
||||
@@ -4694,9 +4694,9 @@ type MockClient_User_Call struct {
|
||||
// User is a helper method to define mock.On call
|
||||
// - login string
|
||||
// - forgeID ...int64
|
||||
func (_e *MockClient_Expecter) User(login interface{}, forgeID ...interface{}) *MockClient_User_Call {
|
||||
func (_e *MockClient_Expecter) User(login any, forgeID ...any) *MockClient_User_Call {
|
||||
return &MockClient_User_Call{Call: _e.mock.On("User",
|
||||
append([]interface{}{login}, forgeID...)...)}
|
||||
append([]any{login}, forgeID...)...)}
|
||||
}
|
||||
|
||||
func (_c *MockClient_User_Call) Run(run func(login string, forgeID ...int64)) *MockClient_User_Call {
|
||||
@@ -4760,9 +4760,9 @@ type MockClient_UserDel_Call struct {
|
||||
// UserDel is a helper method to define mock.On call
|
||||
// - login string
|
||||
// - forgeID ...int64
|
||||
func (_e *MockClient_Expecter) UserDel(login interface{}, forgeID ...interface{}) *MockClient_UserDel_Call {
|
||||
func (_e *MockClient_Expecter) UserDel(login any, forgeID ...any) *MockClient_UserDel_Call {
|
||||
return &MockClient_UserDel_Call{Call: _e.mock.On("UserDel",
|
||||
append([]interface{}{login}, forgeID...)...)}
|
||||
append([]any{login}, forgeID...)...)}
|
||||
}
|
||||
|
||||
func (_c *MockClient_UserDel_Call) Run(run func(login string, forgeID ...int64)) *MockClient_UserDel_Call {
|
||||
@@ -4830,7 +4830,7 @@ type MockClient_UserList_Call struct {
|
||||
|
||||
// UserList is a helper method to define mock.On call
|
||||
// - opt woodpecker.UserListOptions
|
||||
func (_e *MockClient_Expecter) UserList(opt interface{}) *MockClient_UserList_Call {
|
||||
func (_e *MockClient_Expecter) UserList(opt any) *MockClient_UserList_Call {
|
||||
return &MockClient_UserList_Call{Call: _e.mock.On("UserList", opt)}
|
||||
}
|
||||
|
||||
@@ -4892,7 +4892,7 @@ type MockClient_UserPatch_Call struct {
|
||||
|
||||
// UserPatch is a helper method to define mock.On call
|
||||
// - user *woodpecker.User
|
||||
func (_e *MockClient_Expecter) UserPatch(user interface{}) *MockClient_UserPatch_Call {
|
||||
func (_e *MockClient_Expecter) UserPatch(user any) *MockClient_UserPatch_Call {
|
||||
return &MockClient_UserPatch_Call{Call: _e.mock.On("UserPatch", user)}
|
||||
}
|
||||
|
||||
@@ -4954,7 +4954,7 @@ type MockClient_UserPost_Call struct {
|
||||
|
||||
// UserPost is a helper method to define mock.On call
|
||||
// - user *woodpecker.User
|
||||
func (_e *MockClient_Expecter) UserPost(user interface{}) *MockClient_UserPost_Call {
|
||||
func (_e *MockClient_Expecter) UserPost(user any) *MockClient_UserPost_Call {
|
||||
return &MockClient_UserPost_Call{Call: _e.mock.On("UserPost", user)}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user