diff --git a/pipeline/backend/types/mocks/mock_Backend.go b/pipeline/backend/types/mocks/mock_Backend.go index 10579d335..5d8a4fcb9 100644 --- a/pipeline/backend/types/mocks/mock_Backend.go +++ b/pipeline/backend/types/mocks/mock_Backend.go @@ -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)} } diff --git a/pipeline/tracing/mocks/mock_Tracer.go b/pipeline/tracing/mocks/mock_Tracer.go index c8aba0518..560c0a493 100644 --- a/pipeline/tracing/mocks/mock_Tracer.go +++ b/pipeline/tracing/mocks/mock_Tracer.go @@ -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)} } diff --git a/rpc/mocks/mock_Peer.go b/rpc/mocks/mock_Peer.go index 1f7a62569..76f6ab1fe 100644 --- a/rpc/mocks/mock_Peer.go +++ b/rpc/mocks/mock_Peer.go @@ -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)} } diff --git a/rpc/proto/woodpecker.pb.go b/rpc/proto/woodpecker.pb.go index b81001ccb..87f9b851c 100644 --- a/rpc/proto/woodpecker.pb.go +++ b/rpc/proto/woodpecker.pb.go @@ -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 diff --git a/rpc/proto/woodpecker_grpc.pb.go b/rpc/proto/woodpecker_grpc.pb.go index 0000eb7fc..a69af1c39 100644 --- a/rpc/proto/woodpecker_grpc.pb.go +++ b/rpc/proto/woodpecker_grpc.pb.go @@ -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 diff --git a/server/api/agent.go b/server/api/agent.go index 2cf01213f..c39f8d2aa 100644 --- a/server/api/agent.go +++ b/server/api/agent.go @@ -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 diff --git a/server/api/badge.go b/server/api/badge.go index b6400095b..c8a978aed 100644 --- a/server/api/badge.go +++ b/server/api/badge.go @@ -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) diff --git a/server/api/cron.go b/server/api/cron.go index 49e4a5949..8cb98007d 100644 --- a/server/api/cron.go +++ b/server/api/cron.go @@ -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 diff --git a/server/api/forge.go b/server/api/forge.go index 6968ac1c0..67639a039 100644 --- a/server/api/forge.go +++ b/server/api/forge.go @@ -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 diff --git a/server/api/global_registry.go b/server/api/global_registry.go index 5108a76c0..307fe52ea 100644 --- a/server/api/global_registry.go +++ b/server/api/global_registry.go @@ -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 diff --git a/server/api/global_secret.go b/server/api/global_secret.go index 54fd905d8..2d6c3c0f6 100644 --- a/server/api/global_secret.go +++ b/server/api/global_secret.go @@ -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 diff --git a/server/api/org.go b/server/api/org.go index 8122eea44..9fc3da8ca 100644 --- a/server/api/org.go +++ b/server/api/org.go @@ -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 diff --git a/server/api/org_registry.go b/server/api/org_registry.go index 47c6c77c8..afe78e983 100644 --- a/server/api/org_registry.go +++ b/server/api/org_registry.go @@ -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 diff --git a/server/api/org_secret.go b/server/api/org_secret.go index 6c08a3e23..b33a626d8 100644 --- a/server/api/org_secret.go +++ b/server/api/org_secret.go @@ -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 diff --git a/server/api/pipeline.go b/server/api/pipeline.go index f232ace90..ed12c90d3 100644 --- a/server/api/pipeline.go +++ b/server/api/pipeline.go @@ -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 diff --git a/server/api/registry.go b/server/api/registry.go index 79e1dad03..6ed1cf523 100644 --- a/server/api/registry.go +++ b/server/api/registry.go @@ -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 diff --git a/server/api/repo.go b/server/api/repo.go index ae9b921f0..ddc4536a2 100644 --- a/server/api/repo.go +++ b/server/api/repo.go @@ -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 diff --git a/server/api/repo_secret.go b/server/api/repo_secret.go index 6fe06bd9b..e3f406688 100644 --- a/server/api/repo_secret.go +++ b/server/api/repo_secret.go @@ -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 diff --git a/server/api/users.go b/server/api/users.go index f4f26c190..029756f57 100644 --- a/server/api/users.go +++ b/server/api/users.go @@ -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 diff --git a/server/forge/bitbucket/bitbucket_test.go b/server/forge/bitbucket/bitbucket_test.go index 81c1f023e..c2eb62005 100644 --- a/server/forge/bitbucket/bitbucket_test.go +++ b/server/forge/bitbucket/bitbucket_test.go @@ -138,7 +138,6 @@ func TestBitbucket(t *testing.T) { assert.Error(t, err) listOpts := model.ListOptions{ - All: false, Page: 1, PerPage: 10, } diff --git a/server/forge/bitbucketdatacenter/bitbucketdatacenter.go b/server/forge/bitbucketdatacenter/bitbucketdatacenter.go index 2d25872d4..94a655297 100644 --- a/server/forge/bitbucketdatacenter/bitbucketdatacenter.go +++ b/server/forge/bitbucketdatacenter/bitbucketdatacenter.go @@ -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 diff --git a/server/forge/bitbucketdatacenter/convert.go b/server/forge/bitbucketdatacenter/convert.go index 8bf24bd45..4bb2471d8 100644 --- a/server/forge/bitbucketdatacenter/convert.go +++ b/server/forge/bitbucketdatacenter/convert.go @@ -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)} } diff --git a/server/forge/bitbucketdatacenter/convert_test.go b/server/forge/bitbucketdatacenter/convert_test.go index 96a029899..7c8308339 100644 --- a/server/forge/bitbucketdatacenter/convert_test.go +++ b/server/forge/bitbucketdatacenter/convert_test.go @@ -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}) diff --git a/server/forge/mocks/mock_Forge.go b/server/forge/mocks/mock_Forge.go index e7cce0bfa..d2c1e156f 100644 --- a/server/forge/mocks/mock_Forge.go +++ b/server/forge/mocks/mock_Forge.go @@ -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)} } diff --git a/server/forge/mocks/mock_Refresher.go b/server/forge/mocks/mock_Refresher.go index 41594c37b..16751131a 100644 --- a/server/forge/mocks/mock_Refresher.go +++ b/server/forge/mocks/mock_Refresher.go @@ -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)} } diff --git a/server/model/pagination.go b/server/model/pagination.go index 6cb7cd253..47466c787 100644 --- a/server/model/pagination.go +++ b/server/model/pagination.go @@ -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, "&") -} diff --git a/server/model/pagination_test.go b/server/model/pagination_test.go index f32dd94c8..83d2d37ed 100644 --- a/server/model/pagination_test.go +++ b/server/model/pagination_test.go @@ -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{}) } diff --git a/server/queue/mocks/mock_Queue.go b/server/queue/mocks/mock_Queue.go index fd79498a5..b08fb1070 100644 --- a/server/queue/mocks/mock_Queue.go +++ b/server/queue/mocks/mock_Queue.go @@ -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)} } diff --git a/server/scheduler/mocks/mock_Scheduler.go b/server/scheduler/mocks/mock_Scheduler.go index 85b59e3e4..3f6f971c4 100644 --- a/server/scheduler/mocks/mock_Scheduler.go +++ b/server/scheduler/mocks/mock_Scheduler.go @@ -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)} } diff --git a/server/services/config/mocks/mock_Service.go b/server/services/config/mocks/mock_Service.go index 758ab4e8b..62bf14f03 100644 --- a/server/services/config/mocks/mock_Service.go +++ b/server/services/config/mocks/mock_Service.go @@ -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)} } diff --git a/server/services/environment/mocks/mock_Service.go b/server/services/environment/mocks/mock_Service.go index ddc35061f..6308161c3 100644 --- a/server/services/environment/mocks/mock_Service.go +++ b/server/services/environment/mocks/mock_Service.go @@ -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)} } diff --git a/server/services/log/mocks/mock_Service.go b/server/services/log/mocks/mock_Service.go index 16e4dd056..6d58139f3 100644 --- a/server/services/log/mocks/mock_Service.go +++ b/server/services/log/mocks/mock_Service.go @@ -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)} } diff --git a/server/services/mocks/mock_Manager.go b/server/services/mocks/mock_Manager.go index 280263d13..47dd6c175 100644 --- a/server/services/mocks/mock_Manager.go +++ b/server/services/mocks/mock_Manager.go @@ -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)} } diff --git a/server/services/registry/combined.go b/server/services/registry/combined.go index d28d104a7..b49d70032 100644 --- a/server/services/registry/combined.go +++ b/server/services/registry/combined.go @@ -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 } diff --git a/server/services/registry/db.go b/server/services/registry/db.go index a55e9572a..a95e481db 100644 --- a/server/services/registry/db.go +++ b/server/services/registry/db.go @@ -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) } diff --git a/server/services/registry/filesystem.go b/server/services/registry/filesystem.go index e3e36b1f9..a96756153 100644 --- a/server/services/registry/filesystem.go +++ b/server/services/registry/filesystem.go @@ -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 diff --git a/server/services/registry/mocks/mock_ReadOnlyService.go b/server/services/registry/mocks/mock_ReadOnlyService.go index 2b1506303..8dfd9e93f 100644 --- a/server/services/registry/mocks/mock_ReadOnlyService.go +++ b/server/services/registry/mocks/mock_ReadOnlyService.go @@ -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 } diff --git a/server/services/registry/mocks/mock_Service.go b/server/services/registry/mocks/mock_Service.go index 3339b79e6..62d1997e6 100644 --- a/server/services/registry/mocks/mock_Service.go +++ b/server/services/registry/mocks/mock_Service.go @@ -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)} } diff --git a/server/services/registry/service.go b/server/services/registry/service.go index 6da947446..3dbbbc500 100644 --- a/server/services/registry/service.go +++ b/server/services/registry/service.go @@ -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) } diff --git a/server/services/registry/with_extension.go b/server/services/registry/with_extension.go index 3b3b83432..ec485bb69 100644 --- a/server/services/registry/with_extension.go +++ b/server/services/registry/with_extension.go @@ -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) } diff --git a/server/services/secret/combined.go b/server/services/secret/combined.go index e7b594679..33b438c66 100644 --- a/server/services/secret/combined.go +++ b/server/services/secret/combined.go @@ -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) } diff --git a/server/services/secret/db.go b/server/services/secret/db.go index 66303ec57..dbeb36241 100644 --- a/server/services/secret/db.go +++ b/server/services/secret/db.go @@ -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) } diff --git a/server/services/secret/mocks/mock_Service.go b/server/services/secret/mocks/mock_Service.go index c4aa4711f..0fdce74a9 100644 --- a/server/services/secret/mocks/mock_Service.go +++ b/server/services/secret/mocks/mock_Service.go @@ -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)} } diff --git a/server/services/secret/service.go b/server/services/secret/service.go index 46586cde3..d6bf8c21f 100644 --- a/server/services/secret/service.go +++ b/server/services/secret/service.go @@ -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 diff --git a/server/store/datastore/agent.go b/server/store/datastore/agent.go index fc1507097..eccbe1300 100644 --- a/server/store/datastore/agent.go +++ b/server/store/datastore/agent.go @@ -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) } diff --git a/server/store/datastore/agent_test.go b/server/store/datastore/agent_test.go index 71495b460..bb5aae123 100644 --- a/server/store/datastore/agent_test.go +++ b/server/store/datastore/agent_test.go @@ -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) diff --git a/server/store/datastore/cron.go b/server/store/datastore/cron.go index b9767e628..cc8e16535 100644 --- a/server/store/datastore/cron.go +++ b/server/store/datastore/cron.go @@ -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) } diff --git a/server/store/datastore/forge.go b/server/store/datastore/forge.go index 8c17f591f..692cc29a0 100644 --- a/server/store/datastore/forge.go +++ b/server/store/datastore/forge.go @@ -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) } diff --git a/server/store/datastore/forge_test.go b/server/store/datastore/forge_test.go index b3964ee91..a0ab01ea3 100644 --- a/server/store/datastore/forge_test.go +++ b/server/store/datastore/forge_test.go @@ -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) diff --git a/server/store/datastore/helper.go b/server/store/datastore/helper.go index 1678aa6fb..5dabf2b4e 100644 --- a/server/store/datastore/helper.go +++ b/server/store/datastore/helper.go @@ -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() } diff --git a/server/store/datastore/org.go b/server/store/datastore/org.go index 997a10b29..7a180ff3d 100644 --- a/server/store/datastore/org.go +++ b/server/store/datastore/org.go @@ -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) } diff --git a/server/store/datastore/org_test.go b/server/store/datastore/org_test.go index 5f028b285..8c3d39edf 100644 --- a/server/store/datastore/org_test.go +++ b/server/store/datastore/org_test.go @@ -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) diff --git a/server/store/datastore/pipeline.go b/server/store/datastore/pipeline.go index 301f6a6ed..c01342f02 100644 --- a/server/store/datastore/pipeline.go +++ b/server/store/datastore/pipeline.go @@ -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}) diff --git a/server/store/datastore/pipeline_test.go b/server/store/datastore/pipeline_test.go index 2dd99f433..e43481194 100644 --- a/server/store/datastore/pipeline_test.go +++ b/server/store/datastore/pipeline_test.go @@ -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) diff --git a/server/store/datastore/registry.go b/server/store/datastore/registry.go index e76f9526c..c76130385 100644 --- a/server/store/datastore/registry.go +++ b/server/store/datastore/registry.go @@ -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}, diff --git a/server/store/datastore/registry_test.go b/server/store/datastore/registry_test.go index e398dc601..20167b104 100644 --- a/server/store/datastore/registry_test.go +++ b/server/store/datastore/registry_test.go @@ -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) diff --git a/server/store/datastore/repo.go b/server/store/datastore/repo.go index 31f9fa26b..09c4b369d 100644 --- a/server/store/datastore/repo.go +++ b/server/store/datastore/repo.go @@ -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 { diff --git a/server/store/datastore/secret.go b/server/store/datastore/secret.go index 8c03e40a8..ede806932 100644 --- a/server/store/datastore/secret.go +++ b/server/store/datastore/secret.go @@ -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}, diff --git a/server/store/datastore/secret_test.go b/server/store/datastore/secret_test.go index d96438660..ea3dd26ad 100644 --- a/server/store/datastore/secret_test.go +++ b/server/store/datastore/secret_test.go @@ -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) diff --git a/server/store/datastore/user.go b/server/store/datastore/user.go index e0bce07b4..41e5134d8 100644 --- a/server/store/datastore/user.go +++ b/server/store/datastore/user.go @@ -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) } diff --git a/server/store/datastore/user_test.go b/server/store/datastore/user_test.go index 19a528f27..54a1c07b9 100644 --- a/server/store/datastore/user_test.go +++ b/server/store/datastore/user_test.go @@ -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 diff --git a/server/store/mocks/mock_Store.go b/server/store/mocks/mock_Store.go index 9e772bd80..8e4403a33 100644 --- a/server/store/mocks/mock_Store.go +++ b/server/store/mocks/mock_Store.go @@ -62,7 +62,7 @@ type MockStore_AgentCreate_Call struct { // AgentCreate is a helper method to define mock.On call // - agent *model.Agent -func (_e *MockStore_Expecter) AgentCreate(agent interface{}) *MockStore_AgentCreate_Call { +func (_e *MockStore_Expecter) AgentCreate(agent any) *MockStore_AgentCreate_Call { return &MockStore_AgentCreate_Call{Call: _e.mock.On("AgentCreate", agent)} } @@ -113,7 +113,7 @@ type MockStore_AgentDelete_Call struct { // AgentDelete is a helper method to define mock.On call // - agent *model.Agent -func (_e *MockStore_Expecter) AgentDelete(agent interface{}) *MockStore_AgentDelete_Call { +func (_e *MockStore_Expecter) AgentDelete(agent any) *MockStore_AgentDelete_Call { return &MockStore_AgentDelete_Call{Call: _e.mock.On("AgentDelete", agent)} } @@ -175,7 +175,7 @@ type MockStore_AgentFind_Call struct { // AgentFind is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) AgentFind(n interface{}) *MockStore_AgentFind_Call { +func (_e *MockStore_Expecter) AgentFind(n any) *MockStore_AgentFind_Call { return &MockStore_AgentFind_Call{Call: _e.mock.On("AgentFind", n)} } @@ -237,7 +237,7 @@ type MockStore_AgentFindByToken_Call struct { // AgentFindByToken is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) AgentFindByToken(s interface{}) *MockStore_AgentFindByToken_Call { +func (_e *MockStore_Expecter) AgentFindByToken(s any) *MockStore_AgentFindByToken_Call { return &MockStore_AgentFindByToken_Call{Call: _e.mock.On("AgentFindByToken", s)} } @@ -265,7 +265,7 @@ func (_c *MockStore_AgentFindByToken_Call) RunAndReturn(run func(s string) (*mod } // AgentList provides a mock function for the type MockStore -func (_mock *MockStore) AgentList(p *model.ListOptions) ([]*model.Agent, error) { +func (_mock *MockStore) AgentList(p *model.ListOptionsWithAll) ([]*model.Agent, error) { ret := _mock.Called(p) if len(ret) == 0 { @@ -274,17 +274,17 @@ func (_mock *MockStore) AgentList(p *model.ListOptions) ([]*model.Agent, error) var r0 []*model.Agent var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Agent, error)); ok { + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.Agent, error)); ok { return returnFunc(p) } - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.Agent); ok { + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.Agent); ok { r0 = returnFunc(p) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Agent) } } - if returnFunc, ok := ret.Get(1).(func(*model.ListOptions) error); ok { + if returnFunc, ok := ret.Get(1).(func(*model.ListOptionsWithAll) error); ok { r1 = returnFunc(p) } else { r1 = ret.Error(1) @@ -298,16 +298,16 @@ type MockStore_AgentList_Call struct { } // AgentList is a helper method to define mock.On call -// - p *model.ListOptions -func (_e *MockStore_Expecter) AgentList(p interface{}) *MockStore_AgentList_Call { +// - p *model.ListOptionsWithAll +func (_e *MockStore_Expecter) AgentList(p any) *MockStore_AgentList_Call { return &MockStore_AgentList_Call{Call: _e.mock.On("AgentList", p)} } -func (_c *MockStore_AgentList_Call) Run(run func(p *model.ListOptions)) *MockStore_AgentList_Call { +func (_c *MockStore_AgentList_Call) Run(run func(p *model.ListOptionsWithAll)) *MockStore_AgentList_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, @@ -321,13 +321,13 @@ func (_c *MockStore_AgentList_Call) Return(agents []*model.Agent, err error) *Mo return _c } -func (_c *MockStore_AgentList_Call) RunAndReturn(run func(p *model.ListOptions) ([]*model.Agent, error)) *MockStore_AgentList_Call { +func (_c *MockStore_AgentList_Call) RunAndReturn(run func(p *model.ListOptionsWithAll) ([]*model.Agent, error)) *MockStore_AgentList_Call { _c.Call.Return(run) return _c } // AgentListForOrg provides a mock function for the type MockStore -func (_mock *MockStore) AgentListForOrg(orgID int64, opt *model.ListOptions) ([]*model.Agent, error) { +func (_mock *MockStore) AgentListForOrg(orgID int64, opt *model.ListOptionsWithAll) ([]*model.Agent, error) { ret := _mock.Called(orgID, opt) if len(ret) == 0 { @@ -336,17 +336,17 @@ func (_mock *MockStore) AgentListForOrg(orgID int64, opt *model.ListOptions) ([] var r0 []*model.Agent var r1 error - if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) ([]*model.Agent, error)); ok { + if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptionsWithAll) ([]*model.Agent, error)); ok { return returnFunc(orgID, opt) } - if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) []*model.Agent); ok { + if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptionsWithAll) []*model.Agent); ok { r0 = returnFunc(orgID, opt) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Agent) } } - if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptions) error); ok { + if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptionsWithAll) error); ok { r1 = returnFunc(orgID, opt) } else { r1 = ret.Error(1) @@ -361,20 +361,20 @@ type MockStore_AgentListForOrg_Call struct { // AgentListForOrg is a helper method to define mock.On call // - orgID int64 -// - opt *model.ListOptions -func (_e *MockStore_Expecter) AgentListForOrg(orgID interface{}, opt interface{}) *MockStore_AgentListForOrg_Call { +// - opt *model.ListOptionsWithAll +func (_e *MockStore_Expecter) AgentListForOrg(orgID any, opt any) *MockStore_AgentListForOrg_Call { return &MockStore_AgentListForOrg_Call{Call: _e.mock.On("AgentListForOrg", orgID, opt)} } -func (_c *MockStore_AgentListForOrg_Call) Run(run func(orgID int64, opt *model.ListOptions)) *MockStore_AgentListForOrg_Call { +func (_c *MockStore_AgentListForOrg_Call) Run(run func(orgID int64, opt *model.ListOptionsWithAll)) *MockStore_AgentListForOrg_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, @@ -389,7 +389,7 @@ func (_c *MockStore_AgentListForOrg_Call) Return(agents []*model.Agent, err erro return _c } -func (_c *MockStore_AgentListForOrg_Call) RunAndReturn(run func(orgID int64, opt *model.ListOptions) ([]*model.Agent, error)) *MockStore_AgentListForOrg_Call { +func (_c *MockStore_AgentListForOrg_Call) RunAndReturn(run func(orgID int64, opt *model.ListOptionsWithAll) ([]*model.Agent, error)) *MockStore_AgentListForOrg_Call { _c.Call.Return(run) return _c } @@ -418,7 +418,7 @@ type MockStore_AgentUpdate_Call struct { // AgentUpdate is a helper method to define mock.On call // - agent *model.Agent -func (_e *MockStore_Expecter) AgentUpdate(agent interface{}) *MockStore_AgentUpdate_Call { +func (_e *MockStore_Expecter) AgentUpdate(agent any) *MockStore_AgentUpdate_Call { return &MockStore_AgentUpdate_Call{Call: _e.mock.On("AgentUpdate", agent)} } @@ -524,7 +524,7 @@ type MockStore_ConfigPersist_Call struct { // ConfigPersist is a helper method to define mock.On call // - config *model.Config -func (_e *MockStore_Expecter) ConfigPersist(config interface{}) *MockStore_ConfigPersist_Call { +func (_e *MockStore_Expecter) ConfigPersist(config any) *MockStore_ConfigPersist_Call { return &MockStore_ConfigPersist_Call{Call: _e.mock.On("ConfigPersist", config)} } @@ -586,7 +586,7 @@ type MockStore_ConfigsForPipeline_Call struct { // ConfigsForPipeline is a helper method to define mock.On call // - pipelineID int64 -func (_e *MockStore_Expecter) ConfigsForPipeline(pipelineID interface{}) *MockStore_ConfigsForPipeline_Call { +func (_e *MockStore_Expecter) ConfigsForPipeline(pipelineID any) *MockStore_ConfigsForPipeline_Call { return &MockStore_ConfigsForPipeline_Call{Call: _e.mock.On("ConfigsForPipeline", pipelineID)} } @@ -644,9 +644,9 @@ type MockStore_CreatePipeline_Call struct { // CreatePipeline is a helper method to define mock.On call // - pipeline *model.Pipeline // - steps ...*model.Step -func (_e *MockStore_Expecter) CreatePipeline(pipeline interface{}, steps ...interface{}) *MockStore_CreatePipeline_Call { +func (_e *MockStore_Expecter) CreatePipeline(pipeline any, steps ...any) *MockStore_CreatePipeline_Call { return &MockStore_CreatePipeline_Call{Call: _e.mock.On("CreatePipeline", - append([]interface{}{pipeline}, steps...)...)} + append([]any{pipeline}, steps...)...)} } func (_c *MockStore_CreatePipeline_Call) Run(run func(pipeline *model.Pipeline, steps ...*model.Step)) *MockStore_CreatePipeline_Call { @@ -703,7 +703,7 @@ type MockStore_CreateRedirection_Call struct { // CreateRedirection is a helper method to define mock.On call // - redirection *model.Redirection -func (_e *MockStore_Expecter) CreateRedirection(redirection interface{}) *MockStore_CreateRedirection_Call { +func (_e *MockStore_Expecter) CreateRedirection(redirection any) *MockStore_CreateRedirection_Call { return &MockStore_CreateRedirection_Call{Call: _e.mock.On("CreateRedirection", redirection)} } @@ -754,7 +754,7 @@ type MockStore_CreateRepo_Call struct { // CreateRepo is a helper method to define mock.On call // - repo *model.Repo -func (_e *MockStore_Expecter) CreateRepo(repo interface{}) *MockStore_CreateRepo_Call { +func (_e *MockStore_Expecter) CreateRepo(repo any) *MockStore_CreateRepo_Call { return &MockStore_CreateRepo_Call{Call: _e.mock.On("CreateRepo", repo)} } @@ -805,7 +805,7 @@ type MockStore_CreateUser_Call struct { // CreateUser is a helper method to define mock.On call // - user *model.User -func (_e *MockStore_Expecter) CreateUser(user interface{}) *MockStore_CreateUser_Call { +func (_e *MockStore_Expecter) CreateUser(user any) *MockStore_CreateUser_Call { return &MockStore_CreateUser_Call{Call: _e.mock.On("CreateUser", user)} } @@ -856,7 +856,7 @@ type MockStore_CronCreate_Call struct { // CronCreate is a helper method to define mock.On call // - cron *model.Cron -func (_e *MockStore_Expecter) CronCreate(cron interface{}) *MockStore_CronCreate_Call { +func (_e *MockStore_Expecter) CronCreate(cron any) *MockStore_CronCreate_Call { return &MockStore_CronCreate_Call{Call: _e.mock.On("CronCreate", cron)} } @@ -908,7 +908,7 @@ type MockStore_CronDelete_Call struct { // CronDelete is a helper method to define mock.On call // - repo *model.Repo // - n int64 -func (_e *MockStore_Expecter) CronDelete(repo interface{}, n interface{}) *MockStore_CronDelete_Call { +func (_e *MockStore_Expecter) CronDelete(repo any, n any) *MockStore_CronDelete_Call { return &MockStore_CronDelete_Call{Call: _e.mock.On("CronDelete", repo, n)} } @@ -976,7 +976,7 @@ type MockStore_CronFind_Call struct { // CronFind is a helper method to define mock.On call // - repo *model.Repo // - n int64 -func (_e *MockStore_Expecter) CronFind(repo interface{}, n interface{}) *MockStore_CronFind_Call { +func (_e *MockStore_Expecter) CronFind(repo any, n any) *MockStore_CronFind_Call { return &MockStore_CronFind_Call{Call: _e.mock.On("CronFind", repo, n)} } @@ -1042,7 +1042,7 @@ type MockStore_CronGetLock_Call struct { // CronGetLock is a helper method to define mock.On call // - cron *model.Cron // - n int64 -func (_e *MockStore_Expecter) CronGetLock(cron interface{}, n interface{}) *MockStore_CronGetLock_Call { +func (_e *MockStore_Expecter) CronGetLock(cron any, n any) *MockStore_CronGetLock_Call { return &MockStore_CronGetLock_Call{Call: _e.mock.On("CronGetLock", cron, n)} } @@ -1075,8 +1075,8 @@ func (_c *MockStore_CronGetLock_Call) RunAndReturn(run func(cron *model.Cron, n } // CronList provides a mock function for the type MockStore -func (_mock *MockStore) CronList(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Cron, error) { - ret := _mock.Called(repo, listOptions) +func (_mock *MockStore) CronList(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Cron, error) { + ret := _mock.Called(repo, listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for CronList") @@ -1084,18 +1084,18 @@ func (_mock *MockStore) CronList(repo *model.Repo, listOptions *model.ListOption var r0 []*model.Cron var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) ([]*model.Cron, error)); ok { - return returnFunc(repo, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll) ([]*model.Cron, error)); ok { + return returnFunc(repo, listOptionsWithAll) } - if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) []*model.Cron); ok { - r0 = returnFunc(repo, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll) []*model.Cron); ok { + r0 = returnFunc(repo, listOptionsWithAll) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Cron) } } - 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) } @@ -1109,20 +1109,20 @@ type MockStore_CronList_Call struct { // CronList is a helper method to define mock.On call // - repo *model.Repo -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) CronList(repo interface{}, listOptions interface{}) *MockStore_CronList_Call { - return &MockStore_CronList_Call{Call: _e.mock.On("CronList", repo, listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) CronList(repo any, listOptionsWithAll any) *MockStore_CronList_Call { + return &MockStore_CronList_Call{Call: _e.mock.On("CronList", repo, listOptionsWithAll)} } -func (_c *MockStore_CronList_Call) Run(run func(repo *model.Repo, listOptions *model.ListOptions)) *MockStore_CronList_Call { +func (_c *MockStore_CronList_Call) Run(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_CronList_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, @@ -1137,7 +1137,7 @@ func (_c *MockStore_CronList_Call) Return(crons []*model.Cron, err error) *MockS return _c } -func (_c *MockStore_CronList_Call) RunAndReturn(run func(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Cron, error)) *MockStore_CronList_Call { +func (_c *MockStore_CronList_Call) RunAndReturn(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Cron, error)) *MockStore_CronList_Call { _c.Call.Return(run) return _c } @@ -1178,7 +1178,7 @@ type MockStore_CronListNextExecute_Call struct { // CronListNextExecute is a helper method to define mock.On call // - n int64 // - n1 int64 -func (_e *MockStore_Expecter) CronListNextExecute(n interface{}, n1 interface{}) *MockStore_CronListNextExecute_Call { +func (_e *MockStore_Expecter) CronListNextExecute(n any, n1 any) *MockStore_CronListNextExecute_Call { return &MockStore_CronListNextExecute_Call{Call: _e.mock.On("CronListNextExecute", n, n1)} } @@ -1235,7 +1235,7 @@ type MockStore_CronUpdate_Call struct { // CronUpdate is a helper method to define mock.On call // - repo *model.Repo // - cron *model.Cron -func (_e *MockStore_Expecter) CronUpdate(repo interface{}, cron interface{}) *MockStore_CronUpdate_Call { +func (_e *MockStore_Expecter) CronUpdate(repo any, cron any) *MockStore_CronUpdate_Call { return &MockStore_CronUpdate_Call{Call: _e.mock.On("CronUpdate", repo, cron)} } @@ -1291,7 +1291,7 @@ type MockStore_DeletePipeline_Call struct { // DeletePipeline is a helper method to define mock.On call // - pipeline *model.Pipeline -func (_e *MockStore_Expecter) DeletePipeline(pipeline interface{}) *MockStore_DeletePipeline_Call { +func (_e *MockStore_Expecter) DeletePipeline(pipeline any) *MockStore_DeletePipeline_Call { return &MockStore_DeletePipeline_Call{Call: _e.mock.On("DeletePipeline", pipeline)} } @@ -1342,7 +1342,7 @@ type MockStore_DeleteRepo_Call struct { // DeleteRepo is a helper method to define mock.On call // - repo *model.Repo -func (_e *MockStore_Expecter) DeleteRepo(repo interface{}) *MockStore_DeleteRepo_Call { +func (_e *MockStore_Expecter) DeleteRepo(repo any) *MockStore_DeleteRepo_Call { return &MockStore_DeleteRepo_Call{Call: _e.mock.On("DeleteRepo", repo)} } @@ -1393,7 +1393,7 @@ type MockStore_DeleteUser_Call struct { // DeleteUser is a helper method to define mock.On call // - user *model.User -func (_e *MockStore_Expecter) DeleteUser(user interface{}) *MockStore_DeleteUser_Call { +func (_e *MockStore_Expecter) DeleteUser(user any) *MockStore_DeleteUser_Call { return &MockStore_DeleteUser_Call{Call: _e.mock.On("DeleteUser", user)} } @@ -1444,7 +1444,7 @@ type MockStore_ForgeCreate_Call struct { // ForgeCreate is a helper method to define mock.On call // - forge *model.Forge -func (_e *MockStore_Expecter) ForgeCreate(forge interface{}) *MockStore_ForgeCreate_Call { +func (_e *MockStore_Expecter) ForgeCreate(forge any) *MockStore_ForgeCreate_Call { return &MockStore_ForgeCreate_Call{Call: _e.mock.On("ForgeCreate", forge)} } @@ -1495,7 +1495,7 @@ type MockStore_ForgeDelete_Call struct { // ForgeDelete is a helper method to define mock.On call // - forge *model.Forge -func (_e *MockStore_Expecter) ForgeDelete(forge interface{}) *MockStore_ForgeDelete_Call { +func (_e *MockStore_Expecter) ForgeDelete(forge any) *MockStore_ForgeDelete_Call { return &MockStore_ForgeDelete_Call{Call: _e.mock.On("ForgeDelete", forge)} } @@ -1557,7 +1557,7 @@ type MockStore_ForgeGet_Call struct { // ForgeGet is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) ForgeGet(n interface{}) *MockStore_ForgeGet_Call { +func (_e *MockStore_Expecter) ForgeGet(n any) *MockStore_ForgeGet_Call { return &MockStore_ForgeGet_Call{Call: _e.mock.On("ForgeGet", n)} } @@ -1585,7 +1585,7 @@ func (_c *MockStore_ForgeGet_Call) RunAndReturn(run func(n int64) (*model.Forge, } // ForgeList provides a mock function for the type MockStore -func (_mock *MockStore) ForgeList(p *model.ListOptions) ([]*model.Forge, error) { +func (_mock *MockStore) ForgeList(p *model.ListOptionsWithAll) ([]*model.Forge, error) { ret := _mock.Called(p) if len(ret) == 0 { @@ -1594,17 +1594,17 @@ func (_mock *MockStore) ForgeList(p *model.ListOptions) ([]*model.Forge, error) var r0 []*model.Forge var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Forge, error)); ok { + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.Forge, error)); ok { return returnFunc(p) } - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.Forge); ok { + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.Forge); ok { r0 = returnFunc(p) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Forge) } } - if returnFunc, ok := ret.Get(1).(func(*model.ListOptions) error); ok { + if returnFunc, ok := ret.Get(1).(func(*model.ListOptionsWithAll) error); ok { r1 = returnFunc(p) } else { r1 = ret.Error(1) @@ -1618,16 +1618,16 @@ type MockStore_ForgeList_Call struct { } // ForgeList is a helper method to define mock.On call -// - p *model.ListOptions -func (_e *MockStore_Expecter) ForgeList(p interface{}) *MockStore_ForgeList_Call { +// - p *model.ListOptionsWithAll +func (_e *MockStore_Expecter) ForgeList(p any) *MockStore_ForgeList_Call { return &MockStore_ForgeList_Call{Call: _e.mock.On("ForgeList", p)} } -func (_c *MockStore_ForgeList_Call) Run(run func(p *model.ListOptions)) *MockStore_ForgeList_Call { +func (_c *MockStore_ForgeList_Call) Run(run func(p *model.ListOptionsWithAll)) *MockStore_ForgeList_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, @@ -1641,7 +1641,7 @@ func (_c *MockStore_ForgeList_Call) Return(forges []*model.Forge, err error) *Mo return _c } -func (_c *MockStore_ForgeList_Call) RunAndReturn(run func(p *model.ListOptions) ([]*model.Forge, error)) *MockStore_ForgeList_Call { +func (_c *MockStore_ForgeList_Call) RunAndReturn(run func(p *model.ListOptionsWithAll) ([]*model.Forge, error)) *MockStore_ForgeList_Call { _c.Call.Return(run) return _c } @@ -1670,7 +1670,7 @@ type MockStore_ForgeUpdate_Call struct { // ForgeUpdate is a helper method to define mock.On call // - forge *model.Forge -func (_e *MockStore_Expecter) ForgeUpdate(forge interface{}) *MockStore_ForgeUpdate_Call { +func (_e *MockStore_Expecter) ForgeUpdate(forge any) *MockStore_ForgeUpdate_Call { return &MockStore_ForgeUpdate_Call{Call: _e.mock.On("ForgeUpdate", forge)} } @@ -1732,7 +1732,7 @@ type MockStore_GetActivePipelineList_Call struct { // GetActivePipelineList is a helper method to define mock.On call // - repo *model.Repo -func (_e *MockStore_Expecter) GetActivePipelineList(repo interface{}) *MockStore_GetActivePipelineList_Call { +func (_e *MockStore_Expecter) GetActivePipelineList(repo any) *MockStore_GetActivePipelineList_Call { return &MockStore_GetActivePipelineList_Call{Call: _e.mock.On("GetActivePipelineList", repo)} } @@ -1794,7 +1794,7 @@ type MockStore_GetPipeline_Call struct { // GetPipeline is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) GetPipeline(n interface{}) *MockStore_GetPipeline_Call { +func (_e *MockStore_Expecter) GetPipeline(n any) *MockStore_GetPipeline_Call { return &MockStore_GetPipeline_Call{Call: _e.mock.On("GetPipeline", n)} } @@ -1858,7 +1858,7 @@ type MockStore_GetPipelineBadge_Call struct { // - repo *model.Repo // - s string // - webhookEvents []model.WebhookEvent -func (_e *MockStore_Expecter) GetPipelineBadge(repo interface{}, s interface{}, webhookEvents interface{}) *MockStore_GetPipelineBadge_Call { +func (_e *MockStore_Expecter) GetPipelineBadge(repo any, s any, webhookEvents any) *MockStore_GetPipelineBadge_Call { return &MockStore_GetPipelineBadge_Call{Call: _e.mock.On("GetPipelineBadge", repo, s, webhookEvents)} } @@ -1985,7 +1985,7 @@ type MockStore_GetPipelineLastBefore_Call struct { // - repo *model.Repo // - s string // - n int64 -func (_e *MockStore_Expecter) GetPipelineLastBefore(repo interface{}, s interface{}, n interface{}) *MockStore_GetPipelineLastBefore_Call { +func (_e *MockStore_Expecter) GetPipelineLastBefore(repo any, s any, n any) *MockStore_GetPipelineLastBefore_Call { return &MockStore_GetPipelineLastBefore_Call{Call: _e.mock.On("GetPipelineLastBefore", repo, s, n)} } @@ -2058,7 +2058,7 @@ type MockStore_GetPipelineLastByBranch_Call struct { // GetPipelineLastByBranch is a helper method to define mock.On call // - repo *model.Repo // - s string -func (_e *MockStore_Expecter) GetPipelineLastByBranch(repo interface{}, s interface{}) *MockStore_GetPipelineLastByBranch_Call { +func (_e *MockStore_Expecter) GetPipelineLastByBranch(repo any, s any) *MockStore_GetPipelineLastByBranch_Call { return &MockStore_GetPipelineLastByBranch_Call{Call: _e.mock.On("GetPipelineLastByBranch", repo, s)} } @@ -2091,8 +2091,8 @@ func (_c *MockStore_GetPipelineLastByBranch_Call) RunAndReturn(run func(repo *mo } // GetPipelineList provides a mock function for the type MockStore -func (_mock *MockStore) GetPipelineList(repo *model.Repo, listOptions *model.ListOptions, pipelineFilter *model.PipelineFilter) ([]*model.Pipeline, error) { - ret := _mock.Called(repo, listOptions, pipelineFilter) +func (_mock *MockStore) GetPipelineList(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll, pipelineFilter *model.PipelineFilter) ([]*model.Pipeline, error) { + ret := _mock.Called(repo, listOptionsWithAll, pipelineFilter) if len(ret) == 0 { panic("no return value specified for GetPipelineList") @@ -2100,18 +2100,18 @@ func (_mock *MockStore) GetPipelineList(repo *model.Repo, listOptions *model.Lis var r0 []*model.Pipeline var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions, *model.PipelineFilter) ([]*model.Pipeline, error)); ok { - return returnFunc(repo, listOptions, pipelineFilter) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll, *model.PipelineFilter) ([]*model.Pipeline, error)); ok { + return returnFunc(repo, listOptionsWithAll, pipelineFilter) } - if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions, *model.PipelineFilter) []*model.Pipeline); ok { - r0 = returnFunc(repo, listOptions, pipelineFilter) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, *model.ListOptionsWithAll, *model.PipelineFilter) []*model.Pipeline); ok { + r0 = returnFunc(repo, listOptionsWithAll, pipelineFilter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Pipeline) } } - if returnFunc, ok := ret.Get(1).(func(*model.Repo, *model.ListOptions, *model.PipelineFilter) error); ok { - r1 = returnFunc(repo, listOptions, pipelineFilter) + if returnFunc, ok := ret.Get(1).(func(*model.Repo, *model.ListOptionsWithAll, *model.PipelineFilter) error); ok { + r1 = returnFunc(repo, listOptionsWithAll, pipelineFilter) } else { r1 = ret.Error(1) } @@ -2125,21 +2125,21 @@ type MockStore_GetPipelineList_Call struct { // GetPipelineList is a helper method to define mock.On call // - repo *model.Repo -// - listOptions *model.ListOptions +// - listOptionsWithAll *model.ListOptionsWithAll // - pipelineFilter *model.PipelineFilter -func (_e *MockStore_Expecter) GetPipelineList(repo interface{}, listOptions interface{}, pipelineFilter interface{}) *MockStore_GetPipelineList_Call { - return &MockStore_GetPipelineList_Call{Call: _e.mock.On("GetPipelineList", repo, listOptions, pipelineFilter)} +func (_e *MockStore_Expecter) GetPipelineList(repo any, listOptionsWithAll any, pipelineFilter any) *MockStore_GetPipelineList_Call { + return &MockStore_GetPipelineList_Call{Call: _e.mock.On("GetPipelineList", repo, listOptionsWithAll, pipelineFilter)} } -func (_c *MockStore_GetPipelineList_Call) Run(run func(repo *model.Repo, listOptions *model.ListOptions, pipelineFilter *model.PipelineFilter)) *MockStore_GetPipelineList_Call { +func (_c *MockStore_GetPipelineList_Call) Run(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll, pipelineFilter *model.PipelineFilter)) *MockStore_GetPipelineList_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) } var arg2 *model.PipelineFilter if args[2] != nil { @@ -2159,7 +2159,7 @@ func (_c *MockStore_GetPipelineList_Call) Return(pipelines []*model.Pipeline, er return _c } -func (_c *MockStore_GetPipelineList_Call) RunAndReturn(run func(repo *model.Repo, listOptions *model.ListOptions, pipelineFilter *model.PipelineFilter) ([]*model.Pipeline, error)) *MockStore_GetPipelineList_Call { +func (_c *MockStore_GetPipelineList_Call) RunAndReturn(run func(repo *model.Repo, listOptionsWithAll *model.ListOptionsWithAll, pipelineFilter *model.PipelineFilter) ([]*model.Pipeline, error)) *MockStore_GetPipelineList_Call { _c.Call.Return(run) return _c } @@ -2200,7 +2200,7 @@ type MockStore_GetPipelineNumber_Call struct { // GetPipelineNumber is a helper method to define mock.On call // - repo *model.Repo // - n int64 -func (_e *MockStore_Expecter) GetPipelineNumber(repo interface{}, n interface{}) *MockStore_GetPipelineNumber_Call { +func (_e *MockStore_Expecter) GetPipelineNumber(repo any, n any) *MockStore_GetPipelineNumber_Call { return &MockStore_GetPipelineNumber_Call{Call: _e.mock.On("GetPipelineNumber", repo, n)} } @@ -2322,7 +2322,7 @@ type MockStore_GetRepo_Call struct { // GetRepo is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) GetRepo(n interface{}) *MockStore_GetRepo_Call { +func (_e *MockStore_Expecter) GetRepo(n any) *MockStore_GetRepo_Call { return &MockStore_GetRepo_Call{Call: _e.mock.On("GetRepo", n)} } @@ -2438,7 +2438,7 @@ type MockStore_GetRepoForgeID_Call struct { // GetRepoForgeID is a helper method to define mock.On call // - n int64 // - forgeRemoteID model.ForgeRemoteID -func (_e *MockStore_Expecter) GetRepoForgeID(n interface{}, forgeRemoteID interface{}) *MockStore_GetRepoForgeID_Call { +func (_e *MockStore_Expecter) GetRepoForgeID(n any, forgeRemoteID any) *MockStore_GetRepoForgeID_Call { return &MockStore_GetRepoForgeID_Call{Call: _e.mock.On("GetRepoForgeID", n, forgeRemoteID)} } @@ -2505,7 +2505,7 @@ type MockStore_GetRepoLatestPipelines_Call struct { // GetRepoLatestPipelines is a helper method to define mock.On call // - int64s []int64 -func (_e *MockStore_Expecter) GetRepoLatestPipelines(int64s interface{}) *MockStore_GetRepoLatestPipelines_Call { +func (_e *MockStore_Expecter) GetRepoLatestPipelines(int64s any) *MockStore_GetRepoLatestPipelines_Call { return &MockStore_GetRepoLatestPipelines_Call{Call: _e.mock.On("GetRepoLatestPipelines", int64s)} } @@ -2567,7 +2567,7 @@ type MockStore_GetRepoName_Call struct { // GetRepoName is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) GetRepoName(s interface{}) *MockStore_GetRepoName_Call { +func (_e *MockStore_Expecter) GetRepoName(s any) *MockStore_GetRepoName_Call { return &MockStore_GetRepoName_Call{Call: _e.mock.On("GetRepoName", s)} } @@ -2631,7 +2631,7 @@ type MockStore_GetRepoNameFallback_Call struct { // - forgeID int64 // - remoteID model.ForgeRemoteID // - fullName string -func (_e *MockStore_Expecter) GetRepoNameFallback(forgeID interface{}, remoteID interface{}, fullName interface{}) *MockStore_GetRepoNameFallback_Call { +func (_e *MockStore_Expecter) GetRepoNameFallback(forgeID any, remoteID any, fullName any) *MockStore_GetRepoNameFallback_Call { return &MockStore_GetRepoNameFallback_Call{Call: _e.mock.On("GetRepoNameFallback", forgeID, remoteID, fullName)} } @@ -2703,7 +2703,7 @@ type MockStore_GetUser_Call struct { // GetUser is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) GetUser(n interface{}) *MockStore_GetUser_Call { +func (_e *MockStore_Expecter) GetUser(n any) *MockStore_GetUser_Call { return &MockStore_GetUser_Call{Call: _e.mock.On("GetUser", n)} } @@ -2766,7 +2766,7 @@ type MockStore_GetUserByLogin_Call struct { // GetUserByLogin is a helper method to define mock.On call // - n int64 // - s string -func (_e *MockStore_Expecter) GetUserByLogin(n interface{}, s interface{}) *MockStore_GetUserByLogin_Call { +func (_e *MockStore_Expecter) GetUserByLogin(n any, s any) *MockStore_GetUserByLogin_Call { return &MockStore_GetUserByLogin_Call{Call: _e.mock.On("GetUserByLogin", n, s)} } @@ -2834,7 +2834,7 @@ type MockStore_GetUserByRemoteID_Call struct { // GetUserByRemoteID is a helper method to define mock.On call // - n int64 // - forgeRemoteID model.ForgeRemoteID -func (_e *MockStore_Expecter) GetUserByRemoteID(n interface{}, forgeRemoteID interface{}) *MockStore_GetUserByRemoteID_Call { +func (_e *MockStore_Expecter) GetUserByRemoteID(n any, forgeRemoteID any) *MockStore_GetUserByRemoteID_Call { return &MockStore_GetUserByRemoteID_Call{Call: _e.mock.On("GetUserByRemoteID", n, forgeRemoteID)} } @@ -2920,7 +2920,7 @@ func (_c *MockStore_GetUserCount_Call) RunAndReturn(run func() (int64, error)) * } // GetUserList provides a mock function for the type MockStore -func (_mock *MockStore) GetUserList(p *model.ListOptions) ([]*model.User, error) { +func (_mock *MockStore) GetUserList(p *model.ListOptionsWithAll) ([]*model.User, error) { ret := _mock.Called(p) if len(ret) == 0 { @@ -2929,17 +2929,17 @@ func (_mock *MockStore) GetUserList(p *model.ListOptions) ([]*model.User, error) var r0 []*model.User var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.User, error)); ok { + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.User, error)); ok { return returnFunc(p) } - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.User); ok { + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.User); ok { r0 = returnFunc(p) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.User) } } - if returnFunc, ok := ret.Get(1).(func(*model.ListOptions) error); ok { + if returnFunc, ok := ret.Get(1).(func(*model.ListOptionsWithAll) error); ok { r1 = returnFunc(p) } else { r1 = ret.Error(1) @@ -2953,16 +2953,16 @@ type MockStore_GetUserList_Call struct { } // GetUserList is a helper method to define mock.On call -// - p *model.ListOptions -func (_e *MockStore_Expecter) GetUserList(p interface{}) *MockStore_GetUserList_Call { +// - p *model.ListOptionsWithAll +func (_e *MockStore_Expecter) GetUserList(p any) *MockStore_GetUserList_Call { return &MockStore_GetUserList_Call{Call: _e.mock.On("GetUserList", p)} } -func (_c *MockStore_GetUserList_Call) Run(run func(p *model.ListOptions)) *MockStore_GetUserList_Call { +func (_c *MockStore_GetUserList_Call) Run(run func(p *model.ListOptionsWithAll)) *MockStore_GetUserList_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, @@ -2976,7 +2976,7 @@ func (_c *MockStore_GetUserList_Call) Return(users []*model.User, err error) *Mo return _c } -func (_c *MockStore_GetUserList_Call) RunAndReturn(run func(p *model.ListOptions) ([]*model.User, error)) *MockStore_GetUserList_Call { +func (_c *MockStore_GetUserList_Call) RunAndReturn(run func(p *model.ListOptionsWithAll) ([]*model.User, error)) *MockStore_GetUserList_Call { _c.Call.Return(run) return _c } @@ -3016,7 +3016,7 @@ type MockStore_GlobalRegistryFind_Call struct { // GlobalRegistryFind is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) GlobalRegistryFind(s interface{}) *MockStore_GlobalRegistryFind_Call { +func (_e *MockStore_Expecter) GlobalRegistryFind(s any) *MockStore_GlobalRegistryFind_Call { return &MockStore_GlobalRegistryFind_Call{Call: _e.mock.On("GlobalRegistryFind", s)} } @@ -3044,8 +3044,8 @@ func (_c *MockStore_GlobalRegistryFind_Call) RunAndReturn(run func(s string) (*m } // GlobalRegistryList provides a mock function for the type MockStore -func (_mock *MockStore) GlobalRegistryList(listOptions *model.ListOptions) ([]*model.Registry, error) { - ret := _mock.Called(listOptions) +func (_mock *MockStore) GlobalRegistryList(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error) { + ret := _mock.Called(listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for GlobalRegistryList") @@ -3053,18 +3053,18 @@ func (_mock *MockStore) GlobalRegistryList(listOptions *model.ListOptions) ([]*m 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) } @@ -3077,16 +3077,16 @@ type MockStore_GlobalRegistryList_Call struct { } // GlobalRegistryList is a helper method to define mock.On call -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) GlobalRegistryList(listOptions interface{}) *MockStore_GlobalRegistryList_Call { - return &MockStore_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) GlobalRegistryList(listOptionsWithAll any) *MockStore_GlobalRegistryList_Call { + return &MockStore_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptionsWithAll)} } -func (_c *MockStore_GlobalRegistryList_Call) Run(run func(listOptions *model.ListOptions)) *MockStore_GlobalRegistryList_Call { +func (_c *MockStore_GlobalRegistryList_Call) Run(run func(listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_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, @@ -3100,7 +3100,7 @@ func (_c *MockStore_GlobalRegistryList_Call) Return(registrys []*model.Registry, return _c } -func (_c *MockStore_GlobalRegistryList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Registry, error)) *MockStore_GlobalRegistryList_Call { +func (_c *MockStore_GlobalRegistryList_Call) RunAndReturn(run func(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockStore_GlobalRegistryList_Call { _c.Call.Return(run) return _c } @@ -3140,7 +3140,7 @@ type MockStore_GlobalSecretFind_Call struct { // GlobalSecretFind is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) GlobalSecretFind(s interface{}) *MockStore_GlobalSecretFind_Call { +func (_e *MockStore_Expecter) GlobalSecretFind(s any) *MockStore_GlobalSecretFind_Call { return &MockStore_GlobalSecretFind_Call{Call: _e.mock.On("GlobalSecretFind", s)} } @@ -3168,8 +3168,8 @@ func (_c *MockStore_GlobalSecretFind_Call) RunAndReturn(run func(s string) (*mod } // GlobalSecretList provides a mock function for the type MockStore -func (_mock *MockStore) GlobalSecretList(listOptions *model.ListOptions) ([]*model.Secret, error) { - ret := _mock.Called(listOptions) +func (_mock *MockStore) GlobalSecretList(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error) { + ret := _mock.Called(listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for GlobalSecretList") @@ -3177,18 +3177,18 @@ func (_mock *MockStore) GlobalSecretList(listOptions *model.ListOptions) ([]*mod 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) } @@ -3201,16 +3201,16 @@ type MockStore_GlobalSecretList_Call struct { } // GlobalSecretList is a helper method to define mock.On call -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) GlobalSecretList(listOptions interface{}) *MockStore_GlobalSecretList_Call { - return &MockStore_GlobalSecretList_Call{Call: _e.mock.On("GlobalSecretList", listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) GlobalSecretList(listOptionsWithAll any) *MockStore_GlobalSecretList_Call { + return &MockStore_GlobalSecretList_Call{Call: _e.mock.On("GlobalSecretList", listOptionsWithAll)} } -func (_c *MockStore_GlobalSecretList_Call) Run(run func(listOptions *model.ListOptions)) *MockStore_GlobalSecretList_Call { +func (_c *MockStore_GlobalSecretList_Call) Run(run func(listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_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, @@ -3224,7 +3224,7 @@ func (_c *MockStore_GlobalSecretList_Call) Return(secrets []*model.Secret, err e return _c } -func (_c *MockStore_GlobalSecretList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Secret, error)) *MockStore_GlobalSecretList_Call { +func (_c *MockStore_GlobalSecretList_Call) RunAndReturn(run func(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error)) *MockStore_GlobalSecretList_Call { _c.Call.Return(run) return _c } @@ -3263,7 +3263,7 @@ type MockStore_HasRedirectionForRepo_Call struct { // HasRedirectionForRepo is a helper method to define mock.On call // - n int64 // - s string -func (_e *MockStore_Expecter) HasRedirectionForRepo(n interface{}, s interface{}) *MockStore_HasRedirectionForRepo_Call { +func (_e *MockStore_Expecter) HasRedirectionForRepo(n any, s any) *MockStore_HasRedirectionForRepo_Call { return &MockStore_HasRedirectionForRepo_Call{Call: _e.mock.On("HasRedirectionForRepo", n, s)} } @@ -3320,7 +3320,7 @@ type MockStore_LogAppend_Call struct { // LogAppend is a helper method to define mock.On call // - step *model.Step // - logEntrys []*model.LogEntry -func (_e *MockStore_Expecter) LogAppend(step interface{}, logEntrys interface{}) *MockStore_LogAppend_Call { +func (_e *MockStore_Expecter) LogAppend(step any, logEntrys any) *MockStore_LogAppend_Call { return &MockStore_LogAppend_Call{Call: _e.mock.On("LogAppend", step, logEntrys)} } @@ -3376,7 +3376,7 @@ type MockStore_LogDelete_Call struct { // LogDelete is a helper method to define mock.On call // - step *model.Step -func (_e *MockStore_Expecter) LogDelete(step interface{}) *MockStore_LogDelete_Call { +func (_e *MockStore_Expecter) LogDelete(step any) *MockStore_LogDelete_Call { return &MockStore_LogDelete_Call{Call: _e.mock.On("LogDelete", step)} } @@ -3438,7 +3438,7 @@ type MockStore_LogFind_Call struct { // LogFind is a helper method to define mock.On call // - step *model.Step -func (_e *MockStore_Expecter) LogFind(step interface{}) *MockStore_LogFind_Call { +func (_e *MockStore_Expecter) LogFind(step any) *MockStore_LogFind_Call { return &MockStore_LogFind_Call{Call: _e.mock.On("LogFind", step)} } @@ -3490,7 +3490,7 @@ type MockStore_Migrate_Call struct { // Migrate is a helper method to define mock.On call // - context1 context.Context // - b bool -func (_e *MockStore_Expecter) Migrate(context1 interface{}, b interface{}) *MockStore_Migrate_Call { +func (_e *MockStore_Expecter) Migrate(context1 any, b any) *MockStore_Migrate_Call { return &MockStore_Migrate_Call{Call: _e.mock.On("Migrate", context1, b)} } @@ -3546,7 +3546,7 @@ type MockStore_OrgCreate_Call struct { // OrgCreate is a helper method to define mock.On call // - org *model.Org -func (_e *MockStore_Expecter) OrgCreate(org interface{}) *MockStore_OrgCreate_Call { +func (_e *MockStore_Expecter) OrgCreate(org any) *MockStore_OrgCreate_Call { return &MockStore_OrgCreate_Call{Call: _e.mock.On("OrgCreate", org)} } @@ -3597,7 +3597,7 @@ type MockStore_OrgDelete_Call struct { // OrgDelete is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) OrgDelete(n interface{}) *MockStore_OrgDelete_Call { +func (_e *MockStore_Expecter) OrgDelete(n any) *MockStore_OrgDelete_Call { return &MockStore_OrgDelete_Call{Call: _e.mock.On("OrgDelete", n)} } @@ -3660,7 +3660,7 @@ type MockStore_OrgFindByName_Call struct { // OrgFindByName is a helper method to define mock.On call // - s string // - n int64 -func (_e *MockStore_Expecter) OrgFindByName(s interface{}, n interface{}) *MockStore_OrgFindByName_Call { +func (_e *MockStore_Expecter) OrgFindByName(s any, n any) *MockStore_OrgFindByName_Call { return &MockStore_OrgFindByName_Call{Call: _e.mock.On("OrgFindByName", s, n)} } @@ -3727,7 +3727,7 @@ type MockStore_OrgGet_Call struct { // OrgGet is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) OrgGet(n interface{}) *MockStore_OrgGet_Call { +func (_e *MockStore_Expecter) OrgGet(n any) *MockStore_OrgGet_Call { return &MockStore_OrgGet_Call{Call: _e.mock.On("OrgGet", n)} } @@ -3755,8 +3755,8 @@ func (_c *MockStore_OrgGet_Call) RunAndReturn(run func(n int64) (*model.Org, err } // OrgList provides a mock function for the type MockStore -func (_mock *MockStore) OrgList(listOptions *model.ListOptions) ([]*model.Org, error) { - ret := _mock.Called(listOptions) +func (_mock *MockStore) OrgList(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Org, error) { + ret := _mock.Called(listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for OrgList") @@ -3764,18 +3764,18 @@ func (_mock *MockStore) OrgList(listOptions *model.ListOptions) ([]*model.Org, e var r0 []*model.Org var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Org, error)); ok { - return returnFunc(listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) ([]*model.Org, error)); ok { + return returnFunc(listOptionsWithAll) } - if returnFunc, ok := ret.Get(0).(func(*model.ListOptions) []*model.Org); ok { - r0 = returnFunc(listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.ListOptionsWithAll) []*model.Org); ok { + r0 = returnFunc(listOptionsWithAll) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Org) } } - 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) } @@ -3788,16 +3788,16 @@ type MockStore_OrgList_Call struct { } // OrgList is a helper method to define mock.On call -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) OrgList(listOptions interface{}) *MockStore_OrgList_Call { - return &MockStore_OrgList_Call{Call: _e.mock.On("OrgList", listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) OrgList(listOptionsWithAll any) *MockStore_OrgList_Call { + return &MockStore_OrgList_Call{Call: _e.mock.On("OrgList", listOptionsWithAll)} } -func (_c *MockStore_OrgList_Call) Run(run func(listOptions *model.ListOptions)) *MockStore_OrgList_Call { +func (_c *MockStore_OrgList_Call) Run(run func(listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_OrgList_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, @@ -3811,7 +3811,7 @@ func (_c *MockStore_OrgList_Call) Return(orgs []*model.Org, err error) *MockStor return _c } -func (_c *MockStore_OrgList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Org, error)) *MockStore_OrgList_Call { +func (_c *MockStore_OrgList_Call) RunAndReturn(run func(listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Org, error)) *MockStore_OrgList_Call { _c.Call.Return(run) return _c } @@ -3851,7 +3851,7 @@ type MockStore_OrgLookup_Call struct { // OrgLookup is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) OrgLookup(s interface{}) *MockStore_OrgLookup_Call { +func (_e *MockStore_Expecter) OrgLookup(s any) *MockStore_OrgLookup_Call { return &MockStore_OrgLookup_Call{Call: _e.mock.On("OrgLookup", s)} } @@ -3914,7 +3914,7 @@ type MockStore_OrgRegistryFind_Call struct { // OrgRegistryFind is a helper method to define mock.On call // - n int64 // - s string -func (_e *MockStore_Expecter) OrgRegistryFind(n interface{}, s interface{}) *MockStore_OrgRegistryFind_Call { +func (_e *MockStore_Expecter) OrgRegistryFind(n any, s any) *MockStore_OrgRegistryFind_Call { return &MockStore_OrgRegistryFind_Call{Call: _e.mock.On("OrgRegistryFind", n, s)} } @@ -3947,8 +3947,8 @@ func (_c *MockStore_OrgRegistryFind_Call) RunAndReturn(run func(n int64, s strin } // OrgRegistryList provides a mock function for the type MockStore -func (_mock *MockStore) OrgRegistryList(n int64, listOptions *model.ListOptions) ([]*model.Registry, error) { - ret := _mock.Called(n, listOptions) +func (_mock *MockStore) 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") @@ -3956,18 +3956,18 @@ func (_mock *MockStore) OrgRegistryList(n int64, listOptions *model.ListOptions) 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) } @@ -3981,20 +3981,20 @@ type MockStore_OrgRegistryList_Call struct { // OrgRegistryList is a helper method to define mock.On call // - n int64 -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) OrgRegistryList(n interface{}, listOptions interface{}) *MockStore_OrgRegistryList_Call { - return &MockStore_OrgRegistryList_Call{Call: _e.mock.On("OrgRegistryList", n, listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) OrgRegistryList(n any, listOptionsWithAll any) *MockStore_OrgRegistryList_Call { + return &MockStore_OrgRegistryList_Call{Call: _e.mock.On("OrgRegistryList", n, listOptionsWithAll)} } -func (_c *MockStore_OrgRegistryList_Call) Run(run func(n int64, listOptions *model.ListOptions)) *MockStore_OrgRegistryList_Call { +func (_c *MockStore_OrgRegistryList_Call) Run(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_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, @@ -4009,14 +4009,14 @@ func (_c *MockStore_OrgRegistryList_Call) Return(registrys []*model.Registry, er return _c } -func (_c *MockStore_OrgRegistryList_Call) RunAndReturn(run func(n int64, listOptions *model.ListOptions) ([]*model.Registry, error)) *MockStore_OrgRegistryList_Call { +func (_c *MockStore_OrgRegistryList_Call) RunAndReturn(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockStore_OrgRegistryList_Call { _c.Call.Return(run) return _c } // OrgRepoList provides a mock function for the type MockStore -func (_mock *MockStore) OrgRepoList(org *model.Org, listOptions *model.ListOptions) ([]*model.Repo, error) { - ret := _mock.Called(org, listOptions) +func (_mock *MockStore) OrgRepoList(org *model.Org, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Repo, error) { + ret := _mock.Called(org, listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for OrgRepoList") @@ -4024,18 +4024,18 @@ func (_mock *MockStore) OrgRepoList(org *model.Org, listOptions *model.ListOptio var r0 []*model.Repo var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.Org, *model.ListOptions) ([]*model.Repo, error)); ok { - return returnFunc(org, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Org, *model.ListOptionsWithAll) ([]*model.Repo, error)); ok { + return returnFunc(org, listOptionsWithAll) } - if returnFunc, ok := ret.Get(0).(func(*model.Org, *model.ListOptions) []*model.Repo); ok { - r0 = returnFunc(org, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Org, *model.ListOptionsWithAll) []*model.Repo); ok { + r0 = returnFunc(org, listOptionsWithAll) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Repo) } } - if returnFunc, ok := ret.Get(1).(func(*model.Org, *model.ListOptions) error); ok { - r1 = returnFunc(org, listOptions) + if returnFunc, ok := ret.Get(1).(func(*model.Org, *model.ListOptionsWithAll) error); ok { + r1 = returnFunc(org, listOptionsWithAll) } else { r1 = ret.Error(1) } @@ -4049,20 +4049,20 @@ type MockStore_OrgRepoList_Call struct { // OrgRepoList is a helper method to define mock.On call // - org *model.Org -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) OrgRepoList(org interface{}, listOptions interface{}) *MockStore_OrgRepoList_Call { - return &MockStore_OrgRepoList_Call{Call: _e.mock.On("OrgRepoList", org, listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) OrgRepoList(org any, listOptionsWithAll any) *MockStore_OrgRepoList_Call { + return &MockStore_OrgRepoList_Call{Call: _e.mock.On("OrgRepoList", org, listOptionsWithAll)} } -func (_c *MockStore_OrgRepoList_Call) Run(run func(org *model.Org, listOptions *model.ListOptions)) *MockStore_OrgRepoList_Call { +func (_c *MockStore_OrgRepoList_Call) Run(run func(org *model.Org, listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_OrgRepoList_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 *model.Org if args[0] != nil { arg0 = args[0].(*model.Org) } - var arg1 *model.ListOptions + var arg1 *model.ListOptionsWithAll if args[1] != nil { - arg1 = args[1].(*model.ListOptions) + arg1 = args[1].(*model.ListOptionsWithAll) } run( arg0, @@ -4077,7 +4077,7 @@ func (_c *MockStore_OrgRepoList_Call) Return(repos []*model.Repo, err error) *Mo return _c } -func (_c *MockStore_OrgRepoList_Call) RunAndReturn(run func(org *model.Org, listOptions *model.ListOptions) ([]*model.Repo, error)) *MockStore_OrgRepoList_Call { +func (_c *MockStore_OrgRepoList_Call) RunAndReturn(run func(org *model.Org, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Repo, error)) *MockStore_OrgRepoList_Call { _c.Call.Return(run) return _c } @@ -4118,7 +4118,7 @@ type MockStore_OrgSecretFind_Call struct { // OrgSecretFind is a helper method to define mock.On call // - n int64 // - s string -func (_e *MockStore_Expecter) OrgSecretFind(n interface{}, s interface{}) *MockStore_OrgSecretFind_Call { +func (_e *MockStore_Expecter) OrgSecretFind(n any, s any) *MockStore_OrgSecretFind_Call { return &MockStore_OrgSecretFind_Call{Call: _e.mock.On("OrgSecretFind", n, s)} } @@ -4151,8 +4151,8 @@ func (_c *MockStore_OrgSecretFind_Call) RunAndReturn(run func(n int64, s string) } // OrgSecretList provides a mock function for the type MockStore -func (_mock *MockStore) OrgSecretList(n int64, listOptions *model.ListOptions) ([]*model.Secret, error) { - ret := _mock.Called(n, listOptions) +func (_mock *MockStore) 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") @@ -4160,18 +4160,18 @@ func (_mock *MockStore) 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) } @@ -4185,20 +4185,20 @@ type MockStore_OrgSecretList_Call struct { // OrgSecretList is a helper method to define mock.On call // - n int64 -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) OrgSecretList(n interface{}, listOptions interface{}) *MockStore_OrgSecretList_Call { - return &MockStore_OrgSecretList_Call{Call: _e.mock.On("OrgSecretList", n, listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) OrgSecretList(n any, listOptionsWithAll any) *MockStore_OrgSecretList_Call { + return &MockStore_OrgSecretList_Call{Call: _e.mock.On("OrgSecretList", n, listOptionsWithAll)} } -func (_c *MockStore_OrgSecretList_Call) Run(run func(n int64, listOptions *model.ListOptions)) *MockStore_OrgSecretList_Call { +func (_c *MockStore_OrgSecretList_Call) Run(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_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, @@ -4213,7 +4213,7 @@ func (_c *MockStore_OrgSecretList_Call) Return(secrets []*model.Secret, err erro return _c } -func (_c *MockStore_OrgSecretList_Call) RunAndReturn(run func(n int64, listOptions *model.ListOptions) ([]*model.Secret, error)) *MockStore_OrgSecretList_Call { +func (_c *MockStore_OrgSecretList_Call) RunAndReturn(run func(n int64, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error)) *MockStore_OrgSecretList_Call { _c.Call.Return(run) return _c } @@ -4242,7 +4242,7 @@ type MockStore_OrgUpdate_Call struct { // OrgUpdate is a helper method to define mock.On call // - org *model.Org -func (_e *MockStore_Expecter) OrgUpdate(org interface{}) *MockStore_OrgUpdate_Call { +func (_e *MockStore_Expecter) OrgUpdate(org any) *MockStore_OrgUpdate_Call { return &MockStore_OrgUpdate_Call{Call: _e.mock.On("OrgUpdate", org)} } @@ -4305,7 +4305,7 @@ type MockStore_PermFind_Call struct { // PermFind is a helper method to define mock.On call // - user *model.User // - repo *model.Repo -func (_e *MockStore_Expecter) PermFind(user interface{}, repo interface{}) *MockStore_PermFind_Call { +func (_e *MockStore_Expecter) PermFind(user any, repo any) *MockStore_PermFind_Call { return &MockStore_PermFind_Call{Call: _e.mock.On("PermFind", user, repo)} } @@ -4362,7 +4362,7 @@ type MockStore_PermPrune_Call struct { // PermPrune is a helper method to define mock.On call // - userID int64 // - keepRepoIDs []int64 -func (_e *MockStore_Expecter) PermPrune(userID interface{}, keepRepoIDs interface{}) *MockStore_PermPrune_Call { +func (_e *MockStore_Expecter) PermPrune(userID any, keepRepoIDs any) *MockStore_PermPrune_Call { return &MockStore_PermPrune_Call{Call: _e.mock.On("PermPrune", userID, keepRepoIDs)} } @@ -4418,7 +4418,7 @@ type MockStore_PermUpsert_Call struct { // PermUpsert is a helper method to define mock.On call // - perm *model.Perm -func (_e *MockStore_Expecter) PermUpsert(perm interface{}) *MockStore_PermUpsert_Call { +func (_e *MockStore_Expecter) PermUpsert(perm any) *MockStore_PermUpsert_Call { return &MockStore_PermUpsert_Call{Call: _e.mock.On("PermUpsert", perm)} } @@ -4513,7 +4513,7 @@ type MockStore_PipelineConfigCreate_Call struct { // PipelineConfigCreate is a helper method to define mock.On call // - pipelineConfig *model.PipelineConfig -func (_e *MockStore_Expecter) PipelineConfigCreate(pipelineConfig interface{}) *MockStore_PipelineConfigCreate_Call { +func (_e *MockStore_Expecter) PipelineConfigCreate(pipelineConfig any) *MockStore_PipelineConfigCreate_Call { return &MockStore_PipelineConfigCreate_Call{Call: _e.mock.On("PipelineConfigCreate", pipelineConfig)} } @@ -4564,7 +4564,7 @@ type MockStore_RegistryCreate_Call struct { // RegistryCreate is a helper method to define mock.On call // - registry *model.Registry -func (_e *MockStore_Expecter) RegistryCreate(registry interface{}) *MockStore_RegistryCreate_Call { +func (_e *MockStore_Expecter) RegistryCreate(registry any) *MockStore_RegistryCreate_Call { return &MockStore_RegistryCreate_Call{Call: _e.mock.On("RegistryCreate", registry)} } @@ -4615,7 +4615,7 @@ type MockStore_RegistryDelete_Call struct { // RegistryDelete is a helper method to define mock.On call // - registry *model.Registry -func (_e *MockStore_Expecter) RegistryDelete(registry interface{}) *MockStore_RegistryDelete_Call { +func (_e *MockStore_Expecter) RegistryDelete(registry any) *MockStore_RegistryDelete_Call { return &MockStore_RegistryDelete_Call{Call: _e.mock.On("RegistryDelete", registry)} } @@ -4678,7 +4678,7 @@ type MockStore_RegistryFind_Call struct { // RegistryFind is a helper method to define mock.On call // - repo *model.Repo // - s string -func (_e *MockStore_Expecter) RegistryFind(repo interface{}, s interface{}) *MockStore_RegistryFind_Call { +func (_e *MockStore_Expecter) RegistryFind(repo any, s any) *MockStore_RegistryFind_Call { return &MockStore_RegistryFind_Call{Call: _e.mock.On("RegistryFind", repo, s)} } @@ -4711,8 +4711,8 @@ func (_c *MockStore_RegistryFind_Call) RunAndReturn(run func(repo *model.Repo, s } // RegistryList provides a mock function for the type MockStore -func (_mock *MockStore) RegistryList(repo *model.Repo, b bool, listOptions *model.ListOptions) ([]*model.Registry, error) { - ret := _mock.Called(repo, b, listOptions) +func (_mock *MockStore) RegistryList(repo *model.Repo, b bool, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error) { + ret := _mock.Called(repo, b, listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for RegistryList") @@ -4720,18 +4720,18 @@ func (_mock *MockStore) RegistryList(repo *model.Repo, b bool, listOptions *mode var r0 []*model.Registry var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptions) ([]*model.Registry, error)); ok { - return returnFunc(repo, b, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptionsWithAll) ([]*model.Registry, error)); ok { + return returnFunc(repo, b, listOptionsWithAll) } - if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptions) []*model.Registry); ok { - r0 = returnFunc(repo, b, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptionsWithAll) []*model.Registry); ok { + r0 = returnFunc(repo, b, listOptionsWithAll) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Registry) } } - if returnFunc, ok := ret.Get(1).(func(*model.Repo, bool, *model.ListOptions) error); ok { - r1 = returnFunc(repo, b, listOptions) + if returnFunc, ok := ret.Get(1).(func(*model.Repo, bool, *model.ListOptionsWithAll) error); ok { + r1 = returnFunc(repo, b, listOptionsWithAll) } else { r1 = ret.Error(1) } @@ -4746,12 +4746,12 @@ type MockStore_RegistryList_Call struct { // RegistryList is a helper method to define mock.On call // - repo *model.Repo // - b bool -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) RegistryList(repo interface{}, b interface{}, listOptions interface{}) *MockStore_RegistryList_Call { - return &MockStore_RegistryList_Call{Call: _e.mock.On("RegistryList", repo, b, listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) RegistryList(repo any, b any, listOptionsWithAll any) *MockStore_RegistryList_Call { + return &MockStore_RegistryList_Call{Call: _e.mock.On("RegistryList", repo, b, listOptionsWithAll)} } -func (_c *MockStore_RegistryList_Call) Run(run func(repo *model.Repo, b bool, listOptions *model.ListOptions)) *MockStore_RegistryList_Call { +func (_c *MockStore_RegistryList_Call) Run(run func(repo *model.Repo, b bool, listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_RegistryList_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 *model.Repo if args[0] != nil { @@ -4761,9 +4761,9 @@ func (_c *MockStore_RegistryList_Call) Run(run func(repo *model.Repo, b bool, li if args[1] != nil { arg1 = args[1].(bool) } - var arg2 *model.ListOptions + var arg2 *model.ListOptionsWithAll if args[2] != nil { - arg2 = args[2].(*model.ListOptions) + arg2 = args[2].(*model.ListOptionsWithAll) } run( arg0, @@ -4779,7 +4779,7 @@ func (_c *MockStore_RegistryList_Call) Return(registrys []*model.Registry, err e return _c } -func (_c *MockStore_RegistryList_Call) RunAndReturn(run func(repo *model.Repo, b bool, listOptions *model.ListOptions) ([]*model.Registry, error)) *MockStore_RegistryList_Call { +func (_c *MockStore_RegistryList_Call) RunAndReturn(run func(repo *model.Repo, b bool, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Registry, error)) *MockStore_RegistryList_Call { _c.Call.Return(run) return _c } @@ -4863,7 +4863,7 @@ type MockStore_RegistryUpdate_Call struct { // RegistryUpdate is a helper method to define mock.On call // - registry *model.Registry -func (_e *MockStore_Expecter) RegistryUpdate(registry interface{}) *MockStore_RegistryUpdate_Call { +func (_e *MockStore_Expecter) RegistryUpdate(registry any) *MockStore_RegistryUpdate_Call { return &MockStore_RegistryUpdate_Call{Call: _e.mock.On("RegistryUpdate", registry)} } @@ -4928,7 +4928,7 @@ type MockStore_RepoList_Call struct { // - owned bool // - active bool // - filter *model.RepoFilter -func (_e *MockStore_Expecter) RepoList(user interface{}, owned interface{}, active interface{}, filter interface{}) *MockStore_RepoList_Call { +func (_e *MockStore_Expecter) RepoList(user any, owned any, active any, filter any) *MockStore_RepoList_Call { return &MockStore_RepoList_Call{Call: _e.mock.On("RepoList", user, owned, active, filter)} } @@ -4971,7 +4971,7 @@ func (_c *MockStore_RepoList_Call) RunAndReturn(run func(user *model.User, owned } // RepoListAll provides a mock function for the type MockStore -func (_mock *MockStore) RepoListAll(active bool, p *model.ListOptions) ([]*model.Repo, error) { +func (_mock *MockStore) RepoListAll(active bool, p *model.ListOptionsWithAll) ([]*model.Repo, error) { ret := _mock.Called(active, p) if len(ret) == 0 { @@ -4980,17 +4980,17 @@ func (_mock *MockStore) RepoListAll(active bool, p *model.ListOptions) ([]*model var r0 []*model.Repo var r1 error - if returnFunc, ok := ret.Get(0).(func(bool, *model.ListOptions) ([]*model.Repo, error)); ok { + if returnFunc, ok := ret.Get(0).(func(bool, *model.ListOptionsWithAll) ([]*model.Repo, error)); ok { return returnFunc(active, p) } - if returnFunc, ok := ret.Get(0).(func(bool, *model.ListOptions) []*model.Repo); ok { + if returnFunc, ok := ret.Get(0).(func(bool, *model.ListOptionsWithAll) []*model.Repo); ok { r0 = returnFunc(active, p) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Repo) } } - if returnFunc, ok := ret.Get(1).(func(bool, *model.ListOptions) error); ok { + if returnFunc, ok := ret.Get(1).(func(bool, *model.ListOptionsWithAll) error); ok { r1 = returnFunc(active, p) } else { r1 = ret.Error(1) @@ -5005,20 +5005,20 @@ type MockStore_RepoListAll_Call struct { // RepoListAll is a helper method to define mock.On call // - active bool -// - p *model.ListOptions -func (_e *MockStore_Expecter) RepoListAll(active interface{}, p interface{}) *MockStore_RepoListAll_Call { +// - p *model.ListOptionsWithAll +func (_e *MockStore_Expecter) RepoListAll(active any, p any) *MockStore_RepoListAll_Call { return &MockStore_RepoListAll_Call{Call: _e.mock.On("RepoListAll", active, p)} } -func (_c *MockStore_RepoListAll_Call) Run(run func(active bool, p *model.ListOptions)) *MockStore_RepoListAll_Call { +func (_c *MockStore_RepoListAll_Call) Run(run func(active bool, p *model.ListOptionsWithAll)) *MockStore_RepoListAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 bool if args[0] != nil { arg0 = args[0].(bool) } - var arg1 *model.ListOptions + var arg1 *model.ListOptionsWithAll if args[1] != nil { - arg1 = args[1].(*model.ListOptions) + arg1 = args[1].(*model.ListOptionsWithAll) } run( arg0, @@ -5033,7 +5033,7 @@ func (_c *MockStore_RepoListAll_Call) Return(repos []*model.Repo, err error) *Mo return _c } -func (_c *MockStore_RepoListAll_Call) RunAndReturn(run func(active bool, p *model.ListOptions) ([]*model.Repo, error)) *MockStore_RepoListAll_Call { +func (_c *MockStore_RepoListAll_Call) RunAndReturn(run func(active bool, p *model.ListOptionsWithAll) ([]*model.Repo, error)) *MockStore_RepoListAll_Call { _c.Call.Return(run) return _c } @@ -5073,7 +5073,7 @@ type MockStore_RepoListLatest_Call struct { // RepoListLatest is a helper method to define mock.On call // - user *model.User -func (_e *MockStore_Expecter) RepoListLatest(user interface{}) *MockStore_RepoListLatest_Call { +func (_e *MockStore_Expecter) RepoListLatest(user any) *MockStore_RepoListLatest_Call { return &MockStore_RepoListLatest_Call{Call: _e.mock.On("RepoListLatest", user)} } @@ -5124,7 +5124,7 @@ type MockStore_SecretCreate_Call struct { // SecretCreate is a helper method to define mock.On call // - secret *model.Secret -func (_e *MockStore_Expecter) SecretCreate(secret interface{}) *MockStore_SecretCreate_Call { +func (_e *MockStore_Expecter) SecretCreate(secret any) *MockStore_SecretCreate_Call { return &MockStore_SecretCreate_Call{Call: _e.mock.On("SecretCreate", secret)} } @@ -5175,7 +5175,7 @@ type MockStore_SecretDelete_Call struct { // SecretDelete is a helper method to define mock.On call // - secret *model.Secret -func (_e *MockStore_Expecter) SecretDelete(secret interface{}) *MockStore_SecretDelete_Call { +func (_e *MockStore_Expecter) SecretDelete(secret any) *MockStore_SecretDelete_Call { return &MockStore_SecretDelete_Call{Call: _e.mock.On("SecretDelete", secret)} } @@ -5238,7 +5238,7 @@ type MockStore_SecretFind_Call struct { // SecretFind is a helper method to define mock.On call // - repo *model.Repo // - s string -func (_e *MockStore_Expecter) SecretFind(repo interface{}, s interface{}) *MockStore_SecretFind_Call { +func (_e *MockStore_Expecter) SecretFind(repo any, s any) *MockStore_SecretFind_Call { return &MockStore_SecretFind_Call{Call: _e.mock.On("SecretFind", repo, s)} } @@ -5271,8 +5271,8 @@ func (_c *MockStore_SecretFind_Call) RunAndReturn(run func(repo *model.Repo, s s } // SecretList provides a mock function for the type MockStore -func (_mock *MockStore) SecretList(repo *model.Repo, b bool, listOptions *model.ListOptions) ([]*model.Secret, error) { - ret := _mock.Called(repo, b, listOptions) +func (_mock *MockStore) SecretList(repo *model.Repo, b bool, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error) { + ret := _mock.Called(repo, b, listOptionsWithAll) if len(ret) == 0 { panic("no return value specified for SecretList") @@ -5280,18 +5280,18 @@ func (_mock *MockStore) SecretList(repo *model.Repo, b bool, listOptions *model. var r0 []*model.Secret var r1 error - if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptions) ([]*model.Secret, error)); ok { - return returnFunc(repo, b, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptionsWithAll) ([]*model.Secret, error)); ok { + return returnFunc(repo, b, listOptionsWithAll) } - if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptions) []*model.Secret); ok { - r0 = returnFunc(repo, b, listOptions) + if returnFunc, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptionsWithAll) []*model.Secret); ok { + r0 = returnFunc(repo, b, listOptionsWithAll) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Secret) } } - if returnFunc, ok := ret.Get(1).(func(*model.Repo, bool, *model.ListOptions) error); ok { - r1 = returnFunc(repo, b, listOptions) + if returnFunc, ok := ret.Get(1).(func(*model.Repo, bool, *model.ListOptionsWithAll) error); ok { + r1 = returnFunc(repo, b, listOptionsWithAll) } else { r1 = ret.Error(1) } @@ -5306,12 +5306,12 @@ type MockStore_SecretList_Call struct { // SecretList is a helper method to define mock.On call // - repo *model.Repo // - b bool -// - listOptions *model.ListOptions -func (_e *MockStore_Expecter) SecretList(repo interface{}, b interface{}, listOptions interface{}) *MockStore_SecretList_Call { - return &MockStore_SecretList_Call{Call: _e.mock.On("SecretList", repo, b, listOptions)} +// - listOptionsWithAll *model.ListOptionsWithAll +func (_e *MockStore_Expecter) SecretList(repo any, b any, listOptionsWithAll any) *MockStore_SecretList_Call { + return &MockStore_SecretList_Call{Call: _e.mock.On("SecretList", repo, b, listOptionsWithAll)} } -func (_c *MockStore_SecretList_Call) Run(run func(repo *model.Repo, b bool, listOptions *model.ListOptions)) *MockStore_SecretList_Call { +func (_c *MockStore_SecretList_Call) Run(run func(repo *model.Repo, b bool, listOptionsWithAll *model.ListOptionsWithAll)) *MockStore_SecretList_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 *model.Repo if args[0] != nil { @@ -5321,9 +5321,9 @@ func (_c *MockStore_SecretList_Call) Run(run func(repo *model.Repo, b bool, list if args[1] != nil { arg1 = args[1].(bool) } - var arg2 *model.ListOptions + var arg2 *model.ListOptionsWithAll if args[2] != nil { - arg2 = args[2].(*model.ListOptions) + arg2 = args[2].(*model.ListOptionsWithAll) } run( arg0, @@ -5339,7 +5339,7 @@ func (_c *MockStore_SecretList_Call) Return(secrets []*model.Secret, err error) return _c } -func (_c *MockStore_SecretList_Call) RunAndReturn(run func(repo *model.Repo, b bool, listOptions *model.ListOptions) ([]*model.Secret, error)) *MockStore_SecretList_Call { +func (_c *MockStore_SecretList_Call) RunAndReturn(run func(repo *model.Repo, b bool, listOptionsWithAll *model.ListOptionsWithAll) ([]*model.Secret, error)) *MockStore_SecretList_Call { _c.Call.Return(run) return _c } @@ -5423,7 +5423,7 @@ type MockStore_SecretUpdate_Call struct { // SecretUpdate is a helper method to define mock.On call // - secret *model.Secret -func (_e *MockStore_Expecter) SecretUpdate(secret interface{}) *MockStore_SecretUpdate_Call { +func (_e *MockStore_Expecter) SecretUpdate(secret any) *MockStore_SecretUpdate_Call { return &MockStore_SecretUpdate_Call{Call: _e.mock.On("SecretUpdate", secret)} } @@ -5474,7 +5474,7 @@ type MockStore_ServerConfigDelete_Call struct { // ServerConfigDelete is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) ServerConfigDelete(s interface{}) *MockStore_ServerConfigDelete_Call { +func (_e *MockStore_Expecter) ServerConfigDelete(s any) *MockStore_ServerConfigDelete_Call { return &MockStore_ServerConfigDelete_Call{Call: _e.mock.On("ServerConfigDelete", s)} } @@ -5534,7 +5534,7 @@ type MockStore_ServerConfigGet_Call struct { // ServerConfigGet is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) ServerConfigGet(s interface{}) *MockStore_ServerConfigGet_Call { +func (_e *MockStore_Expecter) ServerConfigGet(s any) *MockStore_ServerConfigGet_Call { return &MockStore_ServerConfigGet_Call{Call: _e.mock.On("ServerConfigGet", s)} } @@ -5586,7 +5586,7 @@ type MockStore_ServerConfigSet_Call struct { // ServerConfigSet is a helper method to define mock.On call // - s string // - s1 string -func (_e *MockStore_Expecter) ServerConfigSet(s interface{}, s1 interface{}) *MockStore_ServerConfigSet_Call { +func (_e *MockStore_Expecter) ServerConfigSet(s any, s1 any) *MockStore_ServerConfigSet_Call { return &MockStore_ServerConfigSet_Call{Call: _e.mock.On("ServerConfigSet", s, s1)} } @@ -5653,7 +5653,7 @@ type MockStore_StepByUUID_Call struct { // StepByUUID is a helper method to define mock.On call // - uuid string -func (_e *MockStore_Expecter) StepByUUID(uuid interface{}) *MockStore_StepByUUID_Call { +func (_e *MockStore_Expecter) StepByUUID(uuid any) *MockStore_StepByUUID_Call { return &MockStore_StepByUUID_Call{Call: _e.mock.On("StepByUUID", uuid)} } @@ -5693,7 +5693,7 @@ type MockStore_StepFinished_Call struct { // StepFinished is a helper method to define mock.On call // - step *model.Step -func (_e *MockStore_Expecter) StepFinished(step interface{}) *MockStore_StepFinished_Call { +func (_e *MockStore_Expecter) StepFinished(step any) *MockStore_StepFinished_Call { return &MockStore_StepFinished_Call{Call: _e.mock.On("StepFinished", step)} } @@ -5755,7 +5755,7 @@ type MockStore_StepList_Call struct { // StepList is a helper method to define mock.On call // - pipelineID int64 -func (_e *MockStore_Expecter) StepList(pipelineID interface{}) *MockStore_StepList_Call { +func (_e *MockStore_Expecter) StepList(pipelineID any) *MockStore_StepList_Call { return &MockStore_StepList_Call{Call: _e.mock.On("StepList", pipelineID)} } @@ -5817,7 +5817,7 @@ type MockStore_StepListFromWorkflowFind_Call struct { // StepListFromWorkflowFind is a helper method to define mock.On call // - workflow *model.Workflow -func (_e *MockStore_Expecter) StepListFromWorkflowFind(workflow interface{}) *MockStore_StepListFromWorkflowFind_Call { +func (_e *MockStore_Expecter) StepListFromWorkflowFind(workflow any) *MockStore_StepListFromWorkflowFind_Call { return &MockStore_StepListFromWorkflowFind_Call{Call: _e.mock.On("StepListFromWorkflowFind", workflow)} } @@ -5880,7 +5880,7 @@ type MockStore_StepLoad_Call struct { // StepLoad is a helper method to define mock.On call // - pipelineID int64 // - stepID int64 -func (_e *MockStore_Expecter) StepLoad(pipelineID interface{}, stepID interface{}) *MockStore_StepLoad_Call { +func (_e *MockStore_Expecter) StepLoad(pipelineID any, stepID any) *MockStore_StepLoad_Call { return &MockStore_StepLoad_Call{Call: _e.mock.On("StepLoad", pipelineID, stepID)} } @@ -5936,7 +5936,7 @@ type MockStore_StepUpdate_Call struct { // StepUpdate is a helper method to define mock.On call // - step *model.Step -func (_e *MockStore_Expecter) StepUpdate(step interface{}) *MockStore_StepUpdate_Call { +func (_e *MockStore_Expecter) StepUpdate(step any) *MockStore_StepUpdate_Call { return &MockStore_StepUpdate_Call{Call: _e.mock.On("StepUpdate", step)} } @@ -5987,7 +5987,7 @@ type MockStore_TaskDelete_Call struct { // TaskDelete is a helper method to define mock.On call // - s string -func (_e *MockStore_Expecter) TaskDelete(s interface{}) *MockStore_TaskDelete_Call { +func (_e *MockStore_Expecter) TaskDelete(s any) *MockStore_TaskDelete_Call { return &MockStore_TaskDelete_Call{Call: _e.mock.On("TaskDelete", s)} } @@ -6038,7 +6038,7 @@ type MockStore_TaskInsert_Call struct { // TaskInsert is a helper method to define mock.On call // - task *model.Task -func (_e *MockStore_Expecter) TaskInsert(task interface{}) *MockStore_TaskInsert_Call { +func (_e *MockStore_Expecter) TaskInsert(task any) *MockStore_TaskInsert_Call { return &MockStore_TaskInsert_Call{Call: _e.mock.On("TaskInsert", task)} } @@ -6144,7 +6144,7 @@ type MockStore_UpdatePipeline_Call struct { // UpdatePipeline is a helper method to define mock.On call // - pipeline *model.Pipeline -func (_e *MockStore_Expecter) UpdatePipeline(pipeline interface{}) *MockStore_UpdatePipeline_Call { +func (_e *MockStore_Expecter) UpdatePipeline(pipeline any) *MockStore_UpdatePipeline_Call { return &MockStore_UpdatePipeline_Call{Call: _e.mock.On("UpdatePipeline", pipeline)} } @@ -6195,7 +6195,7 @@ type MockStore_UpdateRepo_Call struct { // UpdateRepo is a helper method to define mock.On call // - repo *model.Repo -func (_e *MockStore_Expecter) UpdateRepo(repo interface{}) *MockStore_UpdateRepo_Call { +func (_e *MockStore_Expecter) UpdateRepo(repo any) *MockStore_UpdateRepo_Call { return &MockStore_UpdateRepo_Call{Call: _e.mock.On("UpdateRepo", repo)} } @@ -6246,7 +6246,7 @@ type MockStore_UpdateUser_Call struct { // UpdateUser is a helper method to define mock.On call // - user *model.User -func (_e *MockStore_Expecter) UpdateUser(user interface{}) *MockStore_UpdateUser_Call { +func (_e *MockStore_Expecter) UpdateUser(user any) *MockStore_UpdateUser_Call { return &MockStore_UpdateUser_Call{Call: _e.mock.On("UpdateUser", user)} } @@ -6308,7 +6308,7 @@ type MockStore_UserFeed_Call struct { // UserFeed is a helper method to define mock.On call // - user *model.User -func (_e *MockStore_Expecter) UserFeed(user interface{}) *MockStore_UserFeed_Call { +func (_e *MockStore_Expecter) UserFeed(user any) *MockStore_UserFeed_Call { return &MockStore_UserFeed_Call{Call: _e.mock.On("UserFeed", user)} } @@ -6370,7 +6370,7 @@ type MockStore_WorkflowByStep_Call struct { // WorkflowByStep is a helper method to define mock.On call // - step *model.Step -func (_e *MockStore_Expecter) WorkflowByStep(step interface{}) *MockStore_WorkflowByStep_Call { +func (_e *MockStore_Expecter) WorkflowByStep(step any) *MockStore_WorkflowByStep_Call { return &MockStore_WorkflowByStep_Call{Call: _e.mock.On("WorkflowByStep", step)} } @@ -6432,7 +6432,7 @@ type MockStore_WorkflowGetTree_Call struct { // WorkflowGetTree is a helper method to define mock.On call // - pipeline *model.Pipeline -func (_e *MockStore_Expecter) WorkflowGetTree(pipeline interface{}) *MockStore_WorkflowGetTree_Call { +func (_e *MockStore_Expecter) WorkflowGetTree(pipeline any) *MockStore_WorkflowGetTree_Call { return &MockStore_WorkflowGetTree_Call{Call: _e.mock.On("WorkflowGetTree", pipeline)} } @@ -6494,7 +6494,7 @@ type MockStore_WorkflowLoad_Call struct { // WorkflowLoad is a helper method to define mock.On call // - n int64 -func (_e *MockStore_Expecter) WorkflowLoad(n interface{}) *MockStore_WorkflowLoad_Call { +func (_e *MockStore_Expecter) WorkflowLoad(n any) *MockStore_WorkflowLoad_Call { return &MockStore_WorkflowLoad_Call{Call: _e.mock.On("WorkflowLoad", n)} } @@ -6545,7 +6545,7 @@ type MockStore_WorkflowUpdate_Call struct { // WorkflowUpdate is a helper method to define mock.On call // - workflow *model.Workflow -func (_e *MockStore_Expecter) WorkflowUpdate(workflow interface{}) *MockStore_WorkflowUpdate_Call { +func (_e *MockStore_Expecter) WorkflowUpdate(workflow any) *MockStore_WorkflowUpdate_Call { return &MockStore_WorkflowUpdate_Call{Call: _e.mock.On("WorkflowUpdate", workflow)} } @@ -6596,7 +6596,7 @@ type MockStore_WorkflowsCreate_Call struct { // WorkflowsCreate is a helper method to define mock.On call // - workflows []*model.Workflow -func (_e *MockStore_Expecter) WorkflowsCreate(workflows interface{}) *MockStore_WorkflowsCreate_Call { +func (_e *MockStore_Expecter) WorkflowsCreate(workflows any) *MockStore_WorkflowsCreate_Call { return &MockStore_WorkflowsCreate_Call{Call: _e.mock.On("WorkflowsCreate", workflows)} } @@ -6648,7 +6648,7 @@ type MockStore_WorkflowsReplace_Call struct { // WorkflowsReplace is a helper method to define mock.On call // - pipeline *model.Pipeline // - workflows []*model.Workflow -func (_e *MockStore_Expecter) WorkflowsReplace(pipeline interface{}, workflows interface{}) *MockStore_WorkflowsReplace_Call { +func (_e *MockStore_Expecter) WorkflowsReplace(pipeline any, workflows any) *MockStore_WorkflowsReplace_Call { return &MockStore_WorkflowsReplace_Call{Call: _e.mock.On("WorkflowsReplace", pipeline, workflows)} } diff --git a/server/store/store.go b/server/store/store.go index 9cf93cc17..4160f20e7 100644 --- a/server/store/store.go +++ b/server/store/store.go @@ -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 diff --git a/woodpecker-go/woodpecker/mocks/mock_Client.go b/woodpecker-go/woodpecker/mocks/mock_Client.go index 60df56d73..20bfaba29 100644 --- a/woodpecker-go/woodpecker/mocks/mock_Client.go +++ b/woodpecker-go/woodpecker/mocks/mock_Client.go @@ -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)} }