feat: upgrade mockery version (#18332)

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
This commit is contained in:
Shengwen YU 2023-03-11 08:16:11 +08:00 committed by GitHub
parent ec7c99c270
commit 4efee54f07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
98 changed files with 1717 additions and 520 deletions

View File

@ -325,7 +325,7 @@ gen_apis: lint_apis
MOCKERY_IMAGENAME=$(IMAGENAMESPACE)/mockery MOCKERY_IMAGENAME=$(IMAGENAMESPACE)/mockery
MOCKERY_VERSION=v2.14.0 MOCKERY_VERSION=v2.22.1
MOCKERY=$(RUNCONTAINER) ${MOCKERY_IMAGENAME}:${MOCKERY_VERSION} MOCKERY=$(RUNCONTAINER) ${MOCKERY_IMAGENAME}:${MOCKERY_VERSION}
MOCKERY_IMAGE_BUILD_CMD=${DOCKERBUILD} -f ${TOOLSPATH}/mockery/Dockerfile --build-arg GOLANG=${GOBUILDIMAGE} --build-arg MOCKERY_VERSION=${MOCKERY_VERSION} -t ${MOCKERY_IMAGENAME}:$(MOCKERY_VERSION) . MOCKERY_IMAGE_BUILD_CMD=${DOCKERBUILD} -f ${TOOLSPATH}/mockery/Dockerfile --build-arg GOLANG=${GOBUILDIMAGE} --build-arg MOCKERY_VERSION=${MOCKERY_VERSION} -t ${MOCKERY_IMAGENAME}:$(MOCKERY_VERSION) .

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package flow package flow
@ -35,6 +35,10 @@ func (_m *mockFactory) Create(_a0 *model.Registry) (adapter.Adapter, error) {
ret := _m.Called(_a0) ret := _m.Called(_a0)
var r0 adapter.Adapter var r0 adapter.Adapter
var r1 error
if rf, ok := ret.Get(0).(func(*model.Registry) (adapter.Adapter, error)); ok {
return rf(_a0)
}
if rf, ok := ret.Get(0).(func(*model.Registry) adapter.Adapter); ok { if rf, ok := ret.Get(0).(func(*model.Registry) adapter.Adapter); ok {
r0 = rf(_a0) r0 = rf(_a0)
} else { } else {
@ -43,7 +47,6 @@ func (_m *mockFactory) Create(_a0 *model.Registry) (adapter.Adapter, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(*model.Registry) error); ok { if rf, ok := ret.Get(1).(func(*model.Registry) error); ok {
r1 = rf(_a0) r1 = rf(_a0)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package flow package flow
@ -22,13 +22,16 @@ func (_m *mockAdapter) BlobExist(repository string, digest string) (bool, error)
ret := _m.Called(repository, digest) ret := _m.Called(repository, digest)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
return rf(repository, digest)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok { if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(repository, digest) r0 = rf(repository, digest)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok { if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(repository, digest) r1 = rf(repository, digest)
} else { } else {
@ -43,20 +46,23 @@ func (_m *mockAdapter) CanBeMount(digest string) (bool, string, error) {
ret := _m.Called(digest) ret := _m.Called(digest)
var r0 bool var r0 bool
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string) (bool, string, error)); ok {
return rf(digest)
}
if rf, ok := ret.Get(0).(func(string) bool); ok { if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(digest) r0 = rf(digest)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 string
if rf, ok := ret.Get(1).(func(string) string); ok { if rf, ok := ret.Get(1).(func(string) string); ok {
r1 = rf(digest) r1 = rf(digest)
} else { } else {
r1 = ret.Get(1).(string) r1 = ret.Get(1).(string)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string) error); ok { if rf, ok := ret.Get(2).(func(string) error); ok {
r2 = rf(digest) r2 = rf(digest)
} else { } else {
@ -99,6 +105,10 @@ func (_m *mockAdapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resourc
ret := _m.Called(filters) ret := _m.Called(filters)
var r0 []*model.Resource var r0 []*model.Resource
var r1 error
if rf, ok := ret.Get(0).(func([]*model.Filter) ([]*model.Resource, error)); ok {
return rf(filters)
}
if rf, ok := ret.Get(0).(func([]*model.Filter) []*model.Resource); ok { if rf, ok := ret.Get(0).(func([]*model.Filter) []*model.Resource); ok {
r0 = rf(filters) r0 = rf(filters)
} else { } else {
@ -107,7 +117,6 @@ func (_m *mockAdapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resourc
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func([]*model.Filter) error); ok { if rf, ok := ret.Get(1).(func([]*model.Filter) error); ok {
r1 = rf(filters) r1 = rf(filters)
} else { } else {
@ -122,13 +131,16 @@ func (_m *mockAdapter) HealthCheck() (string, error) {
ret := _m.Called() ret := _m.Called()
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func() (string, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() string); ok { if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf() r0 = rf()
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -143,6 +155,10 @@ func (_m *mockAdapter) Info() (*model.RegistryInfo, error) {
ret := _m.Called() ret := _m.Called()
var r0 *model.RegistryInfo var r0 *model.RegistryInfo
var r1 error
if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok { if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -151,7 +167,6 @@ func (_m *mockAdapter) Info() (*model.RegistryInfo, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -166,6 +181,10 @@ func (_m *mockAdapter) ListTags(repository string) ([]string, error) {
ret := _m.Called(repository) ret := _m.Called(repository)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
return rf(repository)
}
if rf, ok := ret.Get(0).(func(string) []string); ok { if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(repository) r0 = rf(repository)
} else { } else {
@ -174,7 +193,6 @@ func (_m *mockAdapter) ListTags(repository string) ([]string, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repository) r1 = rf(repository)
} else { } else {
@ -189,13 +207,17 @@ func (_m *mockAdapter) ManifestExist(repository string, reference string) (bool,
ret := _m.Called(repository, reference) ret := _m.Called(repository, reference)
var r0 bool var r0 bool
var r1 *distribution.Descriptor
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (bool, *distribution.Descriptor, error)); ok {
return rf(repository, reference)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok { if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(repository, reference) r0 = rf(repository, reference)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 *distribution.Descriptor
if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok { if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok {
r1 = rf(repository, reference) r1 = rf(repository, reference)
} else { } else {
@ -204,7 +226,6 @@ func (_m *mockAdapter) ManifestExist(repository string, reference string) (bool,
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repository, reference) r2 = rf(repository, reference)
} else { } else {
@ -247,13 +268,17 @@ func (_m *mockAdapter) PullBlob(repository string, digest string) (int64, io.Rea
ret := _m.Called(repository, digest) ret := _m.Called(repository, digest)
var r0 int64 var r0 int64
var r1 io.ReadCloser
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (int64, io.ReadCloser, error)); ok {
return rf(repository, digest)
}
if rf, ok := ret.Get(0).(func(string, string) int64); ok { if rf, ok := ret.Get(0).(func(string, string) int64); ok {
r0 = rf(repository, digest) r0 = rf(repository, digest)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 io.ReadCloser
if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok { if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok {
r1 = rf(repository, digest) r1 = rf(repository, digest)
} else { } else {
@ -262,7 +287,6 @@ func (_m *mockAdapter) PullBlob(repository string, digest string) (int64, io.Rea
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repository, digest) r2 = rf(repository, digest)
} else { } else {
@ -277,13 +301,17 @@ func (_m *mockAdapter) PullBlobChunk(repository string, digest string, blobSize
ret := _m.Called(repository, digest, blobSize, start, end) ret := _m.Called(repository, digest, blobSize, start, end)
var r0 int64 var r0 int64
var r1 io.ReadCloser
var r2 error
if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) (int64, io.ReadCloser, error)); ok {
return rf(repository, digest, blobSize, start, end)
}
if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) int64); ok { if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) int64); ok {
r0 = rf(repository, digest, blobSize, start, end) r0 = rf(repository, digest, blobSize, start, end)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 io.ReadCloser
if rf, ok := ret.Get(1).(func(string, string, int64, int64, int64) io.ReadCloser); ok { if rf, ok := ret.Get(1).(func(string, string, int64, int64, int64) io.ReadCloser); ok {
r1 = rf(repository, digest, blobSize, start, end) r1 = rf(repository, digest, blobSize, start, end)
} else { } else {
@ -292,7 +320,6 @@ func (_m *mockAdapter) PullBlobChunk(repository string, digest string, blobSize
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string, int64, int64, int64) error); ok { if rf, ok := ret.Get(2).(func(string, string, int64, int64, int64) error); ok {
r2 = rf(repository, digest, blobSize, start, end) r2 = rf(repository, digest, blobSize, start, end)
} else { } else {
@ -314,6 +341,11 @@ func (_m *mockAdapter) PullManifest(repository string, reference string, acceptt
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 distribution.Manifest var r0 distribution.Manifest
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string, string, ...string) (distribution.Manifest, string, error)); ok {
return rf(repository, reference, accepttedMediaTypes...)
}
if rf, ok := ret.Get(0).(func(string, string, ...string) distribution.Manifest); ok { if rf, ok := ret.Get(0).(func(string, string, ...string) distribution.Manifest); ok {
r0 = rf(repository, reference, accepttedMediaTypes...) r0 = rf(repository, reference, accepttedMediaTypes...)
} else { } else {
@ -322,14 +354,12 @@ func (_m *mockAdapter) PullManifest(repository string, reference string, acceptt
} }
} }
var r1 string
if rf, ok := ret.Get(1).(func(string, string, ...string) string); ok { if rf, ok := ret.Get(1).(func(string, string, ...string) string); ok {
r1 = rf(repository, reference, accepttedMediaTypes...) r1 = rf(repository, reference, accepttedMediaTypes...)
} else { } else {
r1 = ret.Get(1).(string) r1 = ret.Get(1).(string)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string, ...string) error); ok { if rf, ok := ret.Get(2).(func(string, string, ...string) error); ok {
r2 = rf(repository, reference, accepttedMediaTypes...) r2 = rf(repository, reference, accepttedMediaTypes...)
} else { } else {
@ -358,20 +388,23 @@ func (_m *mockAdapter) PushBlobChunk(repository string, digest string, size int6
ret := _m.Called(repository, digest, size, chunk, start, end, location) ret := _m.Called(repository, digest, size, chunk, start, end, location)
var r0 string var r0 string
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) (string, int64, error)); ok {
return rf(repository, digest, size, chunk, start, end, location)
}
if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) string); ok { if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) string); ok {
r0 = rf(repository, digest, size, chunk, start, end, location) r0 = rf(repository, digest, size, chunk, start, end, location)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 int64
if rf, ok := ret.Get(1).(func(string, string, int64, io.Reader, int64, int64, string) int64); ok { if rf, ok := ret.Get(1).(func(string, string, int64, io.Reader, int64, int64, string) int64); ok {
r1 = rf(repository, digest, size, chunk, start, end, location) r1 = rf(repository, digest, size, chunk, start, end, location)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string, int64, io.Reader, int64, int64, string) error); ok { if rf, ok := ret.Get(2).(func(string, string, int64, io.Reader, int64, int64, string) error); ok {
r2 = rf(repository, digest, size, chunk, start, end, location) r2 = rf(repository, digest, size, chunk, start, end, location)
} else { } else {
@ -386,13 +419,16 @@ func (_m *mockAdapter) PushManifest(repository string, reference string, mediaTy
ret := _m.Called(repository, reference, mediaType, payload) ret := _m.Called(repository, reference, mediaType, payload)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string, []byte) (string, error)); ok {
return rf(repository, reference, mediaType, payload)
}
if rf, ok := ret.Get(0).(func(string, string, string, []byte) string); ok { if rf, ok := ret.Get(0).(func(string, string, string, []byte) string); ok {
r0 = rf(repository, reference, mediaType, payload) r0 = rf(repository, reference, mediaType, payload)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string, []byte) error); ok { if rf, ok := ret.Get(1).(func(string, string, string, []byte) error); ok {
r1 = rf(repository, reference, mediaType, payload) r1 = rf(repository, reference, mediaType, payload)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package replication package replication

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package mgt package mgt
@ -19,6 +19,10 @@ func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) {
ret := _m.Called(jobID) ret := _m.Called(jobID)
var r0 *job.Stats var r0 *job.Stats
var r1 error
if rf, ok := ret.Get(0).(func(string) (*job.Stats, error)); ok {
return rf(jobID)
}
if rf, ok := ret.Get(0).(func(string) *job.Stats); ok { if rf, ok := ret.Get(0).(func(string) *job.Stats); ok {
r0 = rf(jobID) r0 = rf(jobID)
} else { } else {
@ -27,7 +31,6 @@ func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(jobID) r1 = rf(jobID)
} else { } else {
@ -42,6 +45,11 @@ func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error)
ret := _m.Called(q) ret := _m.Called(q)
var r0 []*job.Stats var r0 []*job.Stats
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(*query.Parameter) ([]*job.Stats, int64, error)); ok {
return rf(q)
}
if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok { if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok {
r0 = rf(q) r0 = rf(q)
} else { } else {
@ -50,14 +58,12 @@ func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error)
} }
} }
var r1 int64
if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok { if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok {
r1 = rf(q) r1 = rf(q)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok { if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok {
r2 = rf(q) r2 = rf(q)
} else { } else {
@ -72,6 +78,11 @@ func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*
ret := _m.Called(pID, q) ret := _m.Called(pID, q)
var r0 []*job.Stats var r0 []*job.Stats
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(string, *query.Parameter) ([]*job.Stats, int64, error)); ok {
return rf(pID, q)
}
if rf, ok := ret.Get(0).(func(string, *query.Parameter) []*job.Stats); ok { if rf, ok := ret.Get(0).(func(string, *query.Parameter) []*job.Stats); ok {
r0 = rf(pID, q) r0 = rf(pID, q)
} else { } else {
@ -80,14 +91,12 @@ func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*
} }
} }
var r1 int64
if rf, ok := ret.Get(1).(func(string, *query.Parameter) int64); ok { if rf, ok := ret.Get(1).(func(string, *query.Parameter) int64); ok {
r1 = rf(pID, q) r1 = rf(pID, q)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, *query.Parameter) error); ok { if rf, ok := ret.Get(2).(func(string, *query.Parameter) error); ok {
r2 = rf(pID, q) r2 = rf(pID, q)
} else { } else {
@ -102,6 +111,11 @@ func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64
ret := _m.Called(q) ret := _m.Called(q)
var r0 []*job.Stats var r0 []*job.Stats
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(*query.Parameter) ([]*job.Stats, int64, error)); ok {
return rf(q)
}
if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok { if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok {
r0 = rf(q) r0 = rf(q)
} else { } else {
@ -110,14 +124,12 @@ func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64
} }
} }
var r1 int64
if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok { if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok {
r1 = rf(q) r1 = rf(q)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok { if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok {
r2 = rf(q) r2 = rf(q)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package period package period
@ -14,13 +14,16 @@ func (_m *MockScheduler) Schedule(policy *Policy) (int64, error) {
ret := _m.Called(policy) ret := _m.Called(policy)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(*Policy) (int64, error)); ok {
return rf(policy)
}
if rf, ok := ret.Get(0).(func(*Policy) int64); ok { if rf, ok := ret.Get(0).(func(*Policy) int64); ok {
r0 = rf(policy) r0 = rf(policy)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(*Policy) error); ok { if rf, ok := ret.Get(1).(func(*Policy) error); ok {
r1 = rf(policy) r1 = rf(policy)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scheduler package scheduler
@ -19,13 +19,16 @@ func (_m *mockDAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -40,13 +43,16 @@ func (_m *mockDAO) Create(ctx context.Context, s *schedule) (int64, error) {
ret := _m.Called(ctx, s) ret := _m.Called(ctx, s)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *schedule) (int64, error)); ok {
return rf(ctx, s)
}
if rf, ok := ret.Get(0).(func(context.Context, *schedule) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *schedule) int64); ok {
r0 = rf(ctx, s) r0 = rf(ctx, s)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *schedule) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *schedule) error); ok {
r1 = rf(ctx, s) r1 = rf(ctx, s)
} else { } else {
@ -75,6 +81,10 @@ func (_m *mockDAO) Get(ctx context.Context, id int64) (*schedule, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *schedule var r0 *schedule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*schedule, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *schedule); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *schedule); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -83,7 +93,6 @@ func (_m *mockDAO) Get(ctx context.Context, id int64) (*schedule, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -98,6 +107,10 @@ func (_m *mockDAO) List(ctx context.Context, query *q.Query) ([]*schedule, error
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*schedule var r0 []*schedule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*schedule, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*schedule); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*schedule); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -106,7 +119,6 @@ func (_m *mockDAO) List(ctx context.Context, query *q.Query) ([]*schedule, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -142,13 +154,16 @@ func (_m *mockDAO) UpdateRevision(ctx context.Context, id int64, revision int64)
ret := _m.Called(ctx, id, revision) ret := _m.Called(ctx, id, revision)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (int64, error)); ok {
return rf(ctx, id, revision)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, int64) int64); ok {
r0 = rf(ctx, id, revision) r0 = rf(ctx, id, revision)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok {
r1 = rf(ctx, id, revision) r1 = rf(ctx, id, revision)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -21,13 +21,16 @@ func (_m *mockExecutionDAO) Count(ctx context.Context, query *q.Query) (int64, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *mockExecutionDAO) Create(ctx context.Context, execution *dao.Execution
ret := _m.Called(ctx, execution) ret := _m.Called(ctx, execution)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution) (int64, error)); ok {
return rf(ctx, execution)
}
if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution) int64); ok {
r0 = rf(ctx, execution) r0 = rf(ctx, execution)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *dao.Execution) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *dao.Execution) error); ok {
r1 = rf(ctx, execution) r1 = rf(ctx, execution)
} else { } else {
@ -77,6 +83,10 @@ func (_m *mockExecutionDAO) Get(ctx context.Context, id int64) (*dao.Execution,
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *dao.Execution var r0 *dao.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Execution, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Execution); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -85,7 +95,6 @@ func (_m *mockExecutionDAO) Get(ctx context.Context, id int64) (*dao.Execution,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -100,6 +109,10 @@ func (_m *mockExecutionDAO) GetMetrics(ctx context.Context, id int64) (*dao.Metr
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *dao.Metrics var r0 *dao.Metrics
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Metrics, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Metrics); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Metrics); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -108,7 +121,6 @@ func (_m *mockExecutionDAO) GetMetrics(ctx context.Context, id int64) (*dao.Metr
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -123,6 +135,10 @@ func (_m *mockExecutionDAO) List(ctx context.Context, query *q.Query) ([]*dao.Ex
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*dao.Execution var r0 []*dao.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Execution, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Execution); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -131,7 +147,6 @@ func (_m *mockExecutionDAO) List(ctx context.Context, query *q.Query) ([]*dao.Ex
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -146,20 +161,23 @@ func (_m *mockExecutionDAO) RefreshStatus(ctx context.Context, id int64) (bool,
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 bool var r0 bool
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (bool, string, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) bool); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 string
if rf, ok := ret.Get(1).(func(context.Context, int64) string); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) string); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
r1 = ret.Get(1).(string) r1 = ret.Get(1).(string)
} }
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(2).(func(context.Context, int64) error); ok {
r2 = rf(ctx, id) r2 = rf(ctx, id)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -19,6 +19,10 @@ func (_m *mockJobserviceClient) GetExecutions(uuid string) ([]job.Stats, error)
ret := _m.Called(uuid) ret := _m.Called(uuid)
var r0 []job.Stats var r0 []job.Stats
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]job.Stats, error)); ok {
return rf(uuid)
}
if rf, ok := ret.Get(0).(func(string) []job.Stats); ok { if rf, ok := ret.Get(0).(func(string) []job.Stats); ok {
r0 = rf(uuid) r0 = rf(uuid)
} else { } else {
@ -27,7 +31,6 @@ func (_m *mockJobserviceClient) GetExecutions(uuid string) ([]job.Stats, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(uuid) r1 = rf(uuid)
} else { } else {
@ -42,6 +45,10 @@ func (_m *mockJobserviceClient) GetJobLog(uuid string) ([]byte, error) {
ret := _m.Called(uuid) ret := _m.Called(uuid)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
return rf(uuid)
}
if rf, ok := ret.Get(0).(func(string) []byte); ok { if rf, ok := ret.Get(0).(func(string) []byte); ok {
r0 = rf(uuid) r0 = rf(uuid)
} else { } else {
@ -50,7 +57,6 @@ func (_m *mockJobserviceClient) GetJobLog(uuid string) ([]byte, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(uuid) r1 = rf(uuid)
} else { } else {
@ -65,6 +71,10 @@ func (_m *mockJobserviceClient) GetJobServiceConfig() (*job.Config, error) {
ret := _m.Called() ret := _m.Called()
var r0 *job.Config var r0 *job.Config
var r1 error
if rf, ok := ret.Get(0).(func() (*job.Config, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *job.Config); ok { if rf, ok := ret.Get(0).(func() *job.Config); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -73,7 +83,6 @@ func (_m *mockJobserviceClient) GetJobServiceConfig() (*job.Config, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -102,13 +111,16 @@ func (_m *mockJobserviceClient) SubmitJob(_a0 *models.JobData) (string, error) {
ret := _m.Called(_a0) ret := _m.Called(_a0)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(*models.JobData) (string, error)); ok {
return rf(_a0)
}
if rf, ok := ret.Get(0).(func(*models.JobData) string); ok { if rf, ok := ret.Get(0).(func(*models.JobData) string); ok {
r0 = rf(_a0) r0 = rf(_a0)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(*models.JobData) error); ok { if rf, ok := ret.Get(1).(func(*models.JobData) error); ok {
r1 = rf(_a0) r1 = rf(_a0)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -23,13 +23,16 @@ func (_m *mockTaskDAO) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -44,13 +47,16 @@ func (_m *mockTaskDAO) Create(ctx context.Context, _a1 *dao.Task) (int64, error)
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *dao.Task) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *dao.Task) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *dao.Task) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *dao.Task) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *dao.Task) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -79,6 +85,10 @@ func (_m *mockTaskDAO) ExecutionIDsByVendorAndStatus(ctx context.Context, vendor
ret := _m.Called(ctx, vendorType, status) ret := _m.Called(ctx, vendorType, status)
var r0 []int64 var r0 []int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok {
return rf(ctx, vendorType, status)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok {
r0 = rf(ctx, vendorType, status) r0 = rf(ctx, vendorType, status)
} else { } else {
@ -87,7 +97,6 @@ func (_m *mockTaskDAO) ExecutionIDsByVendorAndStatus(ctx context.Context, vendor
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, vendorType, status) r1 = rf(ctx, vendorType, status)
} else { } else {
@ -102,6 +111,10 @@ func (_m *mockTaskDAO) Get(ctx context.Context, id int64) (*dao.Task, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *dao.Task var r0 *dao.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Task, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Task); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -110,7 +123,6 @@ func (_m *mockTaskDAO) Get(ctx context.Context, id int64) (*dao.Task, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -125,13 +137,16 @@ func (_m *mockTaskDAO) GetMaxEndTime(ctx context.Context, executionID int64) (ti
ret := _m.Called(ctx, executionID) ret := _m.Called(ctx, executionID)
var r0 time.Time var r0 time.Time
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (time.Time, error)); ok {
return rf(ctx, executionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) time.Time); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) time.Time); ok {
r0 = rf(ctx, executionID) r0 = rf(ctx, executionID)
} else { } else {
r0 = ret.Get(0).(time.Time) r0 = ret.Get(0).(time.Time)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, executionID) r1 = rf(ctx, executionID)
} else { } else {
@ -146,6 +161,10 @@ func (_m *mockTaskDAO) List(ctx context.Context, query *q.Query) ([]*dao.Task, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*dao.Task var r0 []*dao.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Task, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Task); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -154,7 +173,6 @@ func (_m *mockTaskDAO) List(ctx context.Context, query *q.Query) ([]*dao.Task, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -169,6 +187,10 @@ func (_m *mockTaskDAO) ListStatusCount(ctx context.Context, executionID int64) (
ret := _m.Called(ctx, executionID) ret := _m.Called(ctx, executionID)
var r0 []*dao.StatusCount var r0 []*dao.StatusCount
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*dao.StatusCount, error)); ok {
return rf(ctx, executionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []*dao.StatusCount); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []*dao.StatusCount); ok {
r0 = rf(ctx, executionID) r0 = rf(ctx, executionID)
} else { } else {
@ -177,7 +199,6 @@ func (_m *mockTaskDAO) ListStatusCount(ctx context.Context, executionID int64) (
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, executionID) r1 = rf(ctx, executionID)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -19,13 +19,16 @@ func (_m *mockTaskManager) Count(ctx context.Context, query *q.Query) (int64, er
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -47,13 +50,16 @@ func (_m *mockTaskManager) Create(ctx context.Context, executionID int64, job *J
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *Job, ...map[string]interface{}) (int64, error)); ok {
return rf(ctx, executionID, job, extraAttrs...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *Job, ...map[string]interface{}) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *Job, ...map[string]interface{}) int64); ok {
r0 = rf(ctx, executionID, job, extraAttrs...) r0 = rf(ctx, executionID, job, extraAttrs...)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *Job, ...map[string]interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *Job, ...map[string]interface{}) error); ok {
r1 = rf(ctx, executionID, job, extraAttrs...) r1 = rf(ctx, executionID, job, extraAttrs...)
} else { } else {
@ -68,6 +74,10 @@ func (_m *mockTaskManager) ExecutionIDsByVendorAndStatus(ctx context.Context, ve
ret := _m.Called(ctx, vendorType, status) ret := _m.Called(ctx, vendorType, status)
var r0 []int64 var r0 []int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok {
return rf(ctx, vendorType, status)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok {
r0 = rf(ctx, vendorType, status) r0 = rf(ctx, vendorType, status)
} else { } else {
@ -76,7 +86,6 @@ func (_m *mockTaskManager) ExecutionIDsByVendorAndStatus(ctx context.Context, ve
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, vendorType, status) r1 = rf(ctx, vendorType, status)
} else { } else {
@ -91,6 +100,10 @@ func (_m *mockTaskManager) Get(ctx context.Context, id int64) (*Task, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *Task var r0 *Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*Task, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *Task); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -99,7 +112,6 @@ func (_m *mockTaskManager) Get(ctx context.Context, id int64) (*Task, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -114,6 +126,10 @@ func (_m *mockTaskManager) GetLog(ctx context.Context, id int64) ([]byte, error)
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -122,7 +138,6 @@ func (_m *mockTaskManager) GetLog(ctx context.Context, id int64) ([]byte, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -137,6 +152,10 @@ func (_m *mockTaskManager) GetLogByJobID(ctx context.Context, jobID string) ([]b
ret := _m.Called(ctx, jobID) ret := _m.Called(ctx, jobID)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
return rf(ctx, jobID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
r0 = rf(ctx, jobID) r0 = rf(ctx, jobID)
} else { } else {
@ -145,7 +164,6 @@ func (_m *mockTaskManager) GetLogByJobID(ctx context.Context, jobID string) ([]b
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, jobID) r1 = rf(ctx, jobID)
} else { } else {
@ -160,6 +178,10 @@ func (_m *mockTaskManager) List(ctx context.Context, query *q.Query) ([]*Task, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*Task var r0 []*Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*Task, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*Task); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*Task); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -168,7 +190,6 @@ func (_m *mockTaskManager) List(ctx context.Context, query *q.Query) ([]*Task, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package security package security

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package artifact package artifact
@ -40,13 +40,16 @@ func (_m *Controller) Copy(ctx context.Context, srcRepo string, reference string
ret := _m.Called(ctx, srcRepo, reference, dstRepo) ret := _m.Called(ctx, srcRepo, reference, dstRepo)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (int64, error)); ok {
return rf(ctx, srcRepo, reference, dstRepo)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, string) int64); ok {
r0 = rf(ctx, srcRepo, reference, dstRepo) r0 = rf(ctx, srcRepo, reference, dstRepo)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
r1 = rf(ctx, srcRepo, reference, dstRepo) r1 = rf(ctx, srcRepo, reference, dstRepo)
} else { } else {
@ -61,13 +64,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -96,20 +102,23 @@ func (_m *Controller) Ensure(ctx context.Context, repository string, digest stri
ret := _m.Called(ctx, repository, digest, option) ret := _m.Called(ctx, repository, digest, option)
var r0 bool var r0 bool
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.ArtOption) (bool, int64, error)); ok {
return rf(ctx, repository, digest, option)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.ArtOption) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.ArtOption) bool); ok {
r0 = rf(ctx, repository, digest, option) r0 = rf(ctx, repository, digest, option)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 int64
if rf, ok := ret.Get(1).(func(context.Context, string, string, *artifact.ArtOption) int64); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, *artifact.ArtOption) int64); ok {
r1 = rf(ctx, repository, digest, option) r1 = rf(ctx, repository, digest, option)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, string, string, *artifact.ArtOption) error); ok { if rf, ok := ret.Get(2).(func(context.Context, string, string, *artifact.ArtOption) error); ok {
r2 = rf(ctx, repository, digest, option) r2 = rf(ctx, repository, digest, option)
} else { } else {
@ -124,6 +133,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *artifact.Option
ret := _m.Called(ctx, id, option) ret := _m.Called(ctx, id, option)
var r0 *artifact.Artifact var r0 *artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *artifact.Option) (*artifact.Artifact, error)); ok {
return rf(ctx, id, option)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *artifact.Option) *artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *artifact.Option) *artifact.Artifact); ok {
r0 = rf(ctx, id, option) r0 = rf(ctx, id, option)
} else { } else {
@ -132,7 +145,6 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *artifact.Option
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *artifact.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *artifact.Option) error); ok {
r1 = rf(ctx, id, option) r1 = rf(ctx, id, option)
} else { } else {
@ -147,6 +159,10 @@ func (_m *Controller) GetAddition(ctx context.Context, artifactID int64, additio
ret := _m.Called(ctx, artifactID, additionType) ret := _m.Called(ctx, artifactID, additionType)
var r0 *processor.Addition var r0 *processor.Addition
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*processor.Addition, error)); ok {
return rf(ctx, artifactID, additionType)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string) *processor.Addition); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, string) *processor.Addition); ok {
r0 = rf(ctx, artifactID, additionType) r0 = rf(ctx, artifactID, additionType)
} else { } else {
@ -155,7 +171,6 @@ func (_m *Controller) GetAddition(ctx context.Context, artifactID int64, additio
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
r1 = rf(ctx, artifactID, additionType) r1 = rf(ctx, artifactID, additionType)
} else { } else {
@ -170,6 +185,10 @@ func (_m *Controller) GetByReference(ctx context.Context, repository string, ref
ret := _m.Called(ctx, repository, reference, option) ret := _m.Called(ctx, repository, reference, option)
var r0 *artifact.Artifact var r0 *artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.Option) (*artifact.Artifact, error)); ok {
return rf(ctx, repository, reference, option)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.Option) *artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.Option) *artifact.Artifact); ok {
r0 = rf(ctx, repository, reference, option) r0 = rf(ctx, repository, reference, option)
} else { } else {
@ -178,7 +197,6 @@ func (_m *Controller) GetByReference(ctx context.Context, repository string, ref
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, *artifact.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, *artifact.Option) error); ok {
r1 = rf(ctx, repository, reference, option) r1 = rf(ctx, repository, reference, option)
} else { } else {
@ -193,6 +211,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *artifact
ret := _m.Called(ctx, query, option) ret := _m.Called(ctx, query, option)
var r0 []*artifact.Artifact var r0 []*artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *artifact.Option) ([]*artifact.Artifact, error)); ok {
return rf(ctx, query, option)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *artifact.Option) []*artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *artifact.Option) []*artifact.Artifact); ok {
r0 = rf(ctx, query, option) r0 = rf(ctx, query, option)
} else { } else {
@ -201,7 +223,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *artifact
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, *artifact.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, *artifact.Option) error); ok {
r1 = rf(ctx, query, option) r1 = rf(ctx, query, option)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package blob package blob
@ -68,13 +68,16 @@ func (_m *Controller) CalculateTotalSize(ctx context.Context, excludeForeign boo
ret := _m.Called(ctx, excludeForeign) ret := _m.Called(ctx, excludeForeign)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bool) (int64, error)); ok {
return rf(ctx, excludeForeign)
}
if rf, ok := ret.Get(0).(func(context.Context, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, bool) int64); ok {
r0 = rf(ctx, excludeForeign) r0 = rf(ctx, excludeForeign)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok {
r1 = rf(ctx, excludeForeign) r1 = rf(ctx, excludeForeign)
} else { } else {
@ -89,13 +92,16 @@ func (_m *Controller) CalculateTotalSizeByProject(ctx context.Context, projectID
ret := _m.Called(ctx, projectID, excludeForeign) ret := _m.Called(ctx, projectID, excludeForeign)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) (int64, error)); ok {
return rf(ctx, projectID, excludeForeign)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, bool) int64); ok {
r0 = rf(ctx, projectID, excludeForeign) r0 = rf(ctx, projectID, excludeForeign)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, bool) error); ok {
r1 = rf(ctx, projectID, excludeForeign) r1 = rf(ctx, projectID, excludeForeign)
} else { } else {
@ -124,13 +130,16 @@ func (_m *Controller) Ensure(ctx context.Context, digest string, contentType str
ret := _m.Called(ctx, digest, contentType, size) ret := _m.Called(ctx, digest, contentType, size)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (int64, error)); ok {
return rf(ctx, digest, contentType, size)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) int64); ok {
r0 = rf(ctx, digest, contentType, size) r0 = rf(ctx, digest, contentType, size)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok {
r1 = rf(ctx, digest, contentType, size) r1 = rf(ctx, digest, contentType, size)
} else { } else {
@ -152,13 +161,16 @@ func (_m *Controller) Exist(ctx context.Context, digest string, options ...blob.
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) (bool, error)); ok {
return rf(ctx, digest, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) bool); ok {
r0 = rf(ctx, digest, options...) r0 = rf(ctx, digest, options...)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, ...blob.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, ...blob.Option) error); ok {
r1 = rf(ctx, digest, options...) r1 = rf(ctx, digest, options...)
} else { } else {
@ -187,6 +199,10 @@ func (_m *Controller) FindMissingAssociationsForProject(ctx context.Context, pro
ret := _m.Called(ctx, projectID, blobs) ret := _m.Called(ctx, projectID, blobs)
var r0 []*models.Blob var r0 []*models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) ([]*models.Blob, error)); ok {
return rf(ctx, projectID, blobs)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) []*models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) []*models.Blob); ok {
r0 = rf(ctx, projectID, blobs) r0 = rf(ctx, projectID, blobs)
} else { } else {
@ -195,7 +211,6 @@ func (_m *Controller) FindMissingAssociationsForProject(ctx context.Context, pro
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, []*models.Blob) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, []*models.Blob) error); ok {
r1 = rf(ctx, projectID, blobs) r1 = rf(ctx, projectID, blobs)
} else { } else {
@ -217,6 +232,10 @@ func (_m *Controller) Get(ctx context.Context, digest string, options ...blob.Op
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 *models.Blob var r0 *models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) (*models.Blob, error)); ok {
return rf(ctx, digest, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) *models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) *models.Blob); ok {
r0 = rf(ctx, digest, options...) r0 = rf(ctx, digest, options...)
} else { } else {
@ -225,7 +244,6 @@ func (_m *Controller) Get(ctx context.Context, digest string, options ...blob.Op
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, ...blob.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, ...blob.Option) error); ok {
r1 = rf(ctx, digest, options...) r1 = rf(ctx, digest, options...)
} else { } else {
@ -240,13 +258,16 @@ func (_m *Controller) GetAcceptedBlobSize(ctx context.Context, sessionID string)
ret := _m.Called(ctx, sessionID) ret := _m.Called(ctx, sessionID)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
return rf(ctx, sessionID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok {
r0 = rf(ctx, sessionID) r0 = rf(ctx, sessionID)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, sessionID) r1 = rf(ctx, sessionID)
} else { } else {
@ -261,6 +282,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.Blob,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*models.Blob var r0 []*models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Blob, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Blob); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -269,7 +294,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.Blob,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package config package config
@ -19,6 +19,10 @@ func (_m *Controller) AllConfigs(ctx context.Context) (map[string]interface{}, e
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 map[string]interface{} var r0 map[string]interface{}
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (map[string]interface{}, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) map[string]interface{}); ok { if rf, ok := ret.Get(0).(func(context.Context) map[string]interface{}); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -27,7 +31,6 @@ func (_m *Controller) AllConfigs(ctx context.Context) (map[string]interface{}, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -42,6 +45,10 @@ func (_m *Controller) ConvertForGet(ctx context.Context, cfg map[string]interfac
ret := _m.Called(ctx, cfg, internal) ret := _m.Called(ctx, cfg, internal)
var r0 map[string]*models.Value var r0 map[string]*models.Value
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}, bool) (map[string]*models.Value, error)); ok {
return rf(ctx, cfg, internal)
}
if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}, bool) map[string]*models.Value); ok { if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}, bool) map[string]*models.Value); ok {
r0 = rf(ctx, cfg, internal) r0 = rf(ctx, cfg, internal)
} else { } else {
@ -50,7 +57,6 @@ func (_m *Controller) ConvertForGet(ctx context.Context, cfg map[string]interfac
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, map[string]interface{}, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, map[string]interface{}, bool) error); ok {
r1 = rf(ctx, cfg, internal) r1 = rf(ctx, cfg, internal)
} else { } else {
@ -93,6 +99,10 @@ func (_m *Controller) UserConfigs(ctx context.Context) (map[string]*models.Value
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 map[string]*models.Value var r0 map[string]*models.Value
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (map[string]*models.Value, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) map[string]*models.Value); ok { if rf, ok := ret.Get(0).(func(context.Context) map[string]*models.Value); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -101,7 +111,6 @@ func (_m *Controller) UserConfigs(ctx context.Context) (map[string]*models.Value
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package jobservice package jobservice
@ -22,13 +22,16 @@ func (_m *SchedulerController) Count(ctx context.Context, query *q.Query) (int64
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *SchedulerController) Create(ctx context.Context, vendorType string, cr
ret := _m.Called(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) ret := _m.Called(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) (int64, error)); ok {
return rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) int64); ok {
r0 = rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) r0 = rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) error); ok {
r1 = rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) r1 = rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam)
} else { } else {
@ -78,6 +84,10 @@ func (_m *SchedulerController) Get(ctx context.Context, vendorType string) (*sch
ret := _m.Called(ctx, vendorType) ret := _m.Called(ctx, vendorType)
var r0 *scheduler.Schedule var r0 *scheduler.Schedule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*scheduler.Schedule, error)); ok {
return rf(ctx, vendorType)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *scheduler.Schedule); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *scheduler.Schedule); ok {
r0 = rf(ctx, vendorType) r0 = rf(ctx, vendorType)
} else { } else {
@ -86,7 +96,6 @@ func (_m *SchedulerController) Get(ctx context.Context, vendorType string) (*sch
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, vendorType) r1 = rf(ctx, vendorType)
} else { } else {
@ -101,6 +110,10 @@ func (_m *SchedulerController) List(ctx context.Context, query *q.Query) ([]*sch
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*scheduler.Schedule var r0 []*scheduler.Schedule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scheduler.Schedule, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scheduler.Schedule); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scheduler.Schedule); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -109,7 +122,6 @@ func (_m *SchedulerController) List(ctx context.Context, query *q.Query) ([]*sch
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -124,13 +136,16 @@ func (_m *SchedulerController) Paused(ctx context.Context) (bool, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) bool); ok { if rf, ok := ret.Get(0).(func(context.Context) bool); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package project package project
@ -26,13 +26,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -47,13 +50,16 @@ func (_m *Controller) Create(ctx context.Context, _a1 *models.Project) (int64, e
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.Project) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.Project) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.Project) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -82,13 +88,16 @@ func (_m *Controller) Exists(ctx context.Context, projectIDOrName interface{}) (
ret := _m.Called(ctx, projectIDOrName) ret := _m.Called(ctx, projectIDOrName)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, interface{}) (bool, error)); ok {
return rf(ctx, projectIDOrName)
}
if rf, ok := ret.Get(0).(func(context.Context, interface{}) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, interface{}) bool); ok {
r0 = rf(ctx, projectIDOrName) r0 = rf(ctx, projectIDOrName)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok {
r1 = rf(ctx, projectIDOrName) r1 = rf(ctx, projectIDOrName)
} else { } else {
@ -110,6 +119,10 @@ func (_m *Controller) Get(ctx context.Context, projectIDOrName interface{}, opti
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 *models.Project var r0 *models.Project
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...project.Option) (*models.Project, error)); ok {
return rf(ctx, projectIDOrName, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...project.Option) *models.Project); ok { if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...project.Option) *models.Project); ok {
r0 = rf(ctx, projectIDOrName, options...) r0 = rf(ctx, projectIDOrName, options...)
} else { } else {
@ -118,7 +131,6 @@ func (_m *Controller) Get(ctx context.Context, projectIDOrName interface{}, opti
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, interface{}, ...project.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, interface{}, ...project.Option) error); ok {
r1 = rf(ctx, projectIDOrName, options...) r1 = rf(ctx, projectIDOrName, options...)
} else { } else {
@ -140,6 +152,10 @@ func (_m *Controller) GetByName(ctx context.Context, projectName string, options
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 *models.Project var r0 *models.Project
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, ...project.Option) (*models.Project, error)); ok {
return rf(ctx, projectName, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, ...project.Option) *models.Project); ok { if rf, ok := ret.Get(0).(func(context.Context, string, ...project.Option) *models.Project); ok {
r0 = rf(ctx, projectName, options...) r0 = rf(ctx, projectName, options...)
} else { } else {
@ -148,7 +164,6 @@ func (_m *Controller) GetByName(ctx context.Context, projectName string, options
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, ...project.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, ...project.Option) error); ok {
r1 = rf(ctx, projectName, options...) r1 = rf(ctx, projectName, options...)
} else { } else {
@ -170,6 +185,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...proje
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 []*models.Project var r0 []*models.Project
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...project.Option) ([]*models.Project, error)); ok {
return rf(ctx, query, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...project.Option) []*models.Project); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...project.Option) []*models.Project); ok {
r0 = rf(ctx, query, options...) r0 = rf(ctx, query, options...)
} else { } else {
@ -178,7 +197,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...proje
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...project.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...project.Option) error); ok {
r1 = rf(ctx, query, options...) r1 = rf(ctx, query, options...)
} else { } else {
@ -193,6 +211,10 @@ func (_m *Controller) ListRoles(ctx context.Context, projectID int64, u *commonm
ret := _m.Called(ctx, projectID, u) ret := _m.Called(ctx, projectID, u)
var r0 []int var r0 []int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *commonmodels.User) ([]int, error)); ok {
return rf(ctx, projectID, u)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *commonmodels.User) []int); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *commonmodels.User) []int); ok {
r0 = rf(ctx, projectID, u) r0 = rf(ctx, projectID, u)
} else { } else {
@ -201,7 +223,6 @@ func (_m *Controller) ListRoles(ctx context.Context, projectID int64, u *commonm
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *commonmodels.User) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *commonmodels.User) error); ok {
r1 = rf(ctx, projectID, u) r1 = rf(ctx, projectID, u)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package proxy package proxy
@ -20,13 +20,17 @@ func (_m *RemoteInterface) BlobReader(repo string, dig string) (int64, io.ReadCl
ret := _m.Called(repo, dig) ret := _m.Called(repo, dig)
var r0 int64 var r0 int64
var r1 io.ReadCloser
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (int64, io.ReadCloser, error)); ok {
return rf(repo, dig)
}
if rf, ok := ret.Get(0).(func(string, string) int64); ok { if rf, ok := ret.Get(0).(func(string, string) int64); ok {
r0 = rf(repo, dig) r0 = rf(repo, dig)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 io.ReadCloser
if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok { if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok {
r1 = rf(repo, dig) r1 = rf(repo, dig)
} else { } else {
@ -35,7 +39,6 @@ func (_m *RemoteInterface) BlobReader(repo string, dig string) (int64, io.ReadCl
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repo, dig) r2 = rf(repo, dig)
} else { } else {
@ -50,6 +53,10 @@ func (_m *RemoteInterface) ListTags(repo string) ([]string, error) {
ret := _m.Called(repo) ret := _m.Called(repo)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
return rf(repo)
}
if rf, ok := ret.Get(0).(func(string) []string); ok { if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(repo) r0 = rf(repo)
} else { } else {
@ -58,7 +65,6 @@ func (_m *RemoteInterface) ListTags(repo string) ([]string, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repo) r1 = rf(repo)
} else { } else {
@ -73,6 +79,11 @@ func (_m *RemoteInterface) Manifest(repo string, ref string) (distribution.Manif
ret := _m.Called(repo, ref) ret := _m.Called(repo, ref)
var r0 distribution.Manifest var r0 distribution.Manifest
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (distribution.Manifest, string, error)); ok {
return rf(repo, ref)
}
if rf, ok := ret.Get(0).(func(string, string) distribution.Manifest); ok { if rf, ok := ret.Get(0).(func(string, string) distribution.Manifest); ok {
r0 = rf(repo, ref) r0 = rf(repo, ref)
} else { } else {
@ -81,14 +92,12 @@ func (_m *RemoteInterface) Manifest(repo string, ref string) (distribution.Manif
} }
} }
var r1 string
if rf, ok := ret.Get(1).(func(string, string) string); ok { if rf, ok := ret.Get(1).(func(string, string) string); ok {
r1 = rf(repo, ref) r1 = rf(repo, ref)
} else { } else {
r1 = ret.Get(1).(string) r1 = ret.Get(1).(string)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repo, ref) r2 = rf(repo, ref)
} else { } else {
@ -103,13 +112,17 @@ func (_m *RemoteInterface) ManifestExist(repo string, ref string) (bool, *distri
ret := _m.Called(repo, ref) ret := _m.Called(repo, ref)
var r0 bool var r0 bool
var r1 *distribution.Descriptor
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (bool, *distribution.Descriptor, error)); ok {
return rf(repo, ref)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok { if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(repo, ref) r0 = rf(repo, ref)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 *distribution.Descriptor
if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok { if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok {
r1 = rf(repo, ref) r1 = rf(repo, ref)
} else { } else {
@ -118,7 +131,6 @@ func (_m *RemoteInterface) ManifestExist(repo string, ref string) (bool, *distri
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repo, ref) r2 = rf(repo, ref)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package purge package purge
@ -19,13 +19,16 @@ func (_m *Controller) Start(ctx context.Context, policy purge.JobPolicy, trigger
ret := _m.Called(ctx, policy, trigger) ret := _m.Called(ctx, policy, trigger)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, purge.JobPolicy, string) (int64, error)); ok {
return rf(ctx, policy, trigger)
}
if rf, ok := ret.Get(0).(func(context.Context, purge.JobPolicy, string) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, purge.JobPolicy, string) int64); ok {
r0 = rf(ctx, policy, trigger) r0 = rf(ctx, policy, trigger)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, purge.JobPolicy, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, purge.JobPolicy, string) error); ok {
r1 = rf(ctx, policy, trigger) r1 = rf(ctx, policy, trigger)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package quota package quota
@ -25,13 +25,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -53,13 +56,16 @@ func (_m *Controller) Create(ctx context.Context, reference string, referenceID
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) (int64, error)); ok {
return rf(ctx, reference, referenceID, hardLimits, used...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) int64); ok {
r0 = rf(ctx, reference, referenceID, hardLimits, used...) r0 = rf(ctx, reference, referenceID, hardLimits, used...)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) error); ok {
r1 = rf(ctx, reference, referenceID, hardLimits, used...) r1 = rf(ctx, reference, referenceID, hardLimits, used...)
} else { } else {
@ -95,6 +101,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, options ...quota.Option
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 *models.Quota var r0 *models.Quota
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, ...quota.Option) (*models.Quota, error)); ok {
return rf(ctx, id, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, ...quota.Option) *models.Quota); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, ...quota.Option) *models.Quota); ok {
r0 = rf(ctx, id, options...) r0 = rf(ctx, id, options...)
} else { } else {
@ -103,7 +113,6 @@ func (_m *Controller) Get(ctx context.Context, id int64, options ...quota.Option
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, ...quota.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, ...quota.Option) error); ok {
r1 = rf(ctx, id, options...) r1 = rf(ctx, id, options...)
} else { } else {
@ -125,6 +134,10 @@ func (_m *Controller) GetByRef(ctx context.Context, reference string, referenceI
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 *models.Quota var r0 *models.Quota
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) (*models.Quota, error)); ok {
return rf(ctx, reference, referenceID, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) *models.Quota); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) *models.Quota); ok {
r0 = rf(ctx, reference, referenceID, options...) r0 = rf(ctx, reference, referenceID, options...)
} else { } else {
@ -133,7 +146,6 @@ func (_m *Controller) GetByRef(ctx context.Context, reference string, referenceI
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, ...quota.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, ...quota.Option) error); ok {
r1 = rf(ctx, reference, referenceID, options...) r1 = rf(ctx, reference, referenceID, options...)
} else { } else {
@ -148,13 +160,16 @@ func (_m *Controller) IsEnabled(ctx context.Context, reference string, reference
ret := _m.Called(ctx, reference, referenceID) ret := _m.Called(ctx, reference, referenceID)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
return rf(ctx, reference, referenceID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
r0 = rf(ctx, reference, referenceID) r0 = rf(ctx, reference, referenceID)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, reference, referenceID) r1 = rf(ctx, reference, referenceID)
} else { } else {
@ -176,6 +191,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...quota
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 []*models.Quota var r0 []*models.Quota
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...quota.Option) ([]*models.Quota, error)); ok {
return rf(ctx, query, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...quota.Option) []*models.Quota); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...quota.Option) []*models.Quota); ok {
r0 = rf(ctx, query, options...) r0 = rf(ctx, query, options...)
} else { } else {
@ -184,7 +203,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...quota
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...quota.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...quota.Option) error); ok {
r1 = rf(ctx, query, options...) r1 = rf(ctx, query, options...)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package replication package replication
@ -25,13 +25,16 @@ func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (i
ret := _m.Called(ctx, policy) ret := _m.Called(ctx, policy)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
return rf(ctx, policy)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok {
r0 = rf(ctx, policy) r0 = rf(ctx, policy)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok {
r1 = rf(ctx, policy) r1 = rf(ctx, policy)
} else { } else {
@ -60,13 +63,16 @@ func (_m *Controller) ExecutionCount(ctx context.Context, query *q.Query) (int64
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -81,6 +87,10 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*rep
ret := _m.Called(ctx, executionID) ret := _m.Called(ctx, executionID)
var r0 *replication.Execution var r0 *replication.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*replication.Execution, error)); ok {
return rf(ctx, executionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *replication.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *replication.Execution); ok {
r0 = rf(ctx, executionID) r0 = rf(ctx, executionID)
} else { } else {
@ -89,7 +99,6 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*rep
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, executionID) r1 = rf(ctx, executionID)
} else { } else {
@ -104,6 +113,10 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Policy var r0 *model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -112,7 +125,6 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -127,6 +139,10 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*replication.T
ret := _m.Called(ctx, taskID) ret := _m.Called(ctx, taskID)
var r0 *replication.Task var r0 *replication.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*replication.Task, error)); ok {
return rf(ctx, taskID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *replication.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *replication.Task); ok {
r0 = rf(ctx, taskID) r0 = rf(ctx, taskID)
} else { } else {
@ -135,7 +151,6 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*replication.T
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, taskID) r1 = rf(ctx, taskID)
} else { } else {
@ -150,6 +165,10 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err
ret := _m.Called(ctx, taskID) ret := _m.Called(ctx, taskID)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
return rf(ctx, taskID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok {
r0 = rf(ctx, taskID) r0 = rf(ctx, taskID)
} else { } else {
@ -158,7 +177,6 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, taskID) r1 = rf(ctx, taskID)
} else { } else {
@ -173,6 +191,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, query *q.Query) ([]*re
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*replication.Execution var r0 []*replication.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*replication.Execution, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*replication.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*replication.Execution); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -181,7 +203,6 @@ func (_m *Controller) ListExecutions(ctx context.Context, query *q.Query) ([]*re
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -196,6 +217,10 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -204,7 +229,6 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -219,6 +243,10 @@ func (_m *Controller) ListTasks(ctx context.Context, query *q.Query) ([]*replica
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*replication.Task var r0 []*replication.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*replication.Task, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*replication.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*replication.Task); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -227,7 +255,6 @@ func (_m *Controller) ListTasks(ctx context.Context, query *q.Query) ([]*replica
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -242,13 +269,16 @@ func (_m *Controller) PolicyCount(ctx context.Context, query *q.Query) (int64, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -263,13 +293,16 @@ func (_m *Controller) Start(ctx context.Context, policy *model.Policy, resource
ret := _m.Called(ctx, policy, resource, trigger) ret := _m.Called(ctx, policy, resource, trigger)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, *regmodel.Resource, string) (int64, error)); ok {
return rf(ctx, policy, resource, trigger)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, *regmodel.Resource, string) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, *regmodel.Resource, string) int64); ok {
r0 = rf(ctx, policy, resource, trigger) r0 = rf(ctx, policy, resource, trigger)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy, *regmodel.Resource, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy, *regmodel.Resource, string) error); ok {
r1 = rf(ctx, policy, resource, trigger) r1 = rf(ctx, policy, resource, trigger)
} else { } else {
@ -298,13 +331,16 @@ func (_m *Controller) TaskCount(ctx context.Context, query *q.Query) (int64, err
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package repository package repository
@ -35,13 +35,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -70,20 +73,23 @@ func (_m *Controller) Ensure(ctx context.Context, name string) (bool, int64, err
ret := _m.Called(ctx, name) ret := _m.Called(ctx, name)
var r0 bool var r0 bool
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, string) (bool, int64, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
r0 = rf(ctx, name) r0 = rf(ctx, name)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 int64
if rf, ok := ret.Get(1).(func(context.Context, string) int64); ok { if rf, ok := ret.Get(1).(func(context.Context, string) int64); ok {
r1 = rf(ctx, name) r1 = rf(ctx, name)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
r2 = rf(ctx, name) r2 = rf(ctx, name)
} else { } else {
@ -98,6 +104,10 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*model.RepoRecord, err
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.RepoRecord var r0 *model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -106,7 +116,6 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*model.RepoRecord, err
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -121,6 +130,10 @@ func (_m *Controller) GetByName(ctx context.Context, name string) (*model.RepoRe
ret := _m.Called(ctx, name) ret := _m.Called(ctx, name)
var r0 *model.RepoRecord var r0 *model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.RepoRecord, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *model.RepoRecord); ok {
r0 = rf(ctx, name) r0 = rf(ctx, name)
} else { } else {
@ -129,7 +142,6 @@ func (_m *Controller) GetByName(ctx context.Context, name string) (*model.RepoRe
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, name) r1 = rf(ctx, name)
} else { } else {
@ -144,6 +156,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*model.RepoRe
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.RepoRecord var r0 []*model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -152,7 +168,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*model.RepoRe
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package retention package retention
@ -23,13 +23,16 @@ func (_m *Controller) CreateRetention(ctx context.Context, p *policy.Metadata) (
ret := _m.Called(ctx, p) ret := _m.Called(ctx, p)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) (int64, error)); ok {
return rf(ctx, p)
}
if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) int64); ok {
r0 = rf(ctx, p) r0 = rf(ctx, p)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *policy.Metadata) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *policy.Metadata) error); ok {
r1 = rf(ctx, p) r1 = rf(ctx, p)
} else { } else {
@ -58,6 +61,10 @@ func (_m *Controller) GetRetention(ctx context.Context, id int64) (*policy.Metad
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *policy.Metadata var r0 *policy.Metadata
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*policy.Metadata, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *policy.Metadata); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *policy.Metadata); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -66,7 +73,6 @@ func (_m *Controller) GetRetention(ctx context.Context, id int64) (*policy.Metad
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -81,6 +87,10 @@ func (_m *Controller) GetRetentionExec(ctx context.Context, eid int64) (*pkgrete
ret := _m.Called(ctx, eid) ret := _m.Called(ctx, eid)
var r0 *pkgretention.Execution var r0 *pkgretention.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgretention.Execution, error)); ok {
return rf(ctx, eid)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgretention.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgretention.Execution); ok {
r0 = rf(ctx, eid) r0 = rf(ctx, eid)
} else { } else {
@ -89,7 +99,6 @@ func (_m *Controller) GetRetentionExec(ctx context.Context, eid int64) (*pkgrete
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, eid) r1 = rf(ctx, eid)
} else { } else {
@ -104,6 +113,10 @@ func (_m *Controller) GetRetentionExecTask(ctx context.Context, taskID int64) (*
ret := _m.Called(ctx, taskID) ret := _m.Called(ctx, taskID)
var r0 *pkgretention.Task var r0 *pkgretention.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgretention.Task, error)); ok {
return rf(ctx, taskID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgretention.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgretention.Task); ok {
r0 = rf(ctx, taskID) r0 = rf(ctx, taskID)
} else { } else {
@ -112,7 +125,6 @@ func (_m *Controller) GetRetentionExecTask(ctx context.Context, taskID int64) (*
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, taskID) r1 = rf(ctx, taskID)
} else { } else {
@ -127,6 +139,10 @@ func (_m *Controller) GetRetentionExecTaskLog(ctx context.Context, taskID int64)
ret := _m.Called(ctx, taskID) ret := _m.Called(ctx, taskID)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
return rf(ctx, taskID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok {
r0 = rf(ctx, taskID) r0 = rf(ctx, taskID)
} else { } else {
@ -135,7 +151,6 @@ func (_m *Controller) GetRetentionExecTaskLog(ctx context.Context, taskID int64)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, taskID) r1 = rf(ctx, taskID)
} else { } else {
@ -150,13 +165,16 @@ func (_m *Controller) GetTotalOfRetentionExecTasks(ctx context.Context, executio
ret := _m.Called(ctx, executionID) ret := _m.Called(ctx, executionID)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok {
return rf(ctx, executionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok {
r0 = rf(ctx, executionID) r0 = rf(ctx, executionID)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, executionID) r1 = rf(ctx, executionID)
} else { } else {
@ -171,13 +189,16 @@ func (_m *Controller) GetTotalOfRetentionExecs(ctx context.Context, policyID int
ret := _m.Called(ctx, policyID) ret := _m.Called(ctx, policyID)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok {
return rf(ctx, policyID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok {
r0 = rf(ctx, policyID) r0 = rf(ctx, policyID)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, policyID) r1 = rf(ctx, policyID)
} else { } else {
@ -192,6 +213,10 @@ func (_m *Controller) ListRetentionExecTasks(ctx context.Context, executionID in
ret := _m.Called(ctx, executionID, query) ret := _m.Called(ctx, executionID, query)
var r0 []*pkgretention.Task var r0 []*pkgretention.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*pkgretention.Task, error)); ok {
return rf(ctx, executionID, query)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*pkgretention.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*pkgretention.Task); ok {
r0 = rf(ctx, executionID, query) r0 = rf(ctx, executionID, query)
} else { } else {
@ -200,7 +225,6 @@ func (_m *Controller) ListRetentionExecTasks(ctx context.Context, executionID in
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok {
r1 = rf(ctx, executionID, query) r1 = rf(ctx, executionID, query)
} else { } else {
@ -215,6 +239,10 @@ func (_m *Controller) ListRetentionExecs(ctx context.Context, policyID int64, qu
ret := _m.Called(ctx, policyID, query) ret := _m.Called(ctx, policyID, query)
var r0 []*pkgretention.Execution var r0 []*pkgretention.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*pkgretention.Execution, error)); ok {
return rf(ctx, policyID, query)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*pkgretention.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*pkgretention.Execution); ok {
r0 = rf(ctx, policyID, query) r0 = rf(ctx, policyID, query)
} else { } else {
@ -223,7 +251,6 @@ func (_m *Controller) ListRetentionExecs(ctx context.Context, policyID int64, qu
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok {
r1 = rf(ctx, policyID, query) r1 = rf(ctx, policyID, query)
} else { } else {
@ -252,13 +279,16 @@ func (_m *Controller) TriggerRetentionExec(ctx context.Context, policyID int64,
ret := _m.Called(ctx, policyID, trigger, dryRun) ret := _m.Called(ctx, policyID, trigger, dryRun)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string, bool) (int64, error)); ok {
return rf(ctx, policyID, trigger, dryRun)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, string, bool) int64); ok {
r0 = rf(ctx, policyID, trigger, dryRun) r0 = rf(ctx, policyID, trigger, dryRun)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, string, bool) error); ok {
r1 = rf(ctx, policyID, trigger, dryRun) r1 = rf(ctx, policyID, trigger, dryRun)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package robot package robot
@ -21,13 +21,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,20 +45,23 @@ func (_m *Controller) Create(ctx context.Context, r *robot.Robot) (int64, string
ret := _m.Called(ctx, r) ret := _m.Called(ctx, r)
var r0 int64 var r0 int64
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, *robot.Robot) (int64, string, error)); ok {
return rf(ctx, r)
}
if rf, ok := ret.Get(0).(func(context.Context, *robot.Robot) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *robot.Robot) int64); ok {
r0 = rf(ctx, r) r0 = rf(ctx, r)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 string
if rf, ok := ret.Get(1).(func(context.Context, *robot.Robot) string); ok { if rf, ok := ret.Get(1).(func(context.Context, *robot.Robot) string); ok {
r1 = rf(ctx, r) r1 = rf(ctx, r)
} else { } else {
r1 = ret.Get(1).(string) r1 = ret.Get(1).(string)
} }
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, *robot.Robot) error); ok { if rf, ok := ret.Get(2).(func(context.Context, *robot.Robot) error); ok {
r2 = rf(ctx, r) r2 = rf(ctx, r)
} else { } else {
@ -84,6 +90,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *robot.Option) (
ret := _m.Called(ctx, id, option) ret := _m.Called(ctx, id, option)
var r0 *robot.Robot var r0 *robot.Robot
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *robot.Option) (*robot.Robot, error)); ok {
return rf(ctx, id, option)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *robot.Option) *robot.Robot); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *robot.Option) *robot.Robot); ok {
r0 = rf(ctx, id, option) r0 = rf(ctx, id, option)
} else { } else {
@ -92,7 +102,6 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *robot.Option) (
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *robot.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *robot.Option) error); ok {
r1 = rf(ctx, id, option) r1 = rf(ctx, id, option)
} else { } else {
@ -107,6 +116,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *robot.Op
ret := _m.Called(ctx, query, option) ret := _m.Called(ctx, query, option)
var r0 []*robot.Robot var r0 []*robot.Robot
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *robot.Option) ([]*robot.Robot, error)); ok {
return rf(ctx, query, option)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *robot.Option) []*robot.Robot); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *robot.Option) []*robot.Robot); ok {
r0 = rf(ctx, query, option) r0 = rf(ctx, query, option)
} else { } else {
@ -115,7 +128,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *robot.Op
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, *robot.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, *robot.Option) error); ok {
r1 = rf(ctx, query, option) r1 = rf(ctx, query, option)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scan package scan
@ -20,13 +20,16 @@ func (_m *Checker) IsScannable(ctx context.Context, _a1 *artifact.Artifact) (boo
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) (bool, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) bool); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scan package scan
@ -47,6 +47,10 @@ func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mim
ret := _m.Called(ctx, _a1, mimeTypes) ret := _m.Called(ctx, _a1, mimeTypes)
var r0 []*daoscan.Report var r0 []*daoscan.Report
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) ([]*daoscan.Report, error)); ok {
return rf(ctx, _a1, mimeTypes)
}
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) []*daoscan.Report); ok { if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) []*daoscan.Report); ok {
r0 = rf(ctx, _a1, mimeTypes) r0 = rf(ctx, _a1, mimeTypes)
} else { } else {
@ -55,7 +59,6 @@ func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mim
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok {
r1 = rf(ctx, _a1, mimeTypes) r1 = rf(ctx, _a1, mimeTypes)
} else { } else {
@ -70,6 +73,10 @@ func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uu
ret := _m.Called(ctx, art, uuid) ret := _m.Called(ctx, art, uuid)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) ([]byte, error)); ok {
return rf(ctx, art, uuid)
}
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) []byte); ok {
r0 = rf(ctx, art, uuid) r0 = rf(ctx, art, uuid)
} else { } else {
@ -78,7 +85,6 @@ func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uu
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, string) error); ok {
r1 = rf(ctx, art, uuid) r1 = rf(ctx, art, uuid)
} else { } else {
@ -93,6 +99,10 @@ func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, mi
ret := _m.Called(ctx, _a1, mimeTypes) ret := _m.Called(ctx, _a1, mimeTypes)
var r0 map[string]interface{} var r0 map[string]interface{}
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) (map[string]interface{}, error)); ok {
return rf(ctx, _a1, mimeTypes)
}
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) map[string]interface{}); ok { if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) map[string]interface{}); ok {
r0 = rf(ctx, _a1, mimeTypes) r0 = rf(ctx, _a1, mimeTypes)
} else { } else {
@ -101,7 +111,6 @@ func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, mi
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok {
r1 = rf(ctx, _a1, mimeTypes) r1 = rf(ctx, _a1, mimeTypes)
} else { } else {
@ -116,6 +125,10 @@ func (_m *Controller) GetVulnerable(ctx context.Context, _a1 *artifact.Artifact,
ret := _m.Called(ctx, _a1, allowlist, allowlistIsExpired) ret := _m.Called(ctx, _a1, allowlist, allowlistIsExpired)
var r0 *scan.Vulnerable var r0 *scan.Vulnerable
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) (*scan.Vulnerable, error)); ok {
return rf(ctx, _a1, allowlist, allowlistIsExpired)
}
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) *scan.Vulnerable); ok { if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) *scan.Vulnerable); ok {
r0 = rf(ctx, _a1, allowlist, allowlistIsExpired) r0 = rf(ctx, _a1, allowlist, allowlistIsExpired)
} else { } else {
@ -124,7 +137,6 @@ func (_m *Controller) GetVulnerable(ctx context.Context, _a1 *artifact.Artifact,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, models.CVESet, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, models.CVESet, bool) error); ok {
r1 = rf(ctx, _a1, allowlist, allowlistIsExpired) r1 = rf(ctx, _a1, allowlist, allowlistIsExpired)
} else { } else {
@ -160,13 +172,16 @@ func (_m *Controller) ScanAll(ctx context.Context, trigger string, async bool) (
ret := _m.Called(ctx, trigger, async) ret := _m.Called(ctx, trigger, async)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, bool) (int64, error)); ok {
return rf(ctx, trigger, async)
}
if rf, ok := ret.Get(0).(func(context.Context, string, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, bool) int64); ok {
r0 = rf(ctx, trigger, async) r0 = rf(ctx, trigger, async)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
r1 = rf(ctx, trigger, async) r1 = rf(ctx, trigger, async)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scandataexport package scandataexport
@ -35,6 +35,10 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*exp
ret := _m.Called(ctx, executionID) ret := _m.Called(ctx, executionID)
var r0 *export.Execution var r0 *export.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*export.Execution, error)); ok {
return rf(ctx, executionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *export.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *export.Execution); ok {
r0 = rf(ctx, executionID) r0 = rf(ctx, executionID)
} else { } else {
@ -43,7 +47,6 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*exp
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, executionID) r1 = rf(ctx, executionID)
} else { } else {
@ -58,6 +61,10 @@ func (_m *Controller) GetTask(ctx context.Context, executionID int64) (*task.Tas
ret := _m.Called(ctx, executionID) ret := _m.Called(ctx, executionID)
var r0 *task.Task var r0 *task.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok {
return rf(ctx, executionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok {
r0 = rf(ctx, executionID) r0 = rf(ctx, executionID)
} else { } else {
@ -66,7 +73,6 @@ func (_m *Controller) GetTask(ctx context.Context, executionID int64) (*task.Tas
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, executionID) r1 = rf(ctx, executionID)
} else { } else {
@ -81,6 +87,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, userName string) ([]*e
ret := _m.Called(ctx, userName) ret := _m.Called(ctx, userName)
var r0 []*export.Execution var r0 []*export.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*export.Execution, error)); ok {
return rf(ctx, userName)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*export.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, string) []*export.Execution); ok {
r0 = rf(ctx, userName) r0 = rf(ctx, userName)
} else { } else {
@ -89,7 +99,6 @@ func (_m *Controller) ListExecutions(ctx context.Context, userName string) ([]*e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, userName) r1 = rf(ctx, userName)
} else { } else {
@ -104,13 +113,16 @@ func (_m *Controller) Start(ctx context.Context, criteria export.Request) (int64
ret := _m.Called(ctx, criteria) ret := _m.Called(ctx, criteria)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, export.Request) (int64, error)); ok {
return rf(ctx, criteria)
}
if rf, ok := ret.Get(0).(func(context.Context, export.Request) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, export.Request) int64); ok {
r0 = rf(ctx, criteria) r0 = rf(ctx, criteria)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, export.Request) error); ok { if rf, ok := ret.Get(1).(func(context.Context, export.Request) error); ok {
r1 = rf(ctx, criteria) r1 = rf(ctx, criteria)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scanner package scanner
@ -25,13 +25,16 @@ func (_m *Controller) CreateRegistration(ctx context.Context, registration *scan
ret := _m.Called(ctx, registration) ret := _m.Called(ctx, registration)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) (string, error)); ok {
return rf(ctx, registration)
}
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) string); ok { if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) string); ok {
r0 = rf(ctx, registration) r0 = rf(ctx, registration)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *scanner.Registration) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *scanner.Registration) error); ok {
r1 = rf(ctx, registration) r1 = rf(ctx, registration)
} else { } else {
@ -46,6 +49,10 @@ func (_m *Controller) DeleteRegistration(ctx context.Context, registrationUUID s
ret := _m.Called(ctx, registrationUUID) ret := _m.Called(ctx, registrationUUID)
var r0 *scanner.Registration var r0 *scanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*scanner.Registration, error)); ok {
return rf(ctx, registrationUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *scanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *scanner.Registration); ok {
r0 = rf(ctx, registrationUUID) r0 = rf(ctx, registrationUUID)
} else { } else {
@ -54,7 +61,6 @@ func (_m *Controller) DeleteRegistration(ctx context.Context, registrationUUID s
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, registrationUUID) r1 = rf(ctx, registrationUUID)
} else { } else {
@ -69,6 +75,10 @@ func (_m *Controller) GetMetadata(ctx context.Context, registrationUUID string)
ret := _m.Called(ctx, registrationUUID) ret := _m.Called(ctx, registrationUUID)
var r0 *v1.ScannerAdapterMetadata var r0 *v1.ScannerAdapterMetadata
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*v1.ScannerAdapterMetadata, error)); ok {
return rf(ctx, registrationUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *v1.ScannerAdapterMetadata); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *v1.ScannerAdapterMetadata); ok {
r0 = rf(ctx, registrationUUID) r0 = rf(ctx, registrationUUID)
} else { } else {
@ -77,7 +87,6 @@ func (_m *Controller) GetMetadata(ctx context.Context, registrationUUID string)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, registrationUUID) r1 = rf(ctx, registrationUUID)
} else { } else {
@ -92,6 +101,10 @@ func (_m *Controller) GetRegistration(ctx context.Context, registrationUUID stri
ret := _m.Called(ctx, registrationUUID) ret := _m.Called(ctx, registrationUUID)
var r0 *scanner.Registration var r0 *scanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*scanner.Registration, error)); ok {
return rf(ctx, registrationUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *scanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *scanner.Registration); ok {
r0 = rf(ctx, registrationUUID) r0 = rf(ctx, registrationUUID)
} else { } else {
@ -100,7 +113,6 @@ func (_m *Controller) GetRegistration(ctx context.Context, registrationUUID stri
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, registrationUUID) r1 = rf(ctx, registrationUUID)
} else { } else {
@ -122,6 +134,10 @@ func (_m *Controller) GetRegistrationByProject(ctx context.Context, projectID in
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 *scanner.Registration var r0 *scanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, ...controllerscanner.Option) (*scanner.Registration, error)); ok {
return rf(ctx, projectID, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, ...controllerscanner.Option) *scanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, ...controllerscanner.Option) *scanner.Registration); ok {
r0 = rf(ctx, projectID, options...) r0 = rf(ctx, projectID, options...)
} else { } else {
@ -130,7 +146,6 @@ func (_m *Controller) GetRegistrationByProject(ctx context.Context, projectID in
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, ...controllerscanner.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, ...controllerscanner.Option) error); ok {
r1 = rf(ctx, projectID, options...) r1 = rf(ctx, projectID, options...)
} else { } else {
@ -145,13 +160,16 @@ func (_m *Controller) GetTotalOfRegistrations(ctx context.Context, query *q.Quer
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -166,6 +184,10 @@ func (_m *Controller) ListRegistrations(ctx context.Context, query *q.Query) ([]
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*scanner.Registration var r0 []*scanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scanner.Registration, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scanner.Registration); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -174,7 +196,6 @@ func (_m *Controller) ListRegistrations(ctx context.Context, query *q.Query) ([]
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -189,6 +210,10 @@ func (_m *Controller) Ping(ctx context.Context, registration *scanner.Registrati
ret := _m.Called(ctx, registration) ret := _m.Called(ctx, registration)
var r0 *v1.ScannerAdapterMetadata var r0 *v1.ScannerAdapterMetadata
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) (*v1.ScannerAdapterMetadata, error)); ok {
return rf(ctx, registration)
}
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) *v1.ScannerAdapterMetadata); ok { if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) *v1.ScannerAdapterMetadata); ok {
r0 = rf(ctx, registration) r0 = rf(ctx, registration)
} else { } else {
@ -197,7 +222,6 @@ func (_m *Controller) Ping(ctx context.Context, registration *scanner.Registrati
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *scanner.Registration) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *scanner.Registration) error); ok {
r1 = rf(ctx, registration) r1 = rf(ctx, registration)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package systemartifact package systemartifact

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -21,13 +21,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,6 +45,10 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*pkgtask.Task, error)
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *pkgtask.Task var r0 *pkgtask.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgtask.Task, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Task); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -50,7 +57,6 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*pkgtask.Task, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -65,6 +71,10 @@ func (_m *Controller) GetLog(ctx context.Context, id int64) ([]byte, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -73,7 +83,6 @@ func (_m *Controller) GetLog(ctx context.Context, id int64) ([]byte, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -88,6 +97,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*pkgtask.Task
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*pkgtask.Task var r0 []*pkgtask.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*pkgtask.Task, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Task); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -96,7 +109,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*pkgtask.Task
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -21,13 +21,16 @@ func (_m *ExecutionController) Count(ctx context.Context, query *q.Query) (int64
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -56,6 +59,10 @@ func (_m *ExecutionController) Get(ctx context.Context, id int64) (*pkgtask.Exec
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *pkgtask.Execution var r0 *pkgtask.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgtask.Execution, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Execution); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -64,7 +71,6 @@ func (_m *ExecutionController) Get(ctx context.Context, id int64) (*pkgtask.Exec
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -79,6 +85,10 @@ func (_m *ExecutionController) List(ctx context.Context, query *q.Query) ([]*pkg
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*pkgtask.Execution var r0 []*pkgtask.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*pkgtask.Execution, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Execution); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -87,7 +97,6 @@ func (_m *ExecutionController) List(ctx context.Context, query *q.Query) ([]*pkg
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package user package user
@ -25,13 +25,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -46,13 +49,16 @@ func (_m *Controller) Create(ctx context.Context, u *models.User) (int, error) {
ret := _m.Called(ctx, u) ret := _m.Called(ctx, u)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.User) (int, error)); ok {
return rf(ctx, u)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok {
r0 = rf(ctx, u) r0 = rf(ctx, u)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok {
r1 = rf(ctx, u) r1 = rf(ctx, u)
} else { } else {
@ -81,6 +87,10 @@ func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*model
ret := _m.Called(ctx, id, opt) ret := _m.Called(ctx, id, opt)
var r0 *models.User var r0 *models.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) (*models.User, error)); ok {
return rf(ctx, id, opt)
}
if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) *models.User); ok { if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) *models.User); ok {
r0 = rf(ctx, id, opt) r0 = rf(ctx, id, opt)
} else { } else {
@ -89,7 +99,6 @@ func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*model
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, *user.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int, *user.Option) error); ok {
r1 = rf(ctx, id, opt) r1 = rf(ctx, id, opt)
} else { } else {
@ -104,6 +113,10 @@ func (_m *Controller) GetByName(ctx context.Context, username string) (*models.U
ret := _m.Called(ctx, username) ret := _m.Called(ctx, username)
var r0 *models.User var r0 *models.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.User, error)); ok {
return rf(ctx, username)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *models.User); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *models.User); ok {
r0 = rf(ctx, username) r0 = rf(ctx, username)
} else { } else {
@ -112,7 +125,6 @@ func (_m *Controller) GetByName(ctx context.Context, username string) (*models.U
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, username) r1 = rf(ctx, username)
} else { } else {
@ -127,6 +139,10 @@ func (_m *Controller) GetBySubIss(ctx context.Context, sub string, iss string) (
ret := _m.Called(ctx, sub, iss) ret := _m.Called(ctx, sub, iss)
var r0 *models.User var r0 *models.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.User, error)); ok {
return rf(ctx, sub, iss)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.User); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.User); ok {
r0 = rf(ctx, sub, iss) r0 = rf(ctx, sub, iss)
} else { } else {
@ -135,7 +151,6 @@ func (_m *Controller) GetBySubIss(ctx context.Context, sub string, iss string) (
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, sub, iss) r1 = rf(ctx, sub, iss)
} else { } else {
@ -157,6 +172,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...userm
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 []*models.User var r0 []*models.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...usermodels.Option) ([]*models.User, error)); ok {
return rf(ctx, query, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...usermodels.Option) []*models.User); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...usermodels.Option) []*models.User); ok {
r0 = rf(ctx, query, options...) r0 = rf(ctx, query, options...)
} else { } else {
@ -165,7 +184,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...userm
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...usermodels.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...usermodels.Option) error); ok {
r1 = rf(ctx, query, options...) r1 = rf(ctx, query, options...)
} else { } else {
@ -278,13 +296,16 @@ func (_m *Controller) VerifyPassword(ctx context.Context, usernameOrEmail string
ret := _m.Called(ctx, usernameOrEmail, password) ret := _m.Called(ctx, usernameOrEmail, password)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
return rf(ctx, usernameOrEmail, password)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
r0 = rf(ctx, usernameOrEmail, password) r0 = rf(ctx, usernameOrEmail, password)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, usernameOrEmail, password) r1 = rf(ctx, usernameOrEmail, password)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package webhook package webhook
@ -25,13 +25,16 @@ func (_m *Controller) CountExecutions(ctx context.Context, policyID int64, query
ret := _m.Called(ctx, policyID, query) ret := _m.Called(ctx, policyID, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) (int64, error)); ok {
return rf(ctx, policyID, query)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) int64); ok {
r0 = rf(ctx, policyID, query) r0 = rf(ctx, policyID, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok {
r1 = rf(ctx, policyID, query) r1 = rf(ctx, policyID, query)
} else { } else {
@ -46,13 +49,16 @@ func (_m *Controller) CountPolicies(ctx context.Context, query *q.Query) (int64,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -67,13 +73,16 @@ func (_m *Controller) CountTasks(ctx context.Context, execID int64, query *q.Que
ret := _m.Called(ctx, execID, query) ret := _m.Called(ctx, execID, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) (int64, error)); ok {
return rf(ctx, execID, query)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) int64); ok {
r0 = rf(ctx, execID, query) r0 = rf(ctx, execID, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok {
r1 = rf(ctx, execID, query) r1 = rf(ctx, execID, query)
} else { } else {
@ -88,13 +97,16 @@ func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (i
ret := _m.Called(ctx, policy) ret := _m.Called(ctx, policy)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
return rf(ctx, policy)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok {
r0 = rf(ctx, policy) r0 = rf(ctx, policy)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok {
r1 = rf(ctx, policy) r1 = rf(ctx, policy)
} else { } else {
@ -123,13 +135,16 @@ func (_m *Controller) GetLastTriggerTime(ctx context.Context, eventType string,
ret := _m.Called(ctx, eventType, policyID) ret := _m.Called(ctx, eventType, policyID)
var r0 time.Time var r0 time.Time
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, int64) (time.Time, error)); ok {
return rf(ctx, eventType, policyID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, int64) time.Time); ok { if rf, ok := ret.Get(0).(func(context.Context, string, int64) time.Time); ok {
r0 = rf(ctx, eventType, policyID) r0 = rf(ctx, eventType, policyID)
} else { } else {
r0 = ret.Get(0).(time.Time) r0 = ret.Get(0).(time.Time)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
r1 = rf(ctx, eventType, policyID) r1 = rf(ctx, eventType, policyID)
} else { } else {
@ -144,6 +159,10 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Policy var r0 *model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -152,7 +171,6 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -167,6 +185,10 @@ func (_m *Controller) GetRelatedPolices(ctx context.Context, projectID int64, ev
ret := _m.Called(ctx, projectID, eventType) ret := _m.Called(ctx, projectID, eventType)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*model.Policy, error)); ok {
return rf(ctx, projectID, eventType)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*model.Policy); ok {
r0 = rf(ctx, projectID, eventType) r0 = rf(ctx, projectID, eventType)
} else { } else {
@ -175,7 +197,6 @@ func (_m *Controller) GetRelatedPolices(ctx context.Context, projectID int64, ev
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
r1 = rf(ctx, projectID, eventType) r1 = rf(ctx, projectID, eventType)
} else { } else {
@ -190,6 +211,10 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*task.Task, er
ret := _m.Called(ctx, taskID) ret := _m.Called(ctx, taskID)
var r0 *task.Task var r0 *task.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok {
return rf(ctx, taskID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok {
r0 = rf(ctx, taskID) r0 = rf(ctx, taskID)
} else { } else {
@ -198,7 +223,6 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*task.Task, er
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, taskID) r1 = rf(ctx, taskID)
} else { } else {
@ -213,6 +237,10 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err
ret := _m.Called(ctx, taskID) ret := _m.Called(ctx, taskID)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
return rf(ctx, taskID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok {
r0 = rf(ctx, taskID) r0 = rf(ctx, taskID)
} else { } else {
@ -221,7 +249,6 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, taskID) r1 = rf(ctx, taskID)
} else { } else {
@ -236,6 +263,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, policyID int64, query
ret := _m.Called(ctx, policyID, query) ret := _m.Called(ctx, policyID, query)
var r0 []*task.Execution var r0 []*task.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*task.Execution, error)); ok {
return rf(ctx, policyID, query)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*task.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*task.Execution); ok {
r0 = rf(ctx, policyID, query) r0 = rf(ctx, policyID, query)
} else { } else {
@ -244,7 +275,6 @@ func (_m *Controller) ListExecutions(ctx context.Context, policyID int64, query
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok {
r1 = rf(ctx, policyID, query) r1 = rf(ctx, policyID, query)
} else { } else {
@ -259,6 +289,10 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -267,7 +301,6 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -282,6 +315,10 @@ func (_m *Controller) ListTasks(ctx context.Context, execID int64, query *q.Quer
ret := _m.Called(ctx, execID, query) ret := _m.Called(ctx, execID, query)
var r0 []*task.Task var r0 []*task.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*task.Task, error)); ok {
return rf(ctx, execID, query)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*task.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*task.Task); ok {
r0 = rf(ctx, execID, query) r0 = rf(ctx, execID, query)
} else { } else {
@ -290,7 +327,6 @@ func (_m *Controller) ListTasks(ctx context.Context, execID int64, query *q.Quer
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok {
r1 = rf(ctx, execID, query) r1 = rf(ctx, execID, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package cache package cache
@ -68,6 +68,10 @@ func (_m *Cache) Keys(ctx context.Context, prefixes ...string) ([]string, error)
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, ...string) ([]string, error)); ok {
return rf(ctx, prefixes...)
}
if rf, ok := ret.Get(0).(func(context.Context, ...string) []string); ok { if rf, ok := ret.Get(0).(func(context.Context, ...string) []string); ok {
r0 = rf(ctx, prefixes...) r0 = rf(ctx, prefixes...)
} else { } else {
@ -76,7 +80,6 @@ func (_m *Cache) Keys(ctx context.Context, prefixes ...string) ([]string, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, ...string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, ...string) error); ok {
r1 = rf(ctx, prefixes...) r1 = rf(ctx, prefixes...)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package config package config

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package orm package orm

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -21,13 +21,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *DAO) Create(ctx context.Context, accessory *dao.Accessory) (int64, err
ret := _m.Called(ctx, accessory) ret := _m.Called(ctx, accessory)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) (int64, error)); ok {
return rf(ctx, accessory)
}
if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) int64); ok {
r0 = rf(ctx, accessory) r0 = rf(ctx, accessory)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *dao.Accessory) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *dao.Accessory) error); ok {
r1 = rf(ctx, accessory) r1 = rf(ctx, accessory)
} else { } else {
@ -77,13 +83,16 @@ func (_m *DAO) DeleteAccessories(ctx context.Context, query *q.Query) (int64, er
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -98,6 +107,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Accessory, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *dao.Accessory var r0 *dao.Accessory
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Accessory, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Accessory); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Accessory); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -106,7 +119,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Accessory, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -121,6 +133,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Accessory, erro
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*dao.Accessory var r0 []*dao.Accessory
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Accessory, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Accessory); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Accessory); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -129,7 +145,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Accessory, erro
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package accessory package accessory
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 model.AccessoryData) (int64,
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, model.AccessoryData) error); ok { if rf, ok := ret.Get(1).(func(context.Context, model.AccessoryData) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -105,6 +111,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (model.Accessory, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 model.Accessory var r0 model.Accessory
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (model.Accessory, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) model.Accessory); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) model.Accessory); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -113,7 +123,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (model.Accessory, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -128,6 +137,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]model.Accessory,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []model.Accessory var r0 []model.Accessory
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]model.Accessory, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []model.Accessory); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []model.Accessory); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -136,7 +149,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]model.Accessory,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package model package model

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -20,6 +20,10 @@ func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllo
ret := _m.Called(ctx, pid) ret := _m.Called(ctx, pid)
var r0 *models.CVEAllowlist var r0 *models.CVEAllowlist
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok {
return rf(ctx, pid)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok {
r0 = rf(ctx, pid) r0 = rf(ctx, pid)
} else { } else {
@ -28,7 +32,6 @@ func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllo
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, pid) r1 = rf(ctx, pid)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Set(ctx context.Context, l models.CVEAllowlist) (int64, error) {
ret := _m.Called(ctx, l) ret := _m.Called(ctx, l)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) (int64, error)); ok {
return rf(ctx, l)
}
if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) int64); ok {
r0 = rf(ctx, l) r0 = rf(ctx, l)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.CVEAllowlist) error); ok { if rf, ok := ret.Get(1).(func(context.Context, models.CVEAllowlist) error); ok {
r1 = rf(ctx, l) r1 = rf(ctx, l)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package robot package robot
@ -33,6 +33,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64) (*models.CVEAllowli
ret := _m.Called(ctx, projectID) ret := _m.Called(ctx, projectID)
var r0 *models.CVEAllowlist var r0 *models.CVEAllowlist
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok {
return rf(ctx, projectID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok {
r0 = rf(ctx, projectID) r0 = rf(ctx, projectID)
} else { } else {
@ -41,7 +45,6 @@ func (_m *Manager) Get(ctx context.Context, projectID int64) (*models.CVEAllowli
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, projectID) r1 = rf(ctx, projectID)
} else { } else {
@ -56,6 +59,10 @@ func (_m *Manager) GetSys(ctx context.Context) (*models.CVEAllowlist, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 *models.CVEAllowlist var r0 *models.CVEAllowlist
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*models.CVEAllowlist, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *models.CVEAllowlist); ok { if rf, ok := ret.Get(0).(func(context.Context) *models.CVEAllowlist); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -64,7 +71,6 @@ func (_m *Manager) GetSys(ctx context.Context) (*models.CVEAllowlist, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package artifact package artifact
@ -24,13 +24,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -45,13 +48,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *artifact.Artifact) (int64, e
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -94,6 +100,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*artifact.Artifact, error
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *artifact.Artifact var r0 *artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*artifact.Artifact, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *artifact.Artifact); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -102,7 +112,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*artifact.Artifact, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -117,6 +126,10 @@ func (_m *Manager) GetByDigest(ctx context.Context, repository string, digest st
ret := _m.Called(ctx, repository, digest) ret := _m.Called(ctx, repository, digest)
var r0 *artifact.Artifact var r0 *artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*artifact.Artifact, error)); ok {
return rf(ctx, repository, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) *artifact.Artifact); ok {
r0 = rf(ctx, repository, digest) r0 = rf(ctx, repository, digest)
} else { } else {
@ -125,7 +138,6 @@ func (_m *Manager) GetByDigest(ctx context.Context, repository string, digest st
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, repository, digest) r1 = rf(ctx, repository, digest)
} else { } else {
@ -140,6 +152,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*artifact.Artifa
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*artifact.Artifact var r0 []*artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*artifact.Artifact, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*artifact.Artifact); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -148,7 +164,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*artifact.Artifa
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -163,6 +178,10 @@ func (_m *Manager) ListReferences(ctx context.Context, query *q.Query) ([]*artif
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*artifact.Reference var r0 []*artifact.Reference
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*artifact.Reference, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*artifact.Reference); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*artifact.Reference); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -171,7 +190,6 @@ func (_m *Manager) ListReferences(ctx context.Context, query *q.Query) ([]*artif
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, access *model.AuditLog) (int64, error
ret := _m.Called(ctx, access) ret := _m.Called(ctx, access)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) (int64, error)); ok {
return rf(ctx, access)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) int64); ok {
r0 = rf(ctx, access) r0 = rf(ctx, access)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.AuditLog) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.AuditLog) error); ok {
r1 = rf(ctx, access) r1 = rf(ctx, access)
} else { } else {
@ -78,6 +84,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.AuditLog var r0 *model.AuditLog
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.AuditLog, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.AuditLog); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.AuditLog); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -86,7 +96,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -101,6 +110,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, err
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.AuditLog var r0 []*model.AuditLog
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.AuditLog, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.AuditLog); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.AuditLog); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -109,7 +122,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, err
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -124,13 +136,16 @@ func (_m *DAO) Purge(ctx context.Context, retentionHour int, includeOperations [
ret := _m.Called(ctx, retentionHour, includeOperations, dryRun) ret := _m.Called(ctx, retentionHour, includeOperations, dryRun)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) (int64, error)); ok {
return rf(ctx, retentionHour, includeOperations, dryRun)
}
if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) int64); ok {
r0 = rf(ctx, retentionHour, includeOperations, dryRun) r0 = rf(ctx, retentionHour, includeOperations, dryRun)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, []string, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int, []string, bool) error); ok {
r1 = rf(ctx, retentionHour, includeOperations, dryRun) r1 = rf(ctx, retentionHour, includeOperations, dryRun)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package audit package audit
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.AuditLog) (int64, erro
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.AuditLog) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.AuditLog) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.AuditLog var r0 *model.AuditLog
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.AuditLog, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.AuditLog); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.AuditLog); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.AuditLog,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.AuditLog var r0 []*model.AuditLog
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.AuditLog, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.AuditLog); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.AuditLog); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.AuditLog,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -123,13 +135,16 @@ func (_m *Manager) Purge(ctx context.Context, retentionHour int, includeOperatio
ret := _m.Called(ctx, retentionHour, includeOperations, dryRun) ret := _m.Called(ctx, retentionHour, includeOperations, dryRun)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) (int64, error)); ok {
return rf(ctx, retentionHour, includeOperations, dryRun)
}
if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) int64); ok {
r0 = rf(ctx, retentionHour, includeOperations, dryRun) r0 = rf(ctx, retentionHour, includeOperations, dryRun)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, []string, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int, []string, bool) error); ok {
r1 = rf(ctx, retentionHour, includeOperations, dryRun) r1 = rf(ctx, retentionHour, includeOperations, dryRun)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package blob package blob
@ -21,13 +21,16 @@ func (_m *Manager) AssociateWithArtifact(ctx context.Context, blobDigest string,
ret := _m.Called(ctx, blobDigest, artifactDigest) ret := _m.Called(ctx, blobDigest, artifactDigest)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (int64, error)); ok {
return rf(ctx, blobDigest, artifactDigest)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) int64); ok {
r0 = rf(ctx, blobDigest, artifactDigest) r0 = rf(ctx, blobDigest, artifactDigest)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, blobDigest, artifactDigest) r1 = rf(ctx, blobDigest, artifactDigest)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) AssociateWithProject(ctx context.Context, blobID int64, proje
ret := _m.Called(ctx, blobID, projectID) ret := _m.Called(ctx, blobID, projectID)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (int64, error)); ok {
return rf(ctx, blobID, projectID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, int64) int64); ok {
r0 = rf(ctx, blobID, projectID) r0 = rf(ctx, blobID, projectID)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok {
r1 = rf(ctx, blobID, projectID) r1 = rf(ctx, blobID, projectID)
} else { } else {
@ -63,13 +69,16 @@ func (_m *Manager) CalculateTotalSize(ctx context.Context, excludeForeignLayer b
ret := _m.Called(ctx, excludeForeignLayer) ret := _m.Called(ctx, excludeForeignLayer)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, bool) (int64, error)); ok {
return rf(ctx, excludeForeignLayer)
}
if rf, ok := ret.Get(0).(func(context.Context, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, bool) int64); ok {
r0 = rf(ctx, excludeForeignLayer) r0 = rf(ctx, excludeForeignLayer)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok {
r1 = rf(ctx, excludeForeignLayer) r1 = rf(ctx, excludeForeignLayer)
} else { } else {
@ -84,13 +93,16 @@ func (_m *Manager) CalculateTotalSizeByProject(ctx context.Context, projectID in
ret := _m.Called(ctx, projectID, excludeForeignLayer) ret := _m.Called(ctx, projectID, excludeForeignLayer)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) (int64, error)); ok {
return rf(ctx, projectID, excludeForeignLayer)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, bool) int64); ok {
r0 = rf(ctx, projectID, excludeForeignLayer) r0 = rf(ctx, projectID, excludeForeignLayer)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, bool) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, bool) error); ok {
r1 = rf(ctx, projectID, excludeForeignLayer) r1 = rf(ctx, projectID, excludeForeignLayer)
} else { } else {
@ -133,13 +145,16 @@ func (_m *Manager) Create(ctx context.Context, digest string, contentType string
ret := _m.Called(ctx, digest, contentType, size) ret := _m.Called(ctx, digest, contentType, size)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (int64, error)); ok {
return rf(ctx, digest, contentType, size)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) int64); ok {
r0 = rf(ctx, digest, contentType, size) r0 = rf(ctx, digest, contentType, size)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok {
r1 = rf(ctx, digest, contentType, size) r1 = rf(ctx, digest, contentType, size)
} else { } else {
@ -168,6 +183,10 @@ func (_m *Manager) FindBlobsShouldUnassociatedWithProject(ctx context.Context, p
ret := _m.Called(ctx, projectID, blobs) ret := _m.Called(ctx, projectID, blobs)
var r0 []*models.Blob var r0 []*models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) ([]*models.Blob, error)); ok {
return rf(ctx, projectID, blobs)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) []*models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) []*models.Blob); ok {
r0 = rf(ctx, projectID, blobs) r0 = rf(ctx, projectID, blobs)
} else { } else {
@ -176,7 +195,6 @@ func (_m *Manager) FindBlobsShouldUnassociatedWithProject(ctx context.Context, p
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, []*models.Blob) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, []*models.Blob) error); ok {
r1 = rf(ctx, projectID, blobs) r1 = rf(ctx, projectID, blobs)
} else { } else {
@ -191,6 +209,10 @@ func (_m *Manager) Get(ctx context.Context, digest string) (*models.Blob, error)
ret := _m.Called(ctx, digest) ret := _m.Called(ctx, digest)
var r0 *models.Blob var r0 *models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.Blob, error)); ok {
return rf(ctx, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *models.Blob); ok {
r0 = rf(ctx, digest) r0 = rf(ctx, digest)
} else { } else {
@ -199,7 +221,6 @@ func (_m *Manager) Get(ctx context.Context, digest string) (*models.Blob, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, digest) r1 = rf(ctx, digest)
} else { } else {
@ -214,6 +235,10 @@ func (_m *Manager) GetByArt(ctx context.Context, digest string) ([]*models.Blob,
ret := _m.Called(ctx, digest) ret := _m.Called(ctx, digest)
var r0 []*models.Blob var r0 []*models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*models.Blob, error)); ok {
return rf(ctx, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Blob); ok {
r0 = rf(ctx, digest) r0 = rf(ctx, digest)
} else { } else {
@ -222,7 +247,6 @@ func (_m *Manager) GetByArt(ctx context.Context, digest string) ([]*models.Blob,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, digest) r1 = rf(ctx, digest)
} else { } else {
@ -237,6 +261,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Blob, er
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*models.Blob var r0 []*models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Blob, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Blob); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -245,7 +273,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Blob, er
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -274,13 +301,16 @@ func (_m *Manager) UpdateBlobStatus(ctx context.Context, _a1 *models.Blob) (int6
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.Blob) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.Blob) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -295,6 +325,10 @@ func (_m *Manager) UselessBlobs(ctx context.Context, timeWindowHours int64) ([]*
ret := _m.Called(ctx, timeWindowHours) ret := _m.Called(ctx, timeWindowHours)
var r0 []*models.Blob var r0 []*models.Blob
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*models.Blob, error)); ok {
return rf(ctx, timeWindowHours)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []*models.Blob); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []*models.Blob); ok {
r0 = rf(ctx, timeWindowHours) r0 = rf(ctx, timeWindowHours)
} else { } else {
@ -303,7 +337,6 @@ func (_m *Manager) UselessBlobs(ctx context.Context, timeWindowHours int64) ([]*
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, timeWindowHours) r1 = rf(ctx, timeWindowHours)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package redis package redis
@ -36,13 +36,16 @@ func (_m *CachedManager) CountCache(ctx context.Context) (int64, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) int64); ok { if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -99,6 +102,10 @@ func (_m *CachedManager) Get(ctx context.Context, digest string) ([]byte, error)
ret := _m.Called(ctx, digest) ret := _m.Called(ctx, digest)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
return rf(ctx, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
r0 = rf(ctx, digest) r0 = rf(ctx, digest)
} else { } else {
@ -107,7 +114,6 @@ func (_m *CachedManager) Get(ctx context.Context, digest string) ([]byte, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, digest) r1 = rf(ctx, digest)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package distribution package distribution
@ -17,13 +17,17 @@ func (_m *Manifest) Payload() (string, []byte, error) {
ret := _m.Called() ret := _m.Called()
var r0 string var r0 string
var r1 []byte
var r2 error
if rf, ok := ret.Get(0).(func() (string, []byte, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() string); ok { if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf() r0 = rf()
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 []byte
if rf, ok := ret.Get(1).(func() []byte); ok { if rf, ok := ret.Get(1).(func() []byte); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -32,7 +36,6 @@ func (_m *Manifest) Payload() (string, []byte, error) {
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func() error); ok { if rf, ok := ret.Get(2).(func() error); ok {
r2 = rf() r2 = rf()
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) CreateImmutableRule(ctx context.Context, ir *model.ImmutableRule)
ret := _m.Called(ctx, ir) ret := _m.Called(ctx, ir)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.ImmutableRule) (int64, error)); ok {
return rf(ctx, ir)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.ImmutableRule) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.ImmutableRule) int64); ok {
r0 = rf(ctx, ir) r0 = rf(ctx, ir)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.ImmutableRule) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.ImmutableRule) error); ok {
r1 = rf(ctx, ir) r1 = rf(ctx, ir)
} else { } else {
@ -78,6 +84,10 @@ func (_m *DAO) GetImmutableRule(ctx context.Context, id int64) (*model.Immutable
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.ImmutableRule var r0 *model.ImmutableRule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.ImmutableRule, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.ImmutableRule); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.ImmutableRule); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -86,7 +96,6 @@ func (_m *DAO) GetImmutableRule(ctx context.Context, id int64) (*model.Immutable
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -101,6 +110,10 @@ func (_m *DAO) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.ImmutableRule var r0 []*model.ImmutableRule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.ImmutableRule, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.ImmutableRule); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.ImmutableRule); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -109,7 +122,6 @@ func (_m *DAO) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Create(ctx context.Context, jobLog *models.JobLog) (int64, error)
ret := _m.Called(ctx, jobLog) ret := _m.Called(ctx, jobLog)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) (int64, error)); ok {
return rf(ctx, jobLog)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) int64); ok {
r0 = rf(ctx, jobLog) r0 = rf(ctx, jobLog)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.JobLog) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.JobLog) error); ok {
r1 = rf(ctx, jobLog) r1 = rf(ctx, jobLog)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) DeleteBefore(ctx context.Context, t time.Time) (int64, error) {
ret := _m.Called(ctx, t) ret := _m.Called(ctx, t)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok {
return rf(ctx, t)
}
if rf, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok {
r0 = rf(ctx, t) r0 = rf(ctx, t)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
r1 = rf(ctx, t) r1 = rf(ctx, t)
} else { } else {
@ -64,6 +70,10 @@ func (_m *DAO) Get(ctx context.Context, uuid string) (*models.JobLog, error) {
ret := _m.Called(ctx, uuid) ret := _m.Called(ctx, uuid)
var r0 *models.JobLog var r0 *models.JobLog
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.JobLog, error)); ok {
return rf(ctx, uuid)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *models.JobLog); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *models.JobLog); ok {
r0 = rf(ctx, uuid) r0 = rf(ctx, uuid)
} else { } else {
@ -72,7 +82,6 @@ func (_m *DAO) Get(ctx context.Context, uuid string) (*models.JobLog, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, uuid) r1 = rf(ctx, uuid)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package joblog package joblog
@ -22,13 +22,16 @@ func (_m *Manager) Create(ctx context.Context, jobLog *models.JobLog) (int64, er
ret := _m.Called(ctx, jobLog) ret := _m.Called(ctx, jobLog)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) (int64, error)); ok {
return rf(ctx, jobLog)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) int64); ok {
r0 = rf(ctx, jobLog) r0 = rf(ctx, jobLog)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.JobLog) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.JobLog) error); ok {
r1 = rf(ctx, jobLog) r1 = rf(ctx, jobLog)
} else { } else {
@ -43,13 +46,16 @@ func (_m *Manager) DeleteBefore(ctx context.Context, t time.Time) (int64, error)
ret := _m.Called(ctx, t) ret := _m.Called(ctx, t)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok {
return rf(ctx, t)
}
if rf, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok {
r0 = rf(ctx, t) r0 = rf(ctx, t)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
r1 = rf(ctx, t) r1 = rf(ctx, t)
} else { } else {
@ -64,6 +70,10 @@ func (_m *Manager) Get(ctx context.Context, uuid string) (*models.JobLog, error)
ret := _m.Called(ctx, uuid) ret := _m.Called(ctx, uuid)
var r0 *models.JobLog var r0 *models.JobLog
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.JobLog, error)); ok {
return rf(ctx, uuid)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *models.JobLog); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *models.JobLog); ok {
r0 = rf(ctx, uuid) r0 = rf(ctx, uuid)
} else { } else {
@ -72,7 +82,6 @@ func (_m *Manager) Get(ctx context.Context, uuid string) (*models.JobLog, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, uuid) r1 = rf(ctx, uuid)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package jobmonitor package jobmonitor
@ -17,6 +17,10 @@ func (_m *JobServiceMonitorClient) Queues() ([]*work.Queue, error) {
ret := _m.Called() ret := _m.Called()
var r0 []*work.Queue var r0 []*work.Queue
var r1 error
if rf, ok := ret.Get(0).(func() ([]*work.Queue, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []*work.Queue); ok { if rf, ok := ret.Get(0).(func() []*work.Queue); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -25,7 +29,6 @@ func (_m *JobServiceMonitorClient) Queues() ([]*work.Queue, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -40,6 +43,10 @@ func (_m *JobServiceMonitorClient) WorkerObservations() ([]*work.WorkerObservati
ret := _m.Called() ret := _m.Called()
var r0 []*work.WorkerObservation var r0 []*work.WorkerObservation
var r1 error
if rf, ok := ret.Get(0).(func() ([]*work.WorkerObservation, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []*work.WorkerObservation); ok { if rf, ok := ret.Get(0).(func() []*work.WorkerObservation); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -48,7 +55,6 @@ func (_m *JobServiceMonitorClient) WorkerObservations() ([]*work.WorkerObservati
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -63,6 +69,10 @@ func (_m *JobServiceMonitorClient) WorkerPoolHeartbeats() ([]*work.WorkerPoolHea
ret := _m.Called() ret := _m.Called()
var r0 []*work.WorkerPoolHeartbeat var r0 []*work.WorkerPoolHeartbeat
var r1 error
if rf, ok := ret.Get(0).(func() ([]*work.WorkerPoolHeartbeat, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []*work.WorkerPoolHeartbeat); ok { if rf, ok := ret.Get(0).(func() []*work.WorkerPoolHeartbeat); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -71,7 +81,6 @@ func (_m *JobServiceMonitorClient) WorkerPoolHeartbeats() ([]*work.WorkerPoolHea
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package jobmonitor package jobmonitor
@ -19,6 +19,10 @@ func (_m *PoolManager) List(ctx context.Context, monitorClient jobmonitor.JobSer
ret := _m.Called(ctx, monitorClient) ret := _m.Called(ctx, monitorClient)
var r0 []*jobmonitor.WorkerPool var r0 []*jobmonitor.WorkerPool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.WorkerPool, error)); ok {
return rf(ctx, monitorClient)
}
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) []*jobmonitor.WorkerPool); ok { if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) []*jobmonitor.WorkerPool); ok {
r0 = rf(ctx, monitorClient) r0 = rf(ctx, monitorClient)
} else { } else {
@ -27,7 +31,6 @@ func (_m *PoolManager) List(ctx context.Context, monitorClient jobmonitor.JobSer
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient) error); ok { if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient) error); ok {
r1 = rf(ctx, monitorClient) r1 = rf(ctx, monitorClient)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package jobmonitor package jobmonitor
@ -19,6 +19,10 @@ func (_m *QueueManager) List(ctx context.Context, monitClient jobmonitor.JobServ
ret := _m.Called(ctx, monitClient) ret := _m.Called(ctx, monitClient)
var r0 []*jobmonitor.Queue var r0 []*jobmonitor.Queue
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.Queue, error)); ok {
return rf(ctx, monitClient)
}
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) []*jobmonitor.Queue); ok { if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) []*jobmonitor.Queue); ok {
r0 = rf(ctx, monitClient) r0 = rf(ctx, monitClient)
} else { } else {
@ -27,7 +31,6 @@ func (_m *QueueManager) List(ctx context.Context, monitClient jobmonitor.JobServ
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient) error); ok { if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient) error); ok {
r1 = rf(ctx, monitClient) r1 = rf(ctx, monitClient)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package jobmonitor package jobmonitor
@ -18,6 +18,10 @@ func (_m *RedisClient) AllJobTypes(ctx context.Context) ([]string, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []string); ok { if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -26,7 +30,6 @@ func (_m *RedisClient) AllJobTypes(ctx context.Context) ([]string, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -55,6 +58,10 @@ func (_m *RedisClient) StopPendingJobs(ctx context.Context, jobType string) ([]s
ret := _m.Called(ctx, jobType) ret := _m.Called(ctx, jobType)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
return rf(ctx, jobType)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok { if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
r0 = rf(ctx, jobType) r0 = rf(ctx, jobType)
} else { } else {
@ -63,7 +70,6 @@ func (_m *RedisClient) StopPendingJobs(ctx context.Context, jobType string) ([]s
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, jobType) r1 = rf(ctx, jobType)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package jobmonitor package jobmonitor
@ -19,6 +19,10 @@ func (_m *WorkerManager) List(ctx context.Context, monitClient jobmonitor.JobSer
ret := _m.Called(ctx, monitClient, poolID) ret := _m.Called(ctx, monitClient, poolID)
var r0 []*jobmonitor.Worker var r0 []*jobmonitor.Worker
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) ([]*jobmonitor.Worker, error)); ok {
return rf(ctx, monitClient, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) []*jobmonitor.Worker); ok { if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) []*jobmonitor.Worker); ok {
r0 = rf(ctx, monitClient, poolID) r0 = rf(ctx, monitClient, poolID)
} else { } else {
@ -27,7 +31,6 @@ func (_m *WorkerManager) List(ctx context.Context, monitClient jobmonitor.JobSer
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) error); ok {
r1 = rf(ctx, monitClient, poolID) r1 = rf(ctx, monitClient, poolID)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, label *model.Label) (int64, error) {
ret := _m.Called(ctx, label) ret := _m.Called(ctx, label)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) (int64, error)); ok {
return rf(ctx, label)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Label) int64); ok {
r0 = rf(ctx, label) r0 = rf(ctx, label)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Label) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Label) error); ok {
r1 = rf(ctx, label) r1 = rf(ctx, label)
} else { } else {
@ -64,13 +70,16 @@ func (_m *DAO) CreateReference(ctx context.Context, reference *model.Reference)
ret := _m.Called(ctx, reference) ret := _m.Called(ctx, reference)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Reference) (int64, error)); ok {
return rf(ctx, reference)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Reference) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Reference) int64); ok {
r0 = rf(ctx, reference) r0 = rf(ctx, reference)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Reference) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Reference) error); ok {
r1 = rf(ctx, reference) r1 = rf(ctx, reference)
} else { } else {
@ -113,13 +122,16 @@ func (_m *DAO) DeleteReferences(ctx context.Context, query *q.Query) (int64, err
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -134,6 +146,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Label, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Label var r0 *model.Label
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Label, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Label); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Label); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -142,7 +158,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Label, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -157,6 +172,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Label, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Label var r0 []*model.Label
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Label, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Label); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Label); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -165,7 +184,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Label, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -180,6 +198,10 @@ func (_m *DAO) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.L
ret := _m.Called(ctx, artifactID) ret := _m.Called(ctx, artifactID)
var r0 []*model.Label var r0 []*model.Label
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*model.Label, error)); ok {
return rf(ctx, artifactID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []*model.Label); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []*model.Label); ok {
r0 = rf(ctx, artifactID) r0 = rf(ctx, artifactID)
} else { } else {
@ -188,7 +210,6 @@ func (_m *DAO) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.L
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, artifactID) r1 = rf(ctx, artifactID)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package label package label
@ -36,13 +36,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -57,13 +60,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.Label) (int64, error)
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Label) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Label) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Label) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -92,6 +98,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Label, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Label var r0 *model.Label
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Label, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Label); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Label); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -100,7 +110,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Label, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -115,6 +124,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Label, er
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Label var r0 []*model.Label
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Label, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Label); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Label); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -123,7 +136,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Label, er
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -138,6 +150,10 @@ func (_m *Manager) ListByArtifact(ctx context.Context, artifactID int64) ([]*mod
ret := _m.Called(ctx, artifactID) ret := _m.Called(ctx, artifactID)
var r0 []*model.Label var r0 []*model.Label
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*model.Label, error)); ok {
return rf(ctx, artifactID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []*model.Label); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []*model.Label); ok {
r0 = rf(ctx, artifactID) r0 = rf(ctx, artifactID)
} else { } else {
@ -146,7 +162,6 @@ func (_m *Manager) ListByArtifact(ctx context.Context, artifactID int64) ([]*mod
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, artifactID) r1 = rf(ctx, artifactID)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package ldap package ldap
@ -23,6 +23,10 @@ func (_m *Manager) ImportUser(ctx context.Context, sess *ldap.Session, ldapImpor
ret := _m.Called(ctx, sess, ldapImportUsers) ret := _m.Called(ctx, sess, ldapImportUsers)
var r0 []model.FailedImportUser var r0 []model.FailedImportUser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, []string) ([]model.FailedImportUser, error)); ok {
return rf(ctx, sess, ldapImportUsers)
}
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, []string) []model.FailedImportUser); ok { if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, []string) []model.FailedImportUser); ok {
r0 = rf(ctx, sess, ldapImportUsers) r0 = rf(ctx, sess, ldapImportUsers)
} else { } else {
@ -31,7 +35,6 @@ func (_m *Manager) ImportUser(ctx context.Context, sess *ldap.Session, ldapImpor
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, []string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, []string) error); ok {
r1 = rf(ctx, sess, ldapImportUsers) r1 = rf(ctx, sess, ldapImportUsers)
} else { } else {
@ -46,13 +49,16 @@ func (_m *Manager) Ping(ctx context.Context, cfg models.LdapConf) (bool, error)
ret := _m.Called(ctx, cfg) ret := _m.Called(ctx, cfg)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, models.LdapConf) (bool, error)); ok {
return rf(ctx, cfg)
}
if rf, ok := ret.Get(0).(func(context.Context, models.LdapConf) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, models.LdapConf) bool); ok {
r0 = rf(ctx, cfg) r0 = rf(ctx, cfg)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.LdapConf) error); ok { if rf, ok := ret.Get(1).(func(context.Context, models.LdapConf) error); ok {
r1 = rf(ctx, cfg) r1 = rf(ctx, cfg)
} else { } else {
@ -67,6 +73,10 @@ func (_m *Manager) SearchGroup(ctx context.Context, sess *ldap.Session, groupNam
ret := _m.Called(ctx, sess, groupName, groupDN) ret := _m.Called(ctx, sess, groupName, groupDN)
var r0 []model.Group var r0 []model.Group
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string, string) ([]model.Group, error)); ok {
return rf(ctx, sess, groupName, groupDN)
}
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string, string) []model.Group); ok { if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string, string) []model.Group); ok {
r0 = rf(ctx, sess, groupName, groupDN) r0 = rf(ctx, sess, groupName, groupDN)
} else { } else {
@ -75,7 +85,6 @@ func (_m *Manager) SearchGroup(ctx context.Context, sess *ldap.Session, groupNam
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, string, string) error); ok {
r1 = rf(ctx, sess, groupName, groupDN) r1 = rf(ctx, sess, groupName, groupDN)
} else { } else {
@ -90,6 +99,10 @@ func (_m *Manager) SearchUser(ctx context.Context, sess *ldap.Session, username
ret := _m.Called(ctx, sess, username) ret := _m.Called(ctx, sess, username)
var r0 []model.User var r0 []model.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string) ([]model.User, error)); ok {
return rf(ctx, sess, username)
}
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string) []model.User); ok { if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string) []model.User); ok {
r0 = rf(ctx, sess, username) r0 = rf(ctx, sess, username)
} else { } else {
@ -98,7 +111,6 @@ func (_m *Manager) SearchUser(ctx context.Context, sess *ldap.Session, username
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, string) error); ok {
r1 = rf(ctx, sess, username) r1 = rf(ctx, sess, username)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package member package member
@ -22,13 +22,16 @@ func (_m *Manager) AddProjectMember(ctx context.Context, _a1 models.Member) (int
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, models.Member) (int, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, models.Member) int); ok { if rf, ok := ret.Get(0).(func(context.Context, models.Member) int); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.Member) error); ok { if rf, ok := ret.Get(1).(func(context.Context, models.Member) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -71,6 +74,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, memberID int) (*mod
ret := _m.Called(ctx, projectID, memberID) ret := _m.Called(ctx, projectID, memberID)
var r0 *models.Member var r0 *models.Member
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int) (*models.Member, error)); ok {
return rf(ctx, projectID, memberID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, int) *models.Member); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, int) *models.Member); ok {
r0 = rf(ctx, projectID, memberID) r0 = rf(ctx, projectID, memberID)
} else { } else {
@ -79,7 +86,6 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, memberID int) (*mod
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, int) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, int) error); ok {
r1 = rf(ctx, projectID, memberID) r1 = rf(ctx, projectID, memberID)
} else { } else {
@ -101,13 +107,16 @@ func (_m *Manager) GetTotalOfProjectMembers(ctx context.Context, projectID int64
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query, ...int) (int, error)); ok {
return rf(ctx, projectID, query, roles...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query, ...int) int); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query, ...int) int); ok {
r0 = rf(ctx, projectID, query, roles...) r0 = rf(ctx, projectID, query, roles...)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query, ...int) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query, ...int) error); ok {
r1 = rf(ctx, projectID, query, roles...) r1 = rf(ctx, projectID, query, roles...)
} else { } else {
@ -122,6 +131,10 @@ func (_m *Manager) List(ctx context.Context, queryMember models.Member, query *q
ret := _m.Called(ctx, queryMember, query) ret := _m.Called(ctx, queryMember, query)
var r0 []*models.Member var r0 []*models.Member
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, models.Member, *q.Query) ([]*models.Member, error)); ok {
return rf(ctx, queryMember, query)
}
if rf, ok := ret.Get(0).(func(context.Context, models.Member, *q.Query) []*models.Member); ok { if rf, ok := ret.Get(0).(func(context.Context, models.Member, *q.Query) []*models.Member); ok {
r0 = rf(ctx, queryMember, query) r0 = rf(ctx, queryMember, query)
} else { } else {
@ -130,7 +143,6 @@ func (_m *Manager) List(ctx context.Context, queryMember models.Member, query *q
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.Member, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, models.Member, *q.Query) error); ok {
r1 = rf(ctx, queryMember, query) r1 = rf(ctx, queryMember, query)
} else { } else {
@ -145,6 +157,10 @@ func (_m *Manager) ListRoles(ctx context.Context, user *models.User, projectID i
ret := _m.Called(ctx, user, projectID) ret := _m.Called(ctx, user, projectID)
var r0 []int var r0 []int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.User, int64) ([]int, error)); ok {
return rf(ctx, user, projectID)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.User, int64) []int); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.User, int64) []int); ok {
r0 = rf(ctx, user, projectID) r0 = rf(ctx, user, projectID)
} else { } else {
@ -153,7 +169,6 @@ func (_m *Manager) ListRoles(ctx context.Context, user *models.User, projectID i
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.User, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.User, int64) error); ok {
r1 = rf(ctx, user, projectID) r1 = rf(ctx, user, projectID)
} else { } else {
@ -168,6 +183,10 @@ func (_m *Manager) SearchMemberByName(ctx context.Context, projectID int64, enti
ret := _m.Called(ctx, projectID, entityName) ret := _m.Called(ctx, projectID, entityName)
var r0 []*models.Member var r0 []*models.Member
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*models.Member, error)); ok {
return rf(ctx, projectID, entityName)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*models.Member); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*models.Member); ok {
r0 = rf(ctx, projectID, entityName) r0 = rf(ctx, projectID, entityName)
} else { } else {
@ -176,7 +195,6 @@ func (_m *Manager) SearchMemberByName(ctx context.Context, projectID int64, enti
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
r1 = rf(ctx, projectID, entityName) r1 = rf(ctx, projectID, entityName)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, n *model.Policy) (int64, error) {
ret := _m.Called(ctx, n) ret := _m.Called(ctx, n)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
return rf(ctx, n)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok {
r0 = rf(ctx, n) r0 = rf(ctx, n)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok {
r1 = rf(ctx, n) r1 = rf(ctx, n)
} else { } else {
@ -78,6 +84,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Policy var r0 *model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -86,7 +96,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -101,6 +110,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -109,7 +122,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package policy package policy
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.Policy) (int64, error)
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Policy var r0 *model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -100,6 +109,10 @@ func (_m *Manager) GetRelatedPolices(ctx context.Context, projectID int64, event
ret := _m.Called(ctx, projectID, eventType) ret := _m.Called(ctx, projectID, eventType)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*model.Policy, error)); ok {
return rf(ctx, projectID, eventType)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*model.Policy); ok {
r0 = rf(ctx, projectID, eventType) r0 = rf(ctx, projectID, eventType)
} else { } else {
@ -108,7 +121,6 @@ func (_m *Manager) GetRelatedPolices(ctx context.Context, projectID int64, event
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
r1 = rf(ctx, projectID, eventType) r1 = rf(ctx, projectID, eventType)
} else { } else {
@ -123,6 +135,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -131,7 +147,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *MetaDAO) Create(ctx context.Context, oidcUser *models.OIDCUser) (int,
ret := _m.Called(ctx, oidcUser) ret := _m.Called(ctx, oidcUser)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) (int, error)); ok {
return rf(ctx, oidcUser)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) int); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) int); ok {
r0 = rf(ctx, oidcUser) r0 = rf(ctx, oidcUser)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.OIDCUser) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.OIDCUser) error); ok {
r1 = rf(ctx, oidcUser) r1 = rf(ctx, oidcUser)
} else { } else {
@ -57,6 +60,10 @@ func (_m *MetaDAO) GetByUsername(ctx context.Context, username string) (*models.
ret := _m.Called(ctx, username) ret := _m.Called(ctx, username)
var r0 *models.OIDCUser var r0 *models.OIDCUser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.OIDCUser, error)); ok {
return rf(ctx, username)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *models.OIDCUser); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *models.OIDCUser); ok {
r0 = rf(ctx, username) r0 = rf(ctx, username)
} else { } else {
@ -65,7 +72,6 @@ func (_m *MetaDAO) GetByUsername(ctx context.Context, username string) (*models.
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, username) r1 = rf(ctx, username)
} else { } else {
@ -80,6 +86,10 @@ func (_m *MetaDAO) List(ctx context.Context, query *q.Query) ([]*models.OIDCUser
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*models.OIDCUser var r0 []*models.OIDCUser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.OIDCUser, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.OIDCUser); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.OIDCUser); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -88,7 +98,6 @@ func (_m *MetaDAO) List(ctx context.Context, query *q.Query) ([]*models.OIDCUser
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package oidc package oidc
@ -19,13 +19,16 @@ func (_m *MetaManager) Create(ctx context.Context, oidcUser *models.OIDCUser) (i
ret := _m.Called(ctx, oidcUser) ret := _m.Called(ctx, oidcUser)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) (int, error)); ok {
return rf(ctx, oidcUser)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) int); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) int); ok {
r0 = rf(ctx, oidcUser) r0 = rf(ctx, oidcUser)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.OIDCUser) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.OIDCUser) error); ok {
r1 = rf(ctx, oidcUser) r1 = rf(ctx, oidcUser)
} else { } else {
@ -54,6 +57,10 @@ func (_m *MetaManager) GetBySubIss(ctx context.Context, sub string, iss string)
ret := _m.Called(ctx, sub, iss) ret := _m.Called(ctx, sub, iss)
var r0 *models.OIDCUser var r0 *models.OIDCUser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.OIDCUser, error)); ok {
return rf(ctx, sub, iss)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.OIDCUser); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.OIDCUser); ok {
r0 = rf(ctx, sub, iss) r0 = rf(ctx, sub, iss)
} else { } else {
@ -62,7 +69,6 @@ func (_m *MetaManager) GetBySubIss(ctx context.Context, sub string, iss string)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, sub, iss) r1 = rf(ctx, sub, iss)
} else { } else {
@ -77,6 +83,10 @@ func (_m *MetaManager) GetByUserID(ctx context.Context, uid int) (*models.OIDCUs
ret := _m.Called(ctx, uid) ret := _m.Called(ctx, uid)
var r0 *models.OIDCUser var r0 *models.OIDCUser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int) (*models.OIDCUser, error)); ok {
return rf(ctx, uid)
}
if rf, ok := ret.Get(0).(func(context.Context, int) *models.OIDCUser); ok { if rf, ok := ret.Get(0).(func(context.Context, int) *models.OIDCUser); ok {
r0 = rf(ctx, uid) r0 = rf(ctx, uid)
} else { } else {
@ -85,7 +95,6 @@ func (_m *MetaManager) GetByUserID(ctx context.Context, uid int) (*models.OIDCUs
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
r1 = rf(ctx, uid) r1 = rf(ctx, uid)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package project package project
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *models.Project) (int64, erro
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.Project) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.Project) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.Project) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, idOrName interface{}) (*models.Proje
ret := _m.Called(ctx, idOrName) ret := _m.Called(ctx, idOrName)
var r0 *models.Project var r0 *models.Project
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, interface{}) (*models.Project, error)); ok {
return rf(ctx, idOrName)
}
if rf, ok := ret.Get(0).(func(context.Context, interface{}) *models.Project); ok { if rf, ok := ret.Get(0).(func(context.Context, interface{}) *models.Project); ok {
r0 = rf(ctx, idOrName) r0 = rf(ctx, idOrName)
} else { } else {
@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, idOrName interface{}) (*models.Proje
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok {
r1 = rf(ctx, idOrName) r1 = rf(ctx, idOrName)
} else { } else {
@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Project,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*models.Project var r0 []*models.Project
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Project, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Project); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Project); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Project,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -130,6 +142,10 @@ func (_m *Manager) ListRoles(ctx context.Context, projectID int64, userID int, g
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 []int var r0 []int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int, ...int) ([]int, error)); ok {
return rf(ctx, projectID, userID, groupIDs...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, int, ...int) []int); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, int, ...int) []int); ok {
r0 = rf(ctx, projectID, userID, groupIDs...) r0 = rf(ctx, projectID, userID, groupIDs...)
} else { } else {
@ -138,7 +154,6 @@ func (_m *Manager) ListRoles(ctx context.Context, projectID int64, userID int, g
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, int, ...int) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, int, ...int) error); ok {
r1 = rf(ctx, projectID, userID, groupIDs...) r1 = rf(ctx, projectID, userID, groupIDs...)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package metadata package metadata
@ -62,6 +62,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, meta ...string) (ma
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 map[string]string var r0 map[string]string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) (map[string]string, error)); ok {
return rf(ctx, projectID, meta...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) map[string]string); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) map[string]string); ok {
r0 = rf(ctx, projectID, meta...) r0 = rf(ctx, projectID, meta...)
} else { } else {
@ -70,7 +74,6 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, meta ...string) (ma
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, ...string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, ...string) error); ok {
r1 = rf(ctx, projectID, meta...) r1 = rf(ctx, projectID, meta...)
} else { } else {
@ -85,6 +88,10 @@ func (_m *Manager) List(ctx context.Context, name string, value string) ([]*mode
ret := _m.Called(ctx, name, value) ret := _m.Called(ctx, name, value)
var r0 []*models.ProjectMetadata var r0 []*models.ProjectMetadata
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]*models.ProjectMetadata, error)); ok {
return rf(ctx, name, value)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) []*models.ProjectMetadata); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) []*models.ProjectMetadata); ok {
r0 = rf(ctx, name, value) r0 = rf(ctx, name, value)
} else { } else {
@ -93,7 +100,6 @@ func (_m *Manager) List(ctx context.Context, name string, value string) ([]*mode
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, name, value) r1 = rf(ctx, name, value)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package queuestatus package queuestatus
@ -19,6 +19,10 @@ func (_m *Manager) AllJobTypeStatus(ctx context.Context) (map[string]bool, error
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 map[string]bool var r0 map[string]bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (map[string]bool, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) map[string]bool); ok { if rf, ok := ret.Get(0).(func(context.Context) map[string]bool); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -27,7 +31,6 @@ func (_m *Manager) AllJobTypeStatus(ctx context.Context) (map[string]bool, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) CreateOrUpdate(ctx context.Context, status *model.JobQueueSta
ret := _m.Called(ctx, status) ret := _m.Called(ctx, status)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.JobQueueStatus) (int64, error)); ok {
return rf(ctx, status)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.JobQueueStatus) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.JobQueueStatus) int64); ok {
r0 = rf(ctx, status) r0 = rf(ctx, status)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.JobQueueStatus) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.JobQueueStatus) error); ok {
r1 = rf(ctx, status) r1 = rf(ctx, status)
} else { } else {
@ -63,6 +69,10 @@ func (_m *Manager) Get(ctx context.Context, jobType string) (*model.JobQueueStat
ret := _m.Called(ctx, jobType) ret := _m.Called(ctx, jobType)
var r0 *model.JobQueueStatus var r0 *model.JobQueueStatus
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.JobQueueStatus, error)); ok {
return rf(ctx, jobType)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *model.JobQueueStatus); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *model.JobQueueStatus); ok {
r0 = rf(ctx, jobType) r0 = rf(ctx, jobType)
} else { } else {
@ -71,7 +81,6 @@ func (_m *Manager) Get(ctx context.Context, jobType string) (*model.JobQueueStat
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, jobType) r1 = rf(ctx, jobType)
} else { } else {
@ -86,6 +95,10 @@ func (_m *Manager) List(ctx context.Context) ([]*model.JobQueueStatus, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 []*model.JobQueueStatus var r0 []*model.JobQueueStatus
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.JobQueueStatus, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*model.JobQueueStatus); ok { if rf, ok := ret.Get(0).(func(context.Context) []*model.JobQueueStatus); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -94,7 +107,6 @@ func (_m *Manager) List(ctx context.Context) ([]*model.JobQueueStatus, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package driver package driver
@ -21,6 +21,10 @@ func (_m *Driver) CalculateUsage(ctx context.Context, key string) (types.Resourc
ret := _m.Called(ctx, key) ret := _m.Called(ctx, key)
var r0 types.ResourceList var r0 types.ResourceList
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (types.ResourceList, error)); ok {
return rf(ctx, key)
}
if rf, ok := ret.Get(0).(func(context.Context, string) types.ResourceList); ok { if rf, ok := ret.Get(0).(func(context.Context, string) types.ResourceList); ok {
r0 = rf(ctx, key) r0 = rf(ctx, key)
} else { } else {
@ -29,7 +33,6 @@ func (_m *Driver) CalculateUsage(ctx context.Context, key string) (types.Resourc
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, key) r1 = rf(ctx, key)
} else { } else {
@ -44,13 +47,16 @@ func (_m *Driver) Enabled(ctx context.Context, key string) (bool, error) {
ret := _m.Called(ctx, key) ret := _m.Called(ctx, key)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
return rf(ctx, key)
}
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
r0 = rf(ctx, key) r0 = rf(ctx, key)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, key) r1 = rf(ctx, key)
} else { } else {
@ -81,6 +87,10 @@ func (_m *Driver) Load(ctx context.Context, key string) (driver.RefObject, error
ret := _m.Called(ctx, key) ret := _m.Called(ctx, key)
var r0 driver.RefObject var r0 driver.RefObject
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (driver.RefObject, error)); ok {
return rf(ctx, key)
}
if rf, ok := ret.Get(0).(func(context.Context, string) driver.RefObject); ok { if rf, ok := ret.Get(0).(func(context.Context, string) driver.RefObject); ok {
r0 = rf(ctx, key) r0 = rf(ctx, key)
} else { } else {
@ -89,7 +99,6 @@ func (_m *Driver) Load(ctx context.Context, key string) (driver.RefObject, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, key) r1 = rf(ctx, key)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package quota package quota
@ -23,13 +23,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -51,13 +54,16 @@ func (_m *Manager) Create(ctx context.Context, reference string, referenceID str
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) (int64, error)); ok {
return rf(ctx, reference, referenceID, hardLimits, usages...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) int64); ok {
r0 = rf(ctx, reference, referenceID, hardLimits, usages...) r0 = rf(ctx, reference, referenceID, hardLimits, usages...)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) error); ok {
r1 = rf(ctx, reference, referenceID, hardLimits, usages...) r1 = rf(ctx, reference, referenceID, hardLimits, usages...)
} else { } else {
@ -86,6 +92,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*models.Quota, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *models.Quota var r0 *models.Quota
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.Quota, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *models.Quota); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *models.Quota); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -94,7 +104,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*models.Quota, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -109,6 +118,10 @@ func (_m *Manager) GetByRef(ctx context.Context, reference string, referenceID s
ret := _m.Called(ctx, reference, referenceID) ret := _m.Called(ctx, reference, referenceID)
var r0 *models.Quota var r0 *models.Quota
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.Quota, error)); ok {
return rf(ctx, reference, referenceID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.Quota); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.Quota); ok {
r0 = rf(ctx, reference, referenceID) r0 = rf(ctx, reference, referenceID)
} else { } else {
@ -117,7 +130,6 @@ func (_m *Manager) GetByRef(ctx context.Context, reference string, referenceID s
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, reference, referenceID) r1 = rf(ctx, reference, referenceID)
} else { } else {
@ -132,6 +144,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Quota, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*models.Quota var r0 []*models.Quota
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Quota, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Quota); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Quota); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -140,7 +156,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Quota, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) CreatePermission(ctx context.Context, rp *model.RolePermission) (
ret := _m.Called(ctx, rp) ret := _m.Called(ctx, rp)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) (int64, error)); ok {
return rf(ctx, rp)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) int64); ok {
r0 = rf(ctx, rp) r0 = rf(ctx, rp)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.RolePermission) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.RolePermission) error); ok {
r1 = rf(ctx, rp) r1 = rf(ctx, rp)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPolicy)
ret := _m.Called(ctx, pp) ret := _m.Called(ctx, pp)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) (int64, error)); ok {
return rf(ctx, pp)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) int64); ok {
r0 = rf(ctx, pp) r0 = rf(ctx, pp)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.PermissionPolicy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.PermissionPolicy) error); ok {
r1 = rf(ctx, pp) r1 = rf(ctx, pp)
} else { } else {
@ -106,6 +112,10 @@ func (_m *DAO) GetPermissionsByRole(ctx context.Context, roleType string, roleID
ret := _m.Called(ctx, roleType, roleID) ret := _m.Called(ctx, roleType, roleID)
var r0 []*model.UniversalRolePermission var r0 []*model.UniversalRolePermission
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*model.UniversalRolePermission, error)); ok {
return rf(ctx, roleType, roleID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*model.UniversalRolePermission); ok { if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*model.UniversalRolePermission); ok {
r0 = rf(ctx, roleType, roleID) r0 = rf(ctx, roleType, roleID)
} else { } else {
@ -114,7 +124,6 @@ func (_m *DAO) GetPermissionsByRole(ctx context.Context, roleType string, roleID
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
r1 = rf(ctx, roleType, roleID) r1 = rf(ctx, roleType, roleID)
} else { } else {
@ -129,6 +138,10 @@ func (_m *DAO) ListPermissions(ctx context.Context, query *q.Query) ([]*model.Ro
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.RolePermission var r0 []*model.RolePermission
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RolePermission, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RolePermission); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RolePermission); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -137,7 +150,6 @@ func (_m *DAO) ListPermissions(ctx context.Context, query *q.Query) ([]*model.Ro
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -152,6 +164,10 @@ func (_m *DAO) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.P
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.PermissionPolicy var r0 []*model.PermissionPolicy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.PermissionPolicy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.PermissionPolicy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.PermissionPolicy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -160,7 +176,6 @@ func (_m *DAO) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.P
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package rbac package rbac
@ -21,13 +21,16 @@ func (_m *Manager) CreatePermission(ctx context.Context, rp *model.RolePermissio
ret := _m.Called(ctx, rp) ret := _m.Called(ctx, rp)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) (int64, error)); ok {
return rf(ctx, rp)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) int64); ok {
r0 = rf(ctx, rp) r0 = rf(ctx, rp)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.RolePermission) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.RolePermission) error); ok {
r1 = rf(ctx, rp) r1 = rf(ctx, rp)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPol
ret := _m.Called(ctx, pp) ret := _m.Called(ctx, pp)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) (int64, error)); ok {
return rf(ctx, pp)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) int64); ok {
r0 = rf(ctx, pp) r0 = rf(ctx, pp)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.PermissionPolicy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.PermissionPolicy) error); ok {
r1 = rf(ctx, pp) r1 = rf(ctx, pp)
} else { } else {
@ -105,6 +111,10 @@ func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, ro
ret := _m.Called(ctx, roleType, roleID) ret := _m.Called(ctx, roleType, roleID)
var r0 []*model.UniversalRolePermission var r0 []*model.UniversalRolePermission
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*model.UniversalRolePermission, error)); ok {
return rf(ctx, roleType, roleID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*model.UniversalRolePermission); ok { if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*model.UniversalRolePermission); ok {
r0 = rf(ctx, roleType, roleID) r0 = rf(ctx, roleType, roleID)
} else { } else {
@ -113,7 +123,6 @@ func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, ro
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok {
r1 = rf(ctx, roleType, roleID) r1 = rf(ctx, roleType, roleID)
} else { } else {
@ -128,6 +137,10 @@ func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*mode
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.RolePermission var r0 []*model.RolePermission
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RolePermission, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RolePermission); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RolePermission); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -136,7 +149,6 @@ func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*mode
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -151,6 +163,10 @@ func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*mod
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.PermissionPolicy var r0 []*model.PermissionPolicy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.PermissionPolicy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.PermissionPolicy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.PermissionPolicy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -159,7 +175,6 @@ func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*mod
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package adapter package adapter
@ -17,13 +17,16 @@ func (_m *Adapter) HealthCheck() (string, error) {
ret := _m.Called() ret := _m.Called()
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func() (string, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() string); ok { if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf() r0 = rf()
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -38,6 +41,10 @@ func (_m *Adapter) Info() (*model.RegistryInfo, error) {
ret := _m.Called() ret := _m.Called()
var r0 *model.RegistryInfo var r0 *model.RegistryInfo
var r1 error
if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok { if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -46,7 +53,6 @@ func (_m *Adapter) Info() (*model.RegistryInfo, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -21,13 +21,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *DAO) Create(ctx context.Context, registry *dao.Registry) (int64, error
ret := _m.Called(ctx, registry) ret := _m.Called(ctx, registry)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry) (int64, error)); ok {
return rf(ctx, registry)
}
if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry) int64); ok {
r0 = rf(ctx, registry) r0 = rf(ctx, registry)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *dao.Registry) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *dao.Registry) error); ok {
r1 = rf(ctx, registry) r1 = rf(ctx, registry)
} else { } else {
@ -77,6 +83,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Registry, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *dao.Registry var r0 *dao.Registry
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Registry, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Registry); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Registry); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -85,7 +95,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Registry, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -100,6 +109,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Registry, error
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*dao.Registry var r0 []*dao.Registry
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Registry, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Registry); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Registry); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -108,7 +121,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Registry, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package manager package manager
@ -24,13 +24,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -45,13 +48,16 @@ func (_m *Manager) Create(ctx context.Context, registry *model.Registry) (int64,
ret := _m.Called(ctx, registry) ret := _m.Called(ctx, registry)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) (int64, error)); ok {
return rf(ctx, registry)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) int64); ok {
r0 = rf(ctx, registry) r0 = rf(ctx, registry)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Registry) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Registry) error); ok {
r1 = rf(ctx, registry) r1 = rf(ctx, registry)
} else { } else {
@ -66,6 +72,10 @@ func (_m *Manager) CreateAdapter(ctx context.Context, registry *model.Registry)
ret := _m.Called(ctx, registry) ret := _m.Called(ctx, registry)
var r0 adapter.Adapter var r0 adapter.Adapter
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) (adapter.Adapter, error)); ok {
return rf(ctx, registry)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) adapter.Adapter); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) adapter.Adapter); ok {
r0 = rf(ctx, registry) r0 = rf(ctx, registry)
} else { } else {
@ -74,7 +84,6 @@ func (_m *Manager) CreateAdapter(ctx context.Context, registry *model.Registry)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Registry) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Registry) error); ok {
r1 = rf(ctx, registry) r1 = rf(ctx, registry)
} else { } else {
@ -103,6 +112,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Registry, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Registry var r0 *model.Registry
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Registry, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Registry); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Registry); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -111,7 +124,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Registry, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -126,6 +138,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Registry,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Registry var r0 []*model.Registry
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Registry, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Registry); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Registry); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -134,7 +150,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Registry,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -149,6 +164,10 @@ func (_m *Manager) ListRegistryProviderInfos(ctx context.Context) (map[string]*m
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 map[string]*model.AdapterPattern var r0 map[string]*model.AdapterPattern
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (map[string]*model.AdapterPattern, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) map[string]*model.AdapterPattern); ok { if rf, ok := ret.Get(0).(func(context.Context) map[string]*model.AdapterPattern); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -157,7 +176,6 @@ func (_m *Manager) ListRegistryProviderInfos(ctx context.Context) (map[string]*m
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -172,6 +190,10 @@ func (_m *Manager) ListRegistryProviderTypes(ctx context.Context) ([]string, err
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []string); ok { if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -180,7 +202,6 @@ func (_m *Manager) ListRegistryProviderTypes(ctx context.Context) ([]string, err
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package registry package registry
@ -22,13 +22,16 @@ func (_m *Client) BlobExist(repository string, digest string) (bool, error) {
ret := _m.Called(repository, digest) ret := _m.Called(repository, digest)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
return rf(repository, digest)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok { if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(repository, digest) r0 = rf(repository, digest)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok { if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(repository, digest) r1 = rf(repository, digest)
} else { } else {
@ -43,6 +46,10 @@ func (_m *Client) Catalog() ([]string, error) {
ret := _m.Called() ret := _m.Called()
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func() ([]string, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []string); ok { if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -51,7 +58,6 @@ func (_m *Client) Catalog() ([]string, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -108,6 +114,10 @@ func (_m *Client) Do(req *http.Request) (*http.Response, error) {
ret := _m.Called(req) ret := _m.Called(req)
var r0 *http.Response var r0 *http.Response
var r1 error
if rf, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok {
return rf(req)
}
if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok { if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
r0 = rf(req) r0 = rf(req)
} else { } else {
@ -116,7 +126,6 @@ func (_m *Client) Do(req *http.Request) (*http.Response, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(*http.Request) error); ok { if rf, ok := ret.Get(1).(func(*http.Request) error); ok {
r1 = rf(req) r1 = rf(req)
} else { } else {
@ -131,6 +140,10 @@ func (_m *Client) ListTags(repository string) ([]string, error) {
ret := _m.Called(repository) ret := _m.Called(repository)
var r0 []string var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
return rf(repository)
}
if rf, ok := ret.Get(0).(func(string) []string); ok { if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(repository) r0 = rf(repository)
} else { } else {
@ -139,7 +152,6 @@ func (_m *Client) ListTags(repository string) ([]string, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repository) r1 = rf(repository)
} else { } else {
@ -154,13 +166,17 @@ func (_m *Client) ManifestExist(repository string, reference string) (bool, *dis
ret := _m.Called(repository, reference) ret := _m.Called(repository, reference)
var r0 bool var r0 bool
var r1 *distribution.Descriptor
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (bool, *distribution.Descriptor, error)); ok {
return rf(repository, reference)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok { if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(repository, reference) r0 = rf(repository, reference)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 *distribution.Descriptor
if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok { if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok {
r1 = rf(repository, reference) r1 = rf(repository, reference)
} else { } else {
@ -169,7 +185,6 @@ func (_m *Client) ManifestExist(repository string, reference string) (bool, *dis
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repository, reference) r2 = rf(repository, reference)
} else { } else {
@ -212,13 +227,17 @@ func (_m *Client) PullBlob(repository string, digest string) (int64, io.ReadClos
ret := _m.Called(repository, digest) ret := _m.Called(repository, digest)
var r0 int64 var r0 int64
var r1 io.ReadCloser
var r2 error
if rf, ok := ret.Get(0).(func(string, string) (int64, io.ReadCloser, error)); ok {
return rf(repository, digest)
}
if rf, ok := ret.Get(0).(func(string, string) int64); ok { if rf, ok := ret.Get(0).(func(string, string) int64); ok {
r0 = rf(repository, digest) r0 = rf(repository, digest)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 io.ReadCloser
if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok { if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok {
r1 = rf(repository, digest) r1 = rf(repository, digest)
} else { } else {
@ -227,7 +246,6 @@ func (_m *Client) PullBlob(repository string, digest string) (int64, io.ReadClos
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok { if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(repository, digest) r2 = rf(repository, digest)
} else { } else {
@ -242,13 +260,17 @@ func (_m *Client) PullBlobChunk(repository string, digest string, blobSize int64
ret := _m.Called(repository, digest, blobSize, start, end) ret := _m.Called(repository, digest, blobSize, start, end)
var r0 int64 var r0 int64
var r1 io.ReadCloser
var r2 error
if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) (int64, io.ReadCloser, error)); ok {
return rf(repository, digest, blobSize, start, end)
}
if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) int64); ok { if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) int64); ok {
r0 = rf(repository, digest, blobSize, start, end) r0 = rf(repository, digest, blobSize, start, end)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 io.ReadCloser
if rf, ok := ret.Get(1).(func(string, string, int64, int64, int64) io.ReadCloser); ok { if rf, ok := ret.Get(1).(func(string, string, int64, int64, int64) io.ReadCloser); ok {
r1 = rf(repository, digest, blobSize, start, end) r1 = rf(repository, digest, blobSize, start, end)
} else { } else {
@ -257,7 +279,6 @@ func (_m *Client) PullBlobChunk(repository string, digest string, blobSize int64
} }
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string, int64, int64, int64) error); ok { if rf, ok := ret.Get(2).(func(string, string, int64, int64, int64) error); ok {
r2 = rf(repository, digest, blobSize, start, end) r2 = rf(repository, digest, blobSize, start, end)
} else { } else {
@ -279,6 +300,11 @@ func (_m *Client) PullManifest(repository string, reference string, acceptedMedi
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 distribution.Manifest var r0 distribution.Manifest
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string, string, ...string) (distribution.Manifest, string, error)); ok {
return rf(repository, reference, acceptedMediaTypes...)
}
if rf, ok := ret.Get(0).(func(string, string, ...string) distribution.Manifest); ok { if rf, ok := ret.Get(0).(func(string, string, ...string) distribution.Manifest); ok {
r0 = rf(repository, reference, acceptedMediaTypes...) r0 = rf(repository, reference, acceptedMediaTypes...)
} else { } else {
@ -287,14 +313,12 @@ func (_m *Client) PullManifest(repository string, reference string, acceptedMedi
} }
} }
var r1 string
if rf, ok := ret.Get(1).(func(string, string, ...string) string); ok { if rf, ok := ret.Get(1).(func(string, string, ...string) string); ok {
r1 = rf(repository, reference, acceptedMediaTypes...) r1 = rf(repository, reference, acceptedMediaTypes...)
} else { } else {
r1 = ret.Get(1).(string) r1 = ret.Get(1).(string)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string, ...string) error); ok { if rf, ok := ret.Get(2).(func(string, string, ...string) error); ok {
r2 = rf(repository, reference, acceptedMediaTypes...) r2 = rf(repository, reference, acceptedMediaTypes...)
} else { } else {
@ -323,20 +347,23 @@ func (_m *Client) PushBlobChunk(repository string, digest string, blobSize int64
ret := _m.Called(repository, digest, blobSize, chunk, start, end, location) ret := _m.Called(repository, digest, blobSize, chunk, start, end, location)
var r0 string var r0 string
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) (string, int64, error)); ok {
return rf(repository, digest, blobSize, chunk, start, end, location)
}
if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) string); ok { if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) string); ok {
r0 = rf(repository, digest, blobSize, chunk, start, end, location) r0 = rf(repository, digest, blobSize, chunk, start, end, location)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 int64
if rf, ok := ret.Get(1).(func(string, string, int64, io.Reader, int64, int64, string) int64); ok { if rf, ok := ret.Get(1).(func(string, string, int64, io.Reader, int64, int64, string) int64); ok {
r1 = rf(repository, digest, blobSize, chunk, start, end, location) r1 = rf(repository, digest, blobSize, chunk, start, end, location)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(string, string, int64, io.Reader, int64, int64, string) error); ok { if rf, ok := ret.Get(2).(func(string, string, int64, io.Reader, int64, int64, string) error); ok {
r2 = rf(repository, digest, blobSize, chunk, start, end, location) r2 = rf(repository, digest, blobSize, chunk, start, end, location)
} else { } else {
@ -351,13 +378,16 @@ func (_m *Client) PushManifest(repository string, reference string, mediaType st
ret := _m.Called(repository, reference, mediaType, payload) ret := _m.Called(repository, reference, mediaType, payload)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string, []byte) (string, error)); ok {
return rf(repository, reference, mediaType, payload)
}
if rf, ok := ret.Get(0).(func(string, string, string, []byte) string); ok { if rf, ok := ret.Get(0).(func(string, string, string, []byte) string); ok {
r0 = rf(repository, reference, mediaType, payload) r0 = rf(repository, reference, mediaType, payload)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string, []byte) error); ok { if rf, ok := ret.Get(1).(func(string, string, string, []byte) error); ok {
r1 = rf(repository, reference, mediaType, payload) r1 = rf(repository, reference, mediaType, payload)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, policy *model.Policy) (int64, error)
ret := _m.Called(ctx, policy) ret := _m.Called(ctx, policy)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
return rf(ctx, policy)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok {
r0 = rf(ctx, policy) r0 = rf(ctx, policy)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok {
r1 = rf(ctx, policy) r1 = rf(ctx, policy)
} else { } else {
@ -78,6 +84,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Policy var r0 *model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -86,7 +96,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -101,6 +110,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -109,7 +122,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package manager package manager
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, policy *model.Policy) (int64, err
ret := _m.Called(ctx, policy) ret := _m.Called(ctx, policy)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
return rf(ctx, policy)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok {
r0 = rf(ctx, policy) r0 = rf(ctx, policy)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok {
r1 = rf(ctx, policy) r1 = rf(ctx, policy)
} else { } else {
@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Policy var r0 *model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Policy var r0 []*model.Policy
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -36,13 +36,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -57,13 +60,16 @@ func (_m *DAO) Create(ctx context.Context, repository *model.RepoRecord) (int64,
ret := _m.Called(ctx, repository) ret := _m.Called(ctx, repository)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) (int64, error)); ok {
return rf(ctx, repository)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) int64); ok {
r0 = rf(ctx, repository) r0 = rf(ctx, repository)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.RepoRecord) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.RepoRecord) error); ok {
r1 = rf(ctx, repository) r1 = rf(ctx, repository)
} else { } else {
@ -92,6 +98,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.RepoRecord, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.RepoRecord var r0 *model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -100,7 +110,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.RepoRecord, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -115,6 +124,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.RepoRecord var r0 []*model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -123,7 +136,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, e
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -138,6 +150,10 @@ func (_m *DAO) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 []*model.RepoRecord var r0 []*model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.RepoRecord, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context) []*model.RepoRecord); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -146,7 +162,6 @@ func (_m *DAO) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package repository package repository
@ -35,13 +35,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -56,13 +59,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.RepoRecord) (int64, er
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) (int64, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) int64); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.RepoRecord) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.RepoRecord) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -91,6 +97,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.RepoRecord, error)
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.RepoRecord var r0 *model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -99,7 +109,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.RepoRecord, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -114,6 +123,10 @@ func (_m *Manager) GetByName(ctx context.Context, name string) (*model.RepoRecor
ret := _m.Called(ctx, name) ret := _m.Called(ctx, name)
var r0 *model.RepoRecord var r0 *model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.RepoRecord, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *model.RepoRecord); ok {
r0 = rf(ctx, name) r0 = rf(ctx, name)
} else { } else {
@ -122,7 +135,6 @@ func (_m *Manager) GetByName(ctx context.Context, name string) (*model.RepoRecor
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, name) r1 = rf(ctx, name)
} else { } else {
@ -137,6 +149,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.RepoRecor
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.RepoRecord var r0 []*model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -145,7 +161,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.RepoRecor
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -160,6 +175,10 @@ func (_m *Manager) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, erro
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 []*model.RepoRecord var r0 []*model.RepoRecord
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.RepoRecord, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*model.RepoRecord); ok { if rf, ok := ret.Get(0).(func(context.Context) []*model.RepoRecord); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -168,7 +187,6 @@ func (_m *Manager) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, erro
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, r *model.Robot) (int64, error) {
ret := _m.Called(ctx, r) ret := _m.Called(ctx, r)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) (int64, error)); ok {
return rf(ctx, r)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) int64); ok {
r0 = rf(ctx, r) r0 = rf(ctx, r)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Robot) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Robot) error); ok {
r1 = rf(ctx, r) r1 = rf(ctx, r)
} else { } else {
@ -92,6 +98,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Robot, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Robot var r0 *model.Robot
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Robot, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Robot); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Robot); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -100,7 +110,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Robot, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -115,6 +124,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Robot, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Robot var r0 []*model.Robot
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Robot, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Robot); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Robot); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -123,7 +136,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Robot, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package robot package robot
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, m *model.Robot) (int64, error) {
ret := _m.Called(ctx, m) ret := _m.Called(ctx, m)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) (int64, error)); ok {
return rf(ctx, m)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) int64); ok {
r0 = rf(ctx, m) r0 = rf(ctx, m)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.Robot) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.Robot) error); ok {
r1 = rf(ctx, m) r1 = rf(ctx, m)
} else { } else {
@ -91,6 +97,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Robot, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.Robot var r0 *model.Robot
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Robot, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Robot); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Robot); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -99,7 +109,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Robot, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -114,6 +123,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Robot, er
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.Robot var r0 []*model.Robot
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Robot, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Robot); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Robot); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -122,7 +135,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Robot, er
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package export package export
@ -18,13 +18,16 @@ func (_m *ArtifactDigestCalculator) Calculate(fileName string) (digest.Digest, e
ret := _m.Called(fileName) ret := _m.Called(fileName)
var r0 digest.Digest var r0 digest.Digest
var r1 error
if rf, ok := ret.Get(0).(func(string) (digest.Digest, error)); ok {
return rf(fileName)
}
if rf, ok := ret.Get(0).(func(string) digest.Digest); ok { if rf, ok := ret.Get(0).(func(string) digest.Digest); ok {
r0 = rf(fileName) r0 = rf(fileName)
} else { } else {
r0 = ret.Get(0).(digest.Digest) r0 = ret.Get(0).(digest.Digest)
} }
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok { if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(fileName) r1 = rf(fileName)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package export package export
@ -20,6 +20,10 @@ func (_m *FilterProcessor) ProcessLabelFilter(ctx context.Context, labelIDs []in
ret := _m.Called(ctx, labelIDs, arts) ret := _m.Called(ctx, labelIDs, arts)
var r0 []*artifact.Artifact var r0 []*artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, []int64, []*artifact.Artifact) ([]*artifact.Artifact, error)); ok {
return rf(ctx, labelIDs, arts)
}
if rf, ok := ret.Get(0).(func(context.Context, []int64, []*artifact.Artifact) []*artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, []int64, []*artifact.Artifact) []*artifact.Artifact); ok {
r0 = rf(ctx, labelIDs, arts) r0 = rf(ctx, labelIDs, arts)
} else { } else {
@ -28,7 +32,6 @@ func (_m *FilterProcessor) ProcessLabelFilter(ctx context.Context, labelIDs []in
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, []int64, []*artifact.Artifact) error); ok { if rf, ok := ret.Get(1).(func(context.Context, []int64, []*artifact.Artifact) error); ok {
r1 = rf(ctx, labelIDs, arts) r1 = rf(ctx, labelIDs, arts)
} else { } else {
@ -43,6 +46,10 @@ func (_m *FilterProcessor) ProcessRepositoryFilter(ctx context.Context, filter s
ret := _m.Called(ctx, filter, projectIds) ret := _m.Called(ctx, filter, projectIds)
var r0 []int64 var r0 []int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []int64) ([]int64, error)); ok {
return rf(ctx, filter, projectIds)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []int64) []int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, []int64) []int64); ok {
r0 = rf(ctx, filter, projectIds) r0 = rf(ctx, filter, projectIds)
} else { } else {
@ -51,7 +58,6 @@ func (_m *FilterProcessor) ProcessRepositoryFilter(ctx context.Context, filter s
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, []int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, []int64) error); ok {
r1 = rf(ctx, filter, projectIds) r1 = rf(ctx, filter, projectIds)
} else { } else {
@ -66,6 +72,10 @@ func (_m *FilterProcessor) ProcessTagFilter(ctx context.Context, filter string,
ret := _m.Called(ctx, filter, repositoryIds) ret := _m.Called(ctx, filter, repositoryIds)
var r0 []*artifact.Artifact var r0 []*artifact.Artifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []int64) ([]*artifact.Artifact, error)); ok {
return rf(ctx, filter, repositoryIds)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []int64) []*artifact.Artifact); ok { if rf, ok := ret.Get(0).(func(context.Context, string, []int64) []*artifact.Artifact); ok {
r0 = rf(ctx, filter, repositoryIds) r0 = rf(ctx, filter, repositoryIds)
} else { } else {
@ -74,7 +84,6 @@ func (_m *FilterProcessor) ProcessTagFilter(ctx context.Context, filter string,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, []int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, []int64) error); ok {
r1 = rf(ctx, filter, repositoryIds) r1 = rf(ctx, filter, repositoryIds)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package export package export
@ -19,6 +19,10 @@ func (_m *Manager) Fetch(ctx context.Context, params export.Params) ([]export.Da
ret := _m.Called(ctx, params) ret := _m.Called(ctx, params)
var r0 []export.Data var r0 []export.Data
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, export.Params) ([]export.Data, error)); ok {
return rf(ctx, params)
}
if rf, ok := ret.Get(0).(func(context.Context, export.Params) []export.Data); ok { if rf, ok := ret.Get(0).(func(context.Context, export.Params) []export.Data); ok {
r0 = rf(ctx, params) r0 = rf(ctx, params)
} else { } else {
@ -27,7 +31,6 @@ func (_m *Manager) Fetch(ctx context.Context, params export.Params) ([]export.Da
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, export.Params) error); ok { if rf, ok := ret.Get(1).(func(context.Context, export.Params) error); ok {
r1 = rf(ctx, params) r1 = rf(ctx, params)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package report package report
@ -21,13 +21,16 @@ func (_m *Manager) Create(ctx context.Context, r *scan.Report) (string, error) {
ret := _m.Called(ctx, r) ret := _m.Called(ctx, r)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *scan.Report) (string, error)); ok {
return rf(ctx, r)
}
if rf, ok := ret.Get(0).(func(context.Context, *scan.Report) string); ok { if rf, ok := ret.Get(0).(func(context.Context, *scan.Report) string); ok {
r0 = rf(ctx, r) r0 = rf(ctx, r)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *scan.Report) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *scan.Report) error); ok {
r1 = rf(ctx, r) r1 = rf(ctx, r)
} else { } else {
@ -77,6 +80,10 @@ func (_m *Manager) GetBy(ctx context.Context, digest string, registrationUUID st
ret := _m.Called(ctx, digest, registrationUUID, mimeTypes) ret := _m.Called(ctx, digest, registrationUUID, mimeTypes)
var r0 []*scan.Report var r0 []*scan.Report
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) ([]*scan.Report, error)); ok {
return rf(ctx, digest, registrationUUID, mimeTypes)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) []*scan.Report); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) []*scan.Report); ok {
r0 = rf(ctx, digest, registrationUUID, mimeTypes) r0 = rf(ctx, digest, registrationUUID, mimeTypes)
} else { } else {
@ -85,7 +92,6 @@ func (_m *Manager) GetBy(ctx context.Context, digest string, registrationUUID st
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok {
r1 = rf(ctx, digest, registrationUUID, mimeTypes) r1 = rf(ctx, digest, registrationUUID, mimeTypes)
} else { } else {
@ -100,6 +106,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*scan.Report, er
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*scan.Report var r0 []*scan.Report
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scan.Report, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scan.Report); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scan.Report); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -108,7 +118,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*scan.Report, er
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package v1 package v1
@ -17,6 +17,10 @@ func (_m *Client) GetMetadata() (*v1.ScannerAdapterMetadata, error) {
ret := _m.Called() ret := _m.Called()
var r0 *v1.ScannerAdapterMetadata var r0 *v1.ScannerAdapterMetadata
var r1 error
if rf, ok := ret.Get(0).(func() (*v1.ScannerAdapterMetadata, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *v1.ScannerAdapterMetadata); ok { if rf, ok := ret.Get(0).(func() *v1.ScannerAdapterMetadata); ok {
r0 = rf() r0 = rf()
} else { } else {
@ -25,7 +29,6 @@ func (_m *Client) GetMetadata() (*v1.ScannerAdapterMetadata, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func() error); ok { if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf() r1 = rf()
} else { } else {
@ -40,13 +43,16 @@ func (_m *Client) GetScanReport(scanRequestID string, reportMIMEType string) (st
ret := _m.Called(scanRequestID, reportMIMEType) ret := _m.Called(scanRequestID, reportMIMEType)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
return rf(scanRequestID, reportMIMEType)
}
if rf, ok := ret.Get(0).(func(string, string) string); ok { if rf, ok := ret.Get(0).(func(string, string) string); ok {
r0 = rf(scanRequestID, reportMIMEType) r0 = rf(scanRequestID, reportMIMEType)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok { if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(scanRequestID, reportMIMEType) r1 = rf(scanRequestID, reportMIMEType)
} else { } else {
@ -61,6 +67,10 @@ func (_m *Client) SubmitScan(req *v1.ScanRequest) (*v1.ScanResponse, error) {
ret := _m.Called(req) ret := _m.Called(req)
var r0 *v1.ScanResponse var r0 *v1.ScanResponse
var r1 error
if rf, ok := ret.Get(0).(func(*v1.ScanRequest) (*v1.ScanResponse, error)); ok {
return rf(req)
}
if rf, ok := ret.Get(0).(func(*v1.ScanRequest) *v1.ScanResponse); ok { if rf, ok := ret.Get(0).(func(*v1.ScanRequest) *v1.ScanResponse); ok {
r0 = rf(req) r0 = rf(req)
} else { } else {
@ -69,7 +79,6 @@ func (_m *Client) SubmitScan(req *v1.ScanRequest) (*v1.ScanResponse, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(*v1.ScanRequest) error); ok { if rf, ok := ret.Get(1).(func(*v1.ScanRequest) error); ok {
r1 = rf(req) r1 = rf(req)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package v1 package v1
@ -17,6 +17,10 @@ func (_m *ClientPool) Get(url string, authType string, accessCredential string,
ret := _m.Called(url, authType, accessCredential, skipCertVerify) ret := _m.Called(url, authType, accessCredential, skipCertVerify)
var r0 v1.Client var r0 v1.Client
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string, bool) (v1.Client, error)); ok {
return rf(url, authType, accessCredential, skipCertVerify)
}
if rf, ok := ret.Get(0).(func(string, string, string, bool) v1.Client); ok { if rf, ok := ret.Get(0).(func(string, string, string, bool) v1.Client); ok {
r0 = rf(url, authType, accessCredential, skipCertVerify) r0 = rf(url, authType, accessCredential, skipCertVerify)
} else { } else {
@ -25,7 +29,6 @@ func (_m *ClientPool) Get(url string, authType string, accessCredential string,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok { if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok {
r1 = rf(url, authType, accessCredential, skipCertVerify) r1 = rf(url, authType, accessCredential, skipCertVerify)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package v1 package v1

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package v1 package v1
@ -18,6 +18,10 @@ func (_m *responseHandler) Execute(code int, resp *http.Response) ([]byte, error
ret := _m.Called(code, resp) ret := _m.Called(code, resp)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(int, *http.Response) ([]byte, error)); ok {
return rf(code, resp)
}
if rf, ok := ret.Get(0).(func(int, *http.Response) []byte); ok { if rf, ok := ret.Get(0).(func(int, *http.Response) []byte); ok {
r0 = rf(code, resp) r0 = rf(code, resp)
} else { } else {
@ -26,7 +30,6 @@ func (_m *responseHandler) Execute(code int, resp *http.Response) ([]byte, error
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(int, *http.Response) error); ok { if rf, ok := ret.Get(1).(func(int, *http.Response) error); ok {
r1 = rf(code, resp) r1 = rf(code, resp)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scanner package scanner
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, registration *daoscanner.Registra
ret := _m.Called(ctx, registration) ret := _m.Called(ctx, registration)
var r0 string var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) (string, error)); ok {
return rf(ctx, registration)
}
if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) string); ok { if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) string); ok {
r0 = rf(ctx, registration) r0 = rf(ctx, registration)
} else { } else {
r0 = ret.Get(0).(string) r0 = ret.Get(0).(string)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *daoscanner.Registration) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *daoscanner.Registration) error); ok {
r1 = rf(ctx, registration) r1 = rf(ctx, registration)
} else { } else {
@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, registrationUUID string) (*daoscanne
ret := _m.Called(ctx, registrationUUID) ret := _m.Called(ctx, registrationUUID)
var r0 *daoscanner.Registration var r0 *daoscanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*daoscanner.Registration, error)); ok {
return rf(ctx, registrationUUID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *daoscanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *daoscanner.Registration); ok {
r0 = rf(ctx, registrationUUID) r0 = rf(ctx, registrationUUID)
} else { } else {
@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, registrationUUID string) (*daoscanne
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, registrationUUID) r1 = rf(ctx, registrationUUID)
} else { } else {
@ -100,6 +109,10 @@ func (_m *Manager) GetDefault(ctx context.Context) (*daoscanner.Registration, er
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 *daoscanner.Registration var r0 *daoscanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*daoscanner.Registration, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *daoscanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context) *daoscanner.Registration); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -108,7 +121,6 @@ func (_m *Manager) GetDefault(ctx context.Context) (*daoscanner.Registration, er
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -123,6 +135,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*daoscanner.Regi
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*daoscanner.Registration var r0 []*daoscanner.Registration
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*daoscanner.Registration, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*daoscanner.Registration); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*daoscanner.Registration); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -131,7 +147,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*daoscanner.Regi
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package scheduler package scheduler
@ -21,13 +21,16 @@ func (_m *Scheduler) CountSchedules(ctx context.Context, query *q.Query) (int64,
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,6 +45,10 @@ func (_m *Scheduler) GetSchedule(ctx context.Context, id int64) (*scheduler.Sche
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *scheduler.Schedule var r0 *scheduler.Schedule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*scheduler.Schedule, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *scheduler.Schedule); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *scheduler.Schedule); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -50,7 +57,6 @@ func (_m *Scheduler) GetSchedule(ctx context.Context, id int64) (*scheduler.Sche
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -65,6 +71,10 @@ func (_m *Scheduler) ListSchedules(ctx context.Context, query *q.Query) ([]*sche
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*scheduler.Schedule var r0 []*scheduler.Schedule
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scheduler.Schedule, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scheduler.Schedule); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scheduler.Schedule); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -73,7 +83,6 @@ func (_m *Scheduler) ListSchedules(ctx context.Context, query *q.Query) ([]*sche
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -88,13 +97,16 @@ func (_m *Scheduler) Schedule(ctx context.Context, vendorType string, vendorID i
ret := _m.Called(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) ret := _m.Called(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) (int64, error)); ok {
return rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs)
}
if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) int64); ok {
r0 = rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) r0 = rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) error); ok {
r1 = rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) r1 = rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package cleanup package cleanup
@ -21,6 +21,10 @@ func (_m *Selector) List(ctx context.Context) ([]*model.SystemArtifact, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 []*model.SystemArtifact var r0 []*model.SystemArtifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.SystemArtifact, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*model.SystemArtifact); ok { if rf, ok := ret.Get(0).(func(context.Context) []*model.SystemArtifact); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
@ -29,7 +33,6 @@ func (_m *Selector) List(ctx context.Context) ([]*model.SystemArtifact, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -44,6 +47,10 @@ func (_m *Selector) ListWithFilters(ctx context.Context, query *q.Query) ([]*mod
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.SystemArtifact var r0 []*model.SystemArtifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.SystemArtifact, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.SystemArtifact); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.SystemArtifact); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -52,7 +59,6 @@ func (_m *Selector) ListWithFilters(ctx context.Context, query *q.Query) ([]*mod
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Create(ctx context.Context, systemArtifact *model.SystemArtifact)
ret := _m.Called(ctx, systemArtifact) ret := _m.Called(ctx, systemArtifact)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact) (int64, error)); ok {
return rf(ctx, systemArtifact)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact) int64); ok {
r0 = rf(ctx, systemArtifact) r0 = rf(ctx, systemArtifact)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.SystemArtifact) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.SystemArtifact) error); ok {
r1 = rf(ctx, systemArtifact) r1 = rf(ctx, systemArtifact)
} else { } else {
@ -57,6 +60,10 @@ func (_m *DAO) Get(ctx context.Context, vendor string, repository string, digest
ret := _m.Called(ctx, vendor, repository, digest) ret := _m.Called(ctx, vendor, repository, digest)
var r0 *model.SystemArtifact var r0 *model.SystemArtifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*model.SystemArtifact, error)); ok {
return rf(ctx, vendor, repository, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.SystemArtifact); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.SystemArtifact); ok {
r0 = rf(ctx, vendor, repository, digest) r0 = rf(ctx, vendor, repository, digest)
} else { } else {
@ -65,7 +72,6 @@ func (_m *DAO) Get(ctx context.Context, vendor string, repository string, digest
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
r1 = rf(ctx, vendor, repository, digest) r1 = rf(ctx, vendor, repository, digest)
} else { } else {
@ -80,6 +86,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.SystemArtifac
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.SystemArtifact var r0 []*model.SystemArtifact
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.SystemArtifact, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.SystemArtifact); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.SystemArtifact); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -88,7 +98,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.SystemArtifac
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -103,13 +112,16 @@ func (_m *DAO) Size(ctx context.Context) (int64, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) int64); ok { if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package systemartifact package systemartifact
@ -23,20 +23,23 @@ func (_m *Manager) Cleanup(ctx context.Context) (int64, int64, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 int64 var r0 int64
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(context.Context) (int64, int64, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) int64); ok { if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 int64
if rf, ok := ret.Get(1).(func(context.Context) int64); ok { if rf, ok := ret.Get(1).(func(context.Context) int64); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
r1 = ret.Get(1).(int64) r1 = ret.Get(1).(int64)
} }
var r2 error
if rf, ok := ret.Get(2).(func(context.Context) error); ok { if rf, ok := ret.Get(2).(func(context.Context) error); ok {
r2 = rf(ctx) r2 = rf(ctx)
} else { } else {
@ -51,13 +54,16 @@ func (_m *Manager) Create(ctx context.Context, artifactRecord *model.SystemArtif
ret := _m.Called(ctx, artifactRecord, reader) ret := _m.Called(ctx, artifactRecord, reader)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact, io.Reader) (int64, error)); ok {
return rf(ctx, artifactRecord, reader)
}
if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact, io.Reader) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact, io.Reader) int64); ok {
r0 = rf(ctx, artifactRecord, reader) r0 = rf(ctx, artifactRecord, reader)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *model.SystemArtifact, io.Reader) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *model.SystemArtifact, io.Reader) error); ok {
r1 = rf(ctx, artifactRecord, reader) r1 = rf(ctx, artifactRecord, reader)
} else { } else {
@ -86,13 +92,16 @@ func (_m *Manager) Exists(ctx context.Context, vendor string, repository string,
ret := _m.Called(ctx, vendor, repository, digest) ret := _m.Called(ctx, vendor, repository, digest)
var r0 bool var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (bool, error)); ok {
return rf(ctx, vendor, repository, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) bool); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, string) bool); ok {
r0 = rf(ctx, vendor, repository, digest) r0 = rf(ctx, vendor, repository, digest)
} else { } else {
r0 = ret.Get(0).(bool) r0 = ret.Get(0).(bool)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
r1 = rf(ctx, vendor, repository, digest) r1 = rf(ctx, vendor, repository, digest)
} else { } else {
@ -123,13 +132,16 @@ func (_m *Manager) GetStorageSize(ctx context.Context) (int64, error) {
ret := _m.Called(ctx) ret := _m.Called(ctx)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) int64); ok { if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(ctx) r0 = rf(ctx)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok { if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx) r1 = rf(ctx)
} else { } else {
@ -160,6 +172,10 @@ func (_m *Manager) Read(ctx context.Context, vendor string, repository string, d
ret := _m.Called(ctx, vendor, repository, digest) ret := _m.Called(ctx, vendor, repository, digest)
var r0 io.ReadCloser var r0 io.ReadCloser
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (io.ReadCloser, error)); ok {
return rf(ctx, vendor, repository, digest)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) io.ReadCloser); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string, string) io.ReadCloser); ok {
r0 = rf(ctx, vendor, repository, digest) r0 = rf(ctx, vendor, repository, digest)
} else { } else {
@ -168,7 +184,6 @@ func (_m *Manager) Read(ctx context.Context, vendor string, repository string, d
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
r1 = rf(ctx, vendor, repository, digest) r1 = rf(ctx, vendor, repository, digest)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -23,13 +23,16 @@ func (_m *ExecutionManager) Count(ctx context.Context, query *q.Query) (int64, e
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -51,13 +54,16 @@ func (_m *ExecutionManager) Create(ctx context.Context, vendorType string, vendo
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) (int64, error)); ok {
return rf(ctx, vendorType, vendorID, trigger, extraAttrs...)
}
if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) int64); ok {
r0 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...) r0 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, ...map[string]interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, ...map[string]interface{}) error); ok {
r1 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...) r1 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...)
} else { } else {
@ -100,6 +106,10 @@ func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution,
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *task.Execution var r0 *task.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Execution, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Execution); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -108,7 +118,6 @@ func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution,
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -123,6 +132,10 @@ func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.E
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*task.Execution var r0 []*task.Execution
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*task.Execution, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Execution); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Execution); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -131,7 +144,6 @@ func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.E
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package task package task
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -49,13 +52,16 @@ func (_m *Manager) Create(ctx context.Context, executionID int64, job *task.Job,
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *task.Job, ...map[string]interface{}) (int64, error)); ok {
return rf(ctx, executionID, job, extraAttrs...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *task.Job, ...map[string]interface{}) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, int64, *task.Job, ...map[string]interface{}) int64); ok {
r0 = rf(ctx, executionID, job, extraAttrs...) r0 = rf(ctx, executionID, job, extraAttrs...)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *task.Job, ...map[string]interface{}) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64, *task.Job, ...map[string]interface{}) error); ok {
r1 = rf(ctx, executionID, job, extraAttrs...) r1 = rf(ctx, executionID, job, extraAttrs...)
} else { } else {
@ -70,6 +76,10 @@ func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType
ret := _m.Called(ctx, vendorType, status) ret := _m.Called(ctx, vendorType, status)
var r0 []int64 var r0 []int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok {
return rf(ctx, vendorType, status)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok {
r0 = rf(ctx, vendorType, status) r0 = rf(ctx, vendorType, status)
} else { } else {
@ -78,7 +88,6 @@ func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, vendorType, status) r1 = rf(ctx, vendorType, status)
} else { } else {
@ -93,6 +102,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *task.Task var r0 *task.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -101,7 +114,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -116,6 +128,10 @@ func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -124,7 +140,6 @@ func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -139,6 +154,10 @@ func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, err
ret := _m.Called(ctx, jobID) ret := _m.Called(ctx, jobID)
var r0 []byte var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
return rf(ctx, jobID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
r0 = rf(ctx, jobID) r0 = rf(ctx, jobID)
} else { } else {
@ -147,7 +166,6 @@ func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, err
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, jobID) r1 = rf(ctx, jobID)
} else { } else {
@ -162,6 +180,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, erro
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*task.Task var r0 []*task.Task
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*task.Task, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Task); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Task); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -170,7 +192,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, erro
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package dao package dao
@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, user *models.User) (int, error) {
ret := _m.Called(ctx, user) ret := _m.Called(ctx, user)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *models.User) (int, error)); ok {
return rf(ctx, user)
}
if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok { if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok {
r0 = rf(ctx, user) r0 = rf(ctx, user)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok {
r1 = rf(ctx, user) r1 = rf(ctx, user)
} else { } else {
@ -78,6 +84,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*models.User, error)
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*models.User var r0 []*models.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.User, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.User); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.User); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -86,7 +96,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*models.User, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package user package user
@ -31,13 +31,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query, options ...models.
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) (int64, error)); ok {
return rf(ctx, query, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) int64); ok {
r0 = rf(ctx, query, options...) r0 = rf(ctx, query, options...)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...models.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...models.Option) error); ok {
r1 = rf(ctx, query, options...) r1 = rf(ctx, query, options...)
} else { } else {
@ -52,13 +55,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *commonmodels.User) (int, err
ret := _m.Called(ctx, _a1) ret := _m.Called(ctx, _a1)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *commonmodels.User) (int, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *commonmodels.User) int); ok { if rf, ok := ret.Get(0).(func(context.Context, *commonmodels.User) int); ok {
r0 = rf(ctx, _a1) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *commonmodels.User) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *commonmodels.User) error); ok {
r1 = rf(ctx, _a1) r1 = rf(ctx, _a1)
} else { } else {
@ -101,6 +107,10 @@ func (_m *Manager) Get(ctx context.Context, id int) (*commonmodels.User, error)
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *commonmodels.User var r0 *commonmodels.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int) (*commonmodels.User, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int) *commonmodels.User); ok { if rf, ok := ret.Get(0).(func(context.Context, int) *commonmodels.User); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -109,7 +119,6 @@ func (_m *Manager) Get(ctx context.Context, id int) (*commonmodels.User, error)
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -124,6 +133,10 @@ func (_m *Manager) GetByName(ctx context.Context, username string) (*commonmodel
ret := _m.Called(ctx, username) ret := _m.Called(ctx, username)
var r0 *commonmodels.User var r0 *commonmodels.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*commonmodels.User, error)); ok {
return rf(ctx, username)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *commonmodels.User); ok { if rf, ok := ret.Get(0).(func(context.Context, string) *commonmodels.User); ok {
r0 = rf(ctx, username) r0 = rf(ctx, username)
} else { } else {
@ -132,7 +145,6 @@ func (_m *Manager) GetByName(ctx context.Context, username string) (*commonmodel
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, username) r1 = rf(ctx, username)
} else { } else {
@ -154,6 +166,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query, options ...models.O
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
var r0 commonmodels.Users var r0 commonmodels.Users
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) (commonmodels.Users, error)); ok {
return rf(ctx, query, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) commonmodels.Users); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) commonmodels.Users); ok {
r0 = rf(ctx, query, options...) r0 = rf(ctx, query, options...)
} else { } else {
@ -162,7 +178,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query, options ...models.O
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...models.Option) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...models.Option) error); ok {
r1 = rf(ctx, query, options...) r1 = rf(ctx, query, options...)
} else { } else {
@ -177,6 +192,10 @@ func (_m *Manager) MatchLocalPassword(ctx context.Context, username string, pass
ret := _m.Called(ctx, username, password) ret := _m.Called(ctx, username, password)
var r0 *commonmodels.User var r0 *commonmodels.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*commonmodels.User, error)); ok {
return rf(ctx, username, password)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) *commonmodels.User); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) *commonmodels.User); ok {
r0 = rf(ctx, username, password) r0 = rf(ctx, username, password)
} else { } else {
@ -185,7 +204,6 @@ func (_m *Manager) MatchLocalPassword(ctx context.Context, username string, pass
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, username, password) r1 = rf(ctx, username, password)
} else { } else {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT. // Code generated by mockery v2.22.1. DO NOT EDIT.
package usergroup package usergroup
@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 int64 var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
r0 = ret.Get(0).(int64) r0 = ret.Get(0).(int64)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, userGroup model.UserGroup) (int,
ret := _m.Called(ctx, userGroup) ret := _m.Called(ctx, userGroup)
var r0 int var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, model.UserGroup) (int, error)); ok {
return rf(ctx, userGroup)
}
if rf, ok := ret.Get(0).(func(context.Context, model.UserGroup) int); ok { if rf, ok := ret.Get(0).(func(context.Context, model.UserGroup) int); ok {
r0 = rf(ctx, userGroup) r0 = rf(ctx, userGroup)
} else { } else {
r0 = ret.Get(0).(int) r0 = ret.Get(0).(int)
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, model.UserGroup) error); ok { if rf, ok := ret.Get(1).(func(context.Context, model.UserGroup) error); ok {
r1 = rf(ctx, userGroup) r1 = rf(ctx, userGroup)
} else { } else {
@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int) (*model.UserGroup, error) {
ret := _m.Called(ctx, id) ret := _m.Called(ctx, id)
var r0 *model.UserGroup var r0 *model.UserGroup
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int) (*model.UserGroup, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int) *model.UserGroup); ok { if rf, ok := ret.Get(0).(func(context.Context, int) *model.UserGroup); ok {
r0 = rf(ctx, id) r0 = rf(ctx, id)
} else { } else {
@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int) (*model.UserGroup, error) {
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
r1 = rf(ctx, id) r1 = rf(ctx, id)
} else { } else {
@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.UserGroup
ret := _m.Called(ctx, query) ret := _m.Called(ctx, query)
var r0 []*model.UserGroup var r0 []*model.UserGroup
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.UserGroup, error)); ok {
return rf(ctx, query)
}
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.UserGroup); ok { if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.UserGroup); ok {
r0 = rf(ctx, query) r0 = rf(ctx, query)
} else { } else {
@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.UserGroup
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
r1 = rf(ctx, query) r1 = rf(ctx, query)
} else { } else {
@ -137,6 +149,10 @@ func (_m *Manager) Populate(ctx context.Context, userGroups []model.UserGroup) (
ret := _m.Called(ctx, userGroups) ret := _m.Called(ctx, userGroups)
var r0 []int var r0 []int
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, []model.UserGroup) ([]int, error)); ok {
return rf(ctx, userGroups)
}
if rf, ok := ret.Get(0).(func(context.Context, []model.UserGroup) []int); ok { if rf, ok := ret.Get(0).(func(context.Context, []model.UserGroup) []int); ok {
r0 = rf(ctx, userGroups) r0 = rf(ctx, userGroups)
} else { } else {
@ -145,7 +161,6 @@ func (_m *Manager) Populate(ctx context.Context, userGroups []model.UserGroup) (
} }
} }
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, []model.UserGroup) error); ok { if rf, ok := ret.Get(1).(func(context.Context, []model.UserGroup) error); ok {
r1 = rf(ctx, userGroups) r1 = rf(ctx, userGroups)
} else { } else {