mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
update mockery to v2.42.2 (#20258)
Signed-off-by: yminer <yminer@vmware.com>
This commit is contained in:
parent
643e84cdfe
commit
e9d2f50669
2
Makefile
2
Makefile
@ -312,7 +312,7 @@ gen_apis: lint_apis
|
||||
|
||||
|
||||
MOCKERY_IMAGENAME=$(IMAGENAMESPACE)/mockery
|
||||
MOCKERY_VERSION=v2.35.4
|
||||
MOCKERY_VERSION=v2.42.2
|
||||
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) .
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package flow
|
||||
|
||||
@ -18,6 +18,10 @@ type mockFactory struct {
|
||||
func (_m *mockFactory) AdapterPattern() *model.AdapterPattern {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AdapterPattern")
|
||||
}
|
||||
|
||||
var r0 *model.AdapterPattern
|
||||
if rf, ok := ret.Get(0).(func() *model.AdapterPattern); ok {
|
||||
r0 = rf()
|
||||
@ -34,6 +38,10 @@ func (_m *mockFactory) AdapterPattern() *model.AdapterPattern {
|
||||
func (_m *mockFactory) Create(_a0 *model.Registry) (adapter.Adapter, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 adapter.Adapter
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*model.Registry) (adapter.Adapter, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package flow
|
||||
|
||||
@ -21,6 +21,10 @@ type mockAdapter struct {
|
||||
func (_m *mockAdapter) BlobExist(repository string, digest string) (bool, error) {
|
||||
ret := _m.Called(repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for BlobExist")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *mockAdapter) BlobExist(repository string, digest string) (bool, error)
|
||||
func (_m *mockAdapter) CanBeMount(digest string) (bool, string, error) {
|
||||
ret := _m.Called(digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CanBeMount")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 string
|
||||
var r2 error
|
||||
@ -76,6 +84,10 @@ func (_m *mockAdapter) CanBeMount(digest string) (bool, string, error) {
|
||||
func (_m *mockAdapter) DeleteManifest(repository string, reference string) error {
|
||||
ret := _m.Called(repository, reference)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteManifest")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(repository, reference)
|
||||
@ -90,6 +102,10 @@ func (_m *mockAdapter) DeleteManifest(repository string, reference string) error
|
||||
func (_m *mockAdapter) DeleteTag(repository string, tag string) error {
|
||||
ret := _m.Called(repository, tag)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteTag")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(repository, tag)
|
||||
@ -104,6 +120,10 @@ func (_m *mockAdapter) DeleteTag(repository string, tag string) error {
|
||||
func (_m *mockAdapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resource, error) {
|
||||
ret := _m.Called(filters)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FetchArtifacts")
|
||||
}
|
||||
|
||||
var r0 []*model.Resource
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.Filter) ([]*model.Resource, error)); ok {
|
||||
@ -130,6 +150,10 @@ func (_m *mockAdapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resourc
|
||||
func (_m *mockAdapter) HealthCheck() (string, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for HealthCheck")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
||||
@ -154,6 +178,10 @@ func (_m *mockAdapter) HealthCheck() (string, error) {
|
||||
func (_m *mockAdapter) Info() (*model.RegistryInfo, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Info")
|
||||
}
|
||||
|
||||
var r0 *model.RegistryInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok {
|
||||
@ -180,6 +208,10 @@ func (_m *mockAdapter) Info() (*model.RegistryInfo, error) {
|
||||
func (_m *mockAdapter) ListTags(repository string) ([]string, error) {
|
||||
ret := _m.Called(repository)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListTags")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
|
||||
@ -206,6 +238,10 @@ func (_m *mockAdapter) ListTags(repository string) ([]string, error) {
|
||||
func (_m *mockAdapter) ManifestExist(repository string, reference string) (bool, *distribution.Descriptor, error) {
|
||||
ret := _m.Called(repository, reference)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ManifestExist")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 *distribution.Descriptor
|
||||
var r2 error
|
||||
@ -239,6 +275,10 @@ func (_m *mockAdapter) ManifestExist(repository string, reference string) (bool,
|
||||
func (_m *mockAdapter) MountBlob(srcRepository string, digest string, dstRepository string) error {
|
||||
ret := _m.Called(srcRepository, digest, dstRepository)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for MountBlob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
||||
r0 = rf(srcRepository, digest, dstRepository)
|
||||
@ -253,6 +293,10 @@ func (_m *mockAdapter) MountBlob(srcRepository string, digest string, dstReposit
|
||||
func (_m *mockAdapter) PrepareForPush(_a0 []*model.Resource) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PrepareForPush")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.Resource) error); ok {
|
||||
r0 = rf(_a0)
|
||||
@ -267,6 +311,10 @@ func (_m *mockAdapter) PrepareForPush(_a0 []*model.Resource) error {
|
||||
func (_m *mockAdapter) PullBlob(repository string, digest string) (int64, io.ReadCloser, error) {
|
||||
ret := _m.Called(repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PullBlob")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 io.ReadCloser
|
||||
var r2 error
|
||||
@ -300,6 +348,10 @@ func (_m *mockAdapter) PullBlob(repository string, digest string) (int64, io.Rea
|
||||
func (_m *mockAdapter) PullBlobChunk(repository string, digest string, blobSize int64, start int64, end int64) (int64, io.ReadCloser, error) {
|
||||
ret := _m.Called(repository, digest, blobSize, start, end)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PullBlobChunk")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 io.ReadCloser
|
||||
var r2 error
|
||||
@ -340,6 +392,10 @@ func (_m *mockAdapter) PullManifest(repository string, reference string, acceptt
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PullManifest")
|
||||
}
|
||||
|
||||
var r0 distribution.Manifest
|
||||
var r1 string
|
||||
var r2 error
|
||||
@ -373,6 +429,10 @@ func (_m *mockAdapter) PullManifest(repository string, reference string, acceptt
|
||||
func (_m *mockAdapter) PushBlob(repository string, digest string, size int64, blob io.Reader) error {
|
||||
ret := _m.Called(repository, digest, size, blob)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PushBlob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader) error); ok {
|
||||
r0 = rf(repository, digest, size, blob)
|
||||
@ -387,6 +447,10 @@ func (_m *mockAdapter) PushBlob(repository string, digest string, size int64, bl
|
||||
func (_m *mockAdapter) PushBlobChunk(repository string, digest string, size int64, chunk io.Reader, start int64, end int64, location string) (string, int64, error) {
|
||||
ret := _m.Called(repository, digest, size, chunk, start, end, location)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PushBlobChunk")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -418,6 +482,10 @@ func (_m *mockAdapter) PushBlobChunk(repository string, digest string, size int6
|
||||
func (_m *mockAdapter) PushManifest(repository string, reference string, mediaType string, payload []byte) (string, error) {
|
||||
ret := _m.Called(repository, reference, mediaType, payload)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PushManifest")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, []byte) (string, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package replication
|
||||
|
||||
@ -21,6 +21,10 @@ type flowController struct {
|
||||
func (_m *flowController) Start(ctx context.Context, executionID int64, policy *model.Policy, resource *regmodel.Resource) error {
|
||||
ret := _m.Called(ctx, executionID, policy, resource)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Start")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *model.Policy, *regmodel.Resource) error); ok {
|
||||
r0 = rf(ctx, executionID, policy, resource)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package mgt
|
||||
|
||||
@ -18,6 +18,10 @@ type MockManager struct {
|
||||
func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) {
|
||||
ret := _m.Called(jobID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetJob")
|
||||
}
|
||||
|
||||
var r0 *job.Stats
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*job.Stats, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) {
|
||||
func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error) {
|
||||
ret := _m.Called(q)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetJobs")
|
||||
}
|
||||
|
||||
var r0 []*job.Stats
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -77,6 +85,10 @@ func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error)
|
||||
func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*job.Stats, int64, error) {
|
||||
ret := _m.Called(pID, q)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPeriodicExecution")
|
||||
}
|
||||
|
||||
var r0 []*job.Stats
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -110,6 +122,10 @@ func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*
|
||||
func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64, error) {
|
||||
ret := _m.Called(q)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetScheduledJobs")
|
||||
}
|
||||
|
||||
var r0 []*job.Stats
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -143,6 +159,10 @@ func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64
|
||||
func (_m *MockManager) SaveJob(_a0 *job.Stats) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SaveJob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(*job.Stats) error); ok {
|
||||
r0 = rf(_a0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package period
|
||||
|
||||
@ -13,6 +13,10 @@ type MockScheduler struct {
|
||||
func (_m *MockScheduler) Schedule(policy *Policy) (int64, error) {
|
||||
ret := _m.Called(policy)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Schedule")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*Policy) (int64, error)); ok {
|
||||
@ -42,6 +46,10 @@ func (_m *MockScheduler) Start() {
|
||||
func (_m *MockScheduler) UnSchedule(policyID string) error {
|
||||
ret := _m.Called(policyID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UnSchedule")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string) error); ok {
|
||||
r0 = rf(policyID)
|
||||
|
26
src/lib/cache/mock_cache_test.go
vendored
26
src/lib/cache/mock_cache_test.go
vendored
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package cache
|
||||
|
||||
@ -18,6 +18,10 @@ type mockCache struct {
|
||||
func (_m *mockCache) Contains(ctx context.Context, key string) bool {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Contains")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, key)
|
||||
@ -32,6 +36,10 @@ func (_m *mockCache) Contains(ctx context.Context, key string) bool {
|
||||
func (_m *mockCache) Delete(ctx context.Context, key string) error {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, key)
|
||||
@ -46,6 +54,10 @@ func (_m *mockCache) Delete(ctx context.Context, key string) error {
|
||||
func (_m *mockCache) Fetch(ctx context.Context, key string, value interface{}) error {
|
||||
ret := _m.Called(ctx, key, value)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Fetch")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, interface{}) error); ok {
|
||||
r0 = rf(ctx, key, value)
|
||||
@ -60,6 +72,10 @@ func (_m *mockCache) Fetch(ctx context.Context, key string, value interface{}) e
|
||||
func (_m *mockCache) Ping(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ping")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -81,6 +97,10 @@ func (_m *mockCache) Save(ctx context.Context, key string, value interface{}, ex
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Save")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, interface{}, ...time.Duration) error); ok {
|
||||
r0 = rf(ctx, key, value, expiration...)
|
||||
@ -95,6 +115,10 @@ func (_m *mockCache) Save(ctx context.Context, key string, value interface{}, ex
|
||||
func (_m *mockCache) Scan(ctx context.Context, match string) (Iterator, error) {
|
||||
ret := _m.Called(ctx, match)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Scan")
|
||||
}
|
||||
|
||||
var r0 Iterator
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (Iterator, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scheduler
|
||||
|
||||
@ -18,6 +18,10 @@ type mockDAO struct {
|
||||
func (_m *mockDAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -42,6 +46,10 @@ func (_m *mockDAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *mockDAO) Create(ctx context.Context, s *schedule) (int64, error) {
|
||||
ret := _m.Called(ctx, s)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *schedule) (int64, error)); ok {
|
||||
@ -66,6 +74,10 @@ func (_m *mockDAO) Create(ctx context.Context, s *schedule) (int64, error) {
|
||||
func (_m *mockDAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -80,6 +92,10 @@ func (_m *mockDAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *mockDAO) Get(ctx context.Context, id int64) (*schedule, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *schedule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*schedule, error)); ok {
|
||||
@ -106,6 +122,10 @@ func (_m *mockDAO) Get(ctx context.Context, id int64) (*schedule, error) {
|
||||
func (_m *mockDAO) List(ctx context.Context, query *q.Query) ([]*schedule, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*schedule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*schedule, error)); ok {
|
||||
@ -139,6 +159,10 @@ func (_m *mockDAO) Update(ctx context.Context, s *schedule, props ...string) err
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *schedule, ...string) error); ok {
|
||||
r0 = rf(ctx, s, props...)
|
||||
@ -153,6 +177,10 @@ func (_m *mockDAO) Update(ctx context.Context, s *schedule, props ...string) err
|
||||
func (_m *mockDAO) UpdateRevision(ctx context.Context, id int64, revision int64) (int64, error) {
|
||||
ret := _m.Called(ctx, id, revision)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateRevision")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (int64, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -20,6 +20,10 @@ type mockExecutionDAO struct {
|
||||
func (_m *mockExecutionDAO) AsyncRefreshStatus(ctx context.Context, id int64, vendor string) error {
|
||||
ret := _m.Called(ctx, id, vendor)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AsyncRefreshStatus")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(ctx, id, vendor)
|
||||
@ -34,6 +38,10 @@ func (_m *mockExecutionDAO) AsyncRefreshStatus(ctx context.Context, id int64, ve
|
||||
func (_m *mockExecutionDAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -58,6 +66,10 @@ func (_m *mockExecutionDAO) Count(ctx context.Context, query *q.Query) (int64, e
|
||||
func (_m *mockExecutionDAO) Create(ctx context.Context, execution *dao.Execution) (int64, error) {
|
||||
ret := _m.Called(ctx, execution)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution) (int64, error)); ok {
|
||||
@ -82,6 +94,10 @@ func (_m *mockExecutionDAO) Create(ctx context.Context, execution *dao.Execution
|
||||
func (_m *mockExecutionDAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -96,6 +112,10 @@ func (_m *mockExecutionDAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *mockExecutionDAO) Get(ctx context.Context, id int64) (*dao.Execution, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *dao.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Execution, error)); ok {
|
||||
@ -122,6 +142,10 @@ func (_m *mockExecutionDAO) Get(ctx context.Context, id int64) (*dao.Execution,
|
||||
func (_m *mockExecutionDAO) GetMetrics(ctx context.Context, id int64) (*dao.Metrics, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetMetrics")
|
||||
}
|
||||
|
||||
var r0 *dao.Metrics
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Metrics, error)); ok {
|
||||
@ -148,6 +172,10 @@ func (_m *mockExecutionDAO) GetMetrics(ctx context.Context, id int64) (*dao.Metr
|
||||
func (_m *mockExecutionDAO) List(ctx context.Context, query *q.Query) ([]*dao.Execution, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*dao.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Execution, error)); ok {
|
||||
@ -174,6 +202,10 @@ func (_m *mockExecutionDAO) List(ctx context.Context, query *q.Query) ([]*dao.Ex
|
||||
func (_m *mockExecutionDAO) RefreshStatus(ctx context.Context, id int64) (bool, string, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RefreshStatus")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 string
|
||||
var r2 error
|
||||
@ -212,6 +244,10 @@ func (_m *mockExecutionDAO) Update(ctx context.Context, execution *dao.Execution
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution, ...string) error); ok {
|
||||
r0 = rf(ctx, execution, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -18,6 +18,10 @@ type mockJobserviceClient struct {
|
||||
func (_m *mockJobserviceClient) GetExecutions(uuid string) ([]job.Stats, error) {
|
||||
ret := _m.Called(uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetExecutions")
|
||||
}
|
||||
|
||||
var r0 []job.Stats
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]job.Stats, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *mockJobserviceClient) GetExecutions(uuid string) ([]job.Stats, error)
|
||||
func (_m *mockJobserviceClient) GetJobLog(uuid string) ([]byte, error) {
|
||||
ret := _m.Called(uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetJobLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
|
||||
@ -70,6 +78,10 @@ func (_m *mockJobserviceClient) GetJobLog(uuid string) ([]byte, error) {
|
||||
func (_m *mockJobserviceClient) GetJobServiceConfig() (*job.Config, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetJobServiceConfig")
|
||||
}
|
||||
|
||||
var r0 *job.Config
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (*job.Config, error)); ok {
|
||||
@ -96,6 +108,10 @@ func (_m *mockJobserviceClient) GetJobServiceConfig() (*job.Config, error) {
|
||||
func (_m *mockJobserviceClient) PostAction(uuid string, action string) error {
|
||||
ret := _m.Called(uuid, action)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PostAction")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(uuid, action)
|
||||
@ -110,6 +126,10 @@ func (_m *mockJobserviceClient) PostAction(uuid string, action string) error {
|
||||
func (_m *mockJobserviceClient) SubmitJob(_a0 *models.JobData) (string, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SubmitJob")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*models.JobData) (string, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -17,6 +17,10 @@ type mockSweepManager struct {
|
||||
func (_m *mockSweepManager) Clean(ctx context.Context, execID []int64) error {
|
||||
ret := _m.Called(ctx, execID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Clean")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []int64) error); ok {
|
||||
r0 = rf(ctx, execID)
|
||||
@ -31,6 +35,10 @@ func (_m *mockSweepManager) Clean(ctx context.Context, execID []int64) error {
|
||||
func (_m *mockSweepManager) FixDanglingStateExecution(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FixDanglingStateExecution")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -45,6 +53,10 @@ func (_m *mockSweepManager) FixDanglingStateExecution(ctx context.Context) error
|
||||
func (_m *mockSweepManager) ListCandidates(ctx context.Context, vendorType string, retainCnt int64) ([]int64, error) {
|
||||
ret := _m.Called(ctx, vendorType, retainCnt)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListCandidates")
|
||||
}
|
||||
|
||||
var r0 []int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]int64, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -22,6 +22,10 @@ type mockTaskDAO struct {
|
||||
func (_m *mockTaskDAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -46,6 +50,10 @@ func (_m *mockTaskDAO) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *mockTaskDAO) Create(ctx context.Context, _a1 *dao.Task) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Task) (int64, error)); ok {
|
||||
@ -70,6 +78,10 @@ func (_m *mockTaskDAO) Create(ctx context.Context, _a1 *dao.Task) (int64, error)
|
||||
func (_m *mockTaskDAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -84,6 +96,10 @@ func (_m *mockTaskDAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *mockTaskDAO) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType string, status string) ([]int64, error) {
|
||||
ret := _m.Called(ctx, vendorType, status)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ExecutionIDsByVendorAndStatus")
|
||||
}
|
||||
|
||||
var r0 []int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok {
|
||||
@ -110,6 +126,10 @@ func (_m *mockTaskDAO) ExecutionIDsByVendorAndStatus(ctx context.Context, vendor
|
||||
func (_m *mockTaskDAO) Get(ctx context.Context, id int64) (*dao.Task, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *dao.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Task, error)); ok {
|
||||
@ -136,6 +156,10 @@ func (_m *mockTaskDAO) Get(ctx context.Context, id int64) (*dao.Task, error) {
|
||||
func (_m *mockTaskDAO) GetMaxEndTime(ctx context.Context, executionID int64) (time.Time, error) {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetMaxEndTime")
|
||||
}
|
||||
|
||||
var r0 time.Time
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (time.Time, error)); ok {
|
||||
@ -160,6 +184,10 @@ func (_m *mockTaskDAO) GetMaxEndTime(ctx context.Context, executionID int64) (ti
|
||||
func (_m *mockTaskDAO) List(ctx context.Context, query *q.Query) ([]*dao.Task, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*dao.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Task, error)); ok {
|
||||
@ -186,6 +214,10 @@ func (_m *mockTaskDAO) List(ctx context.Context, query *q.Query) ([]*dao.Task, e
|
||||
func (_m *mockTaskDAO) ListScanTasksByReportUUID(ctx context.Context, uuid string) ([]*dao.Task, error) {
|
||||
ret := _m.Called(ctx, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListScanTasksByReportUUID")
|
||||
}
|
||||
|
||||
var r0 []*dao.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*dao.Task, error)); ok {
|
||||
@ -212,6 +244,10 @@ func (_m *mockTaskDAO) ListScanTasksByReportUUID(ctx context.Context, uuid strin
|
||||
func (_m *mockTaskDAO) ListStatusCount(ctx context.Context, executionID int64) ([]*dao.StatusCount, error) {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListStatusCount")
|
||||
}
|
||||
|
||||
var r0 []*dao.StatusCount
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*dao.StatusCount, error)); ok {
|
||||
@ -245,6 +281,10 @@ func (_m *mockTaskDAO) Update(ctx context.Context, _a1 *dao.Task, props ...strin
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Task, ...string) error); ok {
|
||||
r0 = rf(ctx, _a1, props...)
|
||||
@ -259,6 +299,10 @@ func (_m *mockTaskDAO) Update(ctx context.Context, _a1 *dao.Task, props ...strin
|
||||
func (_m *mockTaskDAO) UpdateStatus(ctx context.Context, id int64, status string, statusRevision int64) error {
|
||||
ret := _m.Called(ctx, id, status, statusRevision)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateStatus")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string, int64) error); ok {
|
||||
r0 = rf(ctx, id, status, statusRevision)
|
||||
@ -273,6 +317,10 @@ func (_m *mockTaskDAO) UpdateStatus(ctx context.Context, id int64, status string
|
||||
func (_m *mockTaskDAO) UpdateStatusInBatch(ctx context.Context, jobIDs []string, status string, batchSize int) error {
|
||||
ret := _m.Called(ctx, jobIDs, status, batchSize)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateStatusInBatch")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, string, int) error); ok {
|
||||
r0 = rf(ctx, jobIDs, status, batchSize)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -18,6 +18,10 @@ type mockTaskManager struct {
|
||||
func (_m *mockTaskManager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -49,6 +53,10 @@ func (_m *mockTaskManager) Create(ctx context.Context, executionID int64, job *J
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *Job, ...map[string]interface{}) (int64, error)); ok {
|
||||
@ -73,6 +81,10 @@ func (_m *mockTaskManager) Create(ctx context.Context, executionID int64, job *J
|
||||
func (_m *mockTaskManager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType string, status string) ([]int64, error) {
|
||||
ret := _m.Called(ctx, vendorType, status)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ExecutionIDsByVendorAndStatus")
|
||||
}
|
||||
|
||||
var r0 []int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok {
|
||||
@ -99,6 +111,10 @@ func (_m *mockTaskManager) ExecutionIDsByVendorAndStatus(ctx context.Context, ve
|
||||
func (_m *mockTaskManager) Get(ctx context.Context, id int64) (*Task, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*Task, error)); ok {
|
||||
@ -125,6 +141,10 @@ func (_m *mockTaskManager) Get(ctx context.Context, id int64) (*Task, error) {
|
||||
func (_m *mockTaskManager) GetLog(ctx context.Context, id int64) ([]byte, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
|
||||
@ -151,6 +171,10 @@ func (_m *mockTaskManager) GetLog(ctx context.Context, id int64) ([]byte, error)
|
||||
func (_m *mockTaskManager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, error) {
|
||||
ret := _m.Called(ctx, jobID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLogByJobID")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
|
||||
@ -177,6 +201,10 @@ func (_m *mockTaskManager) GetLogByJobID(ctx context.Context, jobID string) ([]b
|
||||
func (_m *mockTaskManager) List(ctx context.Context, query *q.Query) ([]*Task, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*Task, error)); ok {
|
||||
@ -203,6 +231,10 @@ func (_m *mockTaskManager) List(ctx context.Context, query *q.Query) ([]*Task, e
|
||||
func (_m *mockTaskManager) ListScanTasksByReportUUID(ctx context.Context, uuid string) ([]*Task, error) {
|
||||
ret := _m.Called(ctx, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListScanTasksByReportUUID")
|
||||
}
|
||||
|
||||
var r0 []*Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*Task, error)); ok {
|
||||
@ -229,6 +261,10 @@ func (_m *mockTaskManager) ListScanTasksByReportUUID(ctx context.Context, uuid s
|
||||
func (_m *mockTaskManager) Stop(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -250,6 +286,10 @@ func (_m *mockTaskManager) Update(ctx context.Context, task *Task, props ...stri
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *Task, ...string) error); ok {
|
||||
r0 = rf(ctx, task, props...)
|
||||
@ -264,6 +304,10 @@ func (_m *mockTaskManager) Update(ctx context.Context, task *Task, props ...stri
|
||||
func (_m *mockTaskManager) UpdateExtraAttrs(ctx context.Context, id int64, extraAttrs map[string]interface{}) error {
|
||||
ret := _m.Called(ctx, id, extraAttrs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateExtraAttrs")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, map[string]interface{}) error); ok {
|
||||
r0 = rf(ctx, id, extraAttrs)
|
||||
@ -278,6 +322,10 @@ func (_m *mockTaskManager) UpdateExtraAttrs(ctx context.Context, id int64, extra
|
||||
func (_m *mockTaskManager) UpdateStatusInBatch(ctx context.Context, jobIDs []string, status string, batchSize int) error {
|
||||
ret := _m.Called(ctx, jobIDs, status, batchSize)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateStatusInBatch")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, string, int) error); ok {
|
||||
r0 = rf(ctx, jobIDs, status, batchSize)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package security
|
||||
|
||||
@ -19,6 +19,10 @@ type Context struct {
|
||||
func (_m *Context) Can(ctx context.Context, action types.Action, resource types.Resource) bool {
|
||||
ret := _m.Called(ctx, action, resource)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Can")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, types.Action, types.Resource) bool); ok {
|
||||
r0 = rf(ctx, action, resource)
|
||||
@ -33,6 +37,10 @@ func (_m *Context) Can(ctx context.Context, action types.Action, resource types.
|
||||
func (_m *Context) GetUsername() string {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetUsername")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
@ -47,6 +55,10 @@ func (_m *Context) GetUsername() string {
|
||||
func (_m *Context) IsAuthenticated() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsAuthenticated")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@ -61,6 +73,10 @@ func (_m *Context) IsAuthenticated() bool {
|
||||
func (_m *Context) IsSolutionUser() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsSolutionUser")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@ -75,6 +91,10 @@ func (_m *Context) IsSolutionUser() bool {
|
||||
func (_m *Context) IsSysAdmin() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsSysAdmin")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@ -89,6 +109,10 @@ func (_m *Context) IsSysAdmin() bool {
|
||||
func (_m *Context) Name() string {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Name")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package artifact
|
||||
|
||||
@ -25,6 +25,10 @@ type Controller struct {
|
||||
func (_m *Controller) AddLabel(ctx context.Context, artifactID int64, labelID int64) error {
|
||||
ret := _m.Called(ctx, artifactID, labelID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddLabel")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, artifactID, labelID)
|
||||
@ -39,6 +43,10 @@ func (_m *Controller) AddLabel(ctx context.Context, artifactID int64, labelID in
|
||||
func (_m *Controller) Copy(ctx context.Context, srcRepo string, reference string, dstRepo string) (int64, error) {
|
||||
ret := _m.Called(ctx, srcRepo, reference, dstRepo)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Copy")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (int64, error)); ok {
|
||||
@ -63,6 +71,10 @@ func (_m *Controller) Copy(ctx context.Context, srcRepo string, reference string
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -87,6 +99,10 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -101,6 +117,10 @@ func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) Ensure(ctx context.Context, repository string, digest string, option *artifact.ArtOption) (bool, int64, error) {
|
||||
ret := _m.Called(ctx, repository, digest, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ensure")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -132,6 +152,10 @@ func (_m *Controller) Ensure(ctx context.Context, repository string, digest stri
|
||||
func (_m *Controller) Get(ctx context.Context, id int64, option *artifact.Option) (*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, id, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *artifact.Option) (*artifact.Artifact, error)); ok {
|
||||
@ -158,6 +182,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *artifact.Option
|
||||
func (_m *Controller) GetAddition(ctx context.Context, artifactID int64, additionType string) (*processor.Addition, error) {
|
||||
ret := _m.Called(ctx, artifactID, additionType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetAddition")
|
||||
}
|
||||
|
||||
var r0 *processor.Addition
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*processor.Addition, error)); ok {
|
||||
@ -184,6 +212,10 @@ func (_m *Controller) GetAddition(ctx context.Context, artifactID int64, additio
|
||||
func (_m *Controller) GetByReference(ctx context.Context, repository string, reference string, option *artifact.Option) (*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, repository, reference, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByReference")
|
||||
}
|
||||
|
||||
var r0 *artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.Option) (*artifact.Artifact, error)); ok {
|
||||
@ -210,6 +242,10 @@ func (_m *Controller) GetByReference(ctx context.Context, repository string, ref
|
||||
func (_m *Controller) List(ctx context.Context, query *q.Query, option *artifact.Option) ([]*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, query, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *artifact.Option) ([]*artifact.Artifact, error)); ok {
|
||||
@ -236,6 +272,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *artifact
|
||||
func (_m *Controller) RemoveLabel(ctx context.Context, artifactID int64, labelID int64) error {
|
||||
ret := _m.Called(ctx, artifactID, labelID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RemoveLabel")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, artifactID, labelID)
|
||||
@ -250,6 +290,10 @@ func (_m *Controller) RemoveLabel(ctx context.Context, artifactID int64, labelID
|
||||
func (_m *Controller) UpdatePullTime(ctx context.Context, artifactID int64, tagID int64, _a3 time.Time) error {
|
||||
ret := _m.Called(ctx, artifactID, tagID, _a3)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdatePullTime")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, time.Time) error); ok {
|
||||
r0 = rf(ctx, artifactID, tagID, _a3)
|
||||
@ -264,6 +308,10 @@ func (_m *Controller) UpdatePullTime(ctx context.Context, artifactID int64, tagI
|
||||
func (_m *Controller) Walk(ctx context.Context, root *artifact.Artifact, walkFn func(*artifact.Artifact) error, option *artifact.Option) error {
|
||||
ret := _m.Called(ctx, root, walkFn, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Walk")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, func(*artifact.Artifact) error, *artifact.Option) error); ok {
|
||||
r0 = rf(ctx, root, walkFn, option)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package blob
|
||||
|
||||
@ -25,6 +25,10 @@ type Controller struct {
|
||||
func (_m *Controller) AssociateWithArtifact(ctx context.Context, blobDigests []string, artifactDigest string) error {
|
||||
ret := _m.Called(ctx, blobDigests, artifactDigest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AssociateWithArtifact")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, string) error); ok {
|
||||
r0 = rf(ctx, blobDigests, artifactDigest)
|
||||
@ -39,6 +43,10 @@ func (_m *Controller) AssociateWithArtifact(ctx context.Context, blobDigests []s
|
||||
func (_m *Controller) AssociateWithProjectByDigest(ctx context.Context, blobDigest string, projectID int64) error {
|
||||
ret := _m.Called(ctx, blobDigest, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AssociateWithProjectByDigest")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
||||
r0 = rf(ctx, blobDigest, projectID)
|
||||
@ -53,6 +61,10 @@ func (_m *Controller) AssociateWithProjectByDigest(ctx context.Context, blobDige
|
||||
func (_m *Controller) AssociateWithProjectByID(ctx context.Context, blobID int64, projectID int64) error {
|
||||
ret := _m.Called(ctx, blobID, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AssociateWithProjectByID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, blobID, projectID)
|
||||
@ -67,6 +79,10 @@ func (_m *Controller) AssociateWithProjectByID(ctx context.Context, blobID int64
|
||||
func (_m *Controller) CalculateTotalSize(ctx context.Context, excludeForeign bool) (int64, error) {
|
||||
ret := _m.Called(ctx, excludeForeign)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CalculateTotalSize")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, bool) (int64, error)); ok {
|
||||
@ -91,6 +107,10 @@ func (_m *Controller) CalculateTotalSize(ctx context.Context, excludeForeign boo
|
||||
func (_m *Controller) CalculateTotalSizeByProject(ctx context.Context, projectID int64, excludeForeign bool) (int64, error) {
|
||||
ret := _m.Called(ctx, projectID, excludeForeign)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CalculateTotalSizeByProject")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) (int64, error)); ok {
|
||||
@ -115,6 +135,10 @@ func (_m *Controller) CalculateTotalSizeByProject(ctx context.Context, projectID
|
||||
func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -129,6 +153,10 @@ func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) Ensure(ctx context.Context, digest string, contentType string, size int64) (int64, error) {
|
||||
ret := _m.Called(ctx, digest, contentType, size)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ensure")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (int64, error)); ok {
|
||||
@ -160,6 +188,10 @@ func (_m *Controller) Exist(ctx context.Context, digest string, options ...blob.
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Exist")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) (bool, error)); ok {
|
||||
@ -184,6 +216,10 @@ func (_m *Controller) Exist(ctx context.Context, digest string, options ...blob.
|
||||
func (_m *Controller) Fail(ctx context.Context, _a1 *models.Blob) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Fail")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
@ -198,6 +234,10 @@ func (_m *Controller) Fail(ctx context.Context, _a1 *models.Blob) error {
|
||||
func (_m *Controller) FindMissingAssociationsForProject(ctx context.Context, projectID int64, blobs []*models.Blob) ([]*models.Blob, error) {
|
||||
ret := _m.Called(ctx, projectID, blobs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FindMissingAssociationsForProject")
|
||||
}
|
||||
|
||||
var r0 []*models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) ([]*models.Blob, error)); ok {
|
||||
@ -231,6 +271,10 @@ func (_m *Controller) Get(ctx context.Context, digest string, options ...blob.Op
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) (*models.Blob, error)); ok {
|
||||
@ -257,6 +301,10 @@ func (_m *Controller) Get(ctx context.Context, digest string, options ...blob.Op
|
||||
func (_m *Controller) GetAcceptedBlobSize(ctx context.Context, sessionID string) (int64, error) {
|
||||
ret := _m.Called(ctx, sessionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetAcceptedBlobSize")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
|
||||
@ -281,6 +329,10 @@ func (_m *Controller) GetAcceptedBlobSize(ctx context.Context, sessionID string)
|
||||
func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.Blob, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Blob, error)); ok {
|
||||
@ -307,6 +359,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.Blob,
|
||||
func (_m *Controller) SetAcceptedBlobSize(ctx context.Context, sessionID string, size int64) error {
|
||||
ret := _m.Called(ctx, sessionID, size)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetAcceptedBlobSize")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
||||
r0 = rf(ctx, sessionID, size)
|
||||
@ -321,6 +377,10 @@ func (_m *Controller) SetAcceptedBlobSize(ctx context.Context, sessionID string,
|
||||
func (_m *Controller) Sync(ctx context.Context, references []distribution.Descriptor) error {
|
||||
ret := _m.Called(ctx, references)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Sync")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []distribution.Descriptor) error); ok {
|
||||
r0 = rf(ctx, references)
|
||||
@ -335,6 +395,10 @@ func (_m *Controller) Sync(ctx context.Context, references []distribution.Descri
|
||||
func (_m *Controller) Touch(ctx context.Context, _a1 *models.Blob) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Touch")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
@ -349,6 +413,10 @@ func (_m *Controller) Touch(ctx context.Context, _a1 *models.Blob) error {
|
||||
func (_m *Controller) Update(ctx context.Context, _a1 *models.Blob) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package config
|
||||
|
||||
@ -18,6 +18,10 @@ type Controller struct {
|
||||
func (_m *Controller) AllConfigs(ctx context.Context) (map[string]interface{}, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AllConfigs")
|
||||
}
|
||||
|
||||
var r0 map[string]interface{}
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (map[string]interface{}, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Controller) AllConfigs(ctx context.Context) (map[string]interface{}, e
|
||||
func (_m *Controller) ConvertForGet(ctx context.Context, cfg map[string]interface{}, internal bool) (map[string]*models.Value, error) {
|
||||
ret := _m.Called(ctx, cfg, internal)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ConvertForGet")
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -70,6 +78,10 @@ func (_m *Controller) ConvertForGet(ctx context.Context, cfg map[string]interfac
|
||||
func (_m *Controller) OverwriteConfig(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for OverwriteConfig")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -84,6 +96,10 @@ func (_m *Controller) OverwriteConfig(ctx context.Context) error {
|
||||
func (_m *Controller) UpdateUserConfigs(ctx context.Context, conf map[string]interface{}) error {
|
||||
ret := _m.Called(ctx, conf)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateUserConfigs")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}) error); ok {
|
||||
r0 = rf(ctx, conf)
|
||||
@ -98,6 +114,10 @@ func (_m *Controller) UpdateUserConfigs(ctx context.Context, conf map[string]int
|
||||
func (_m *Controller) UserConfigs(ctx context.Context) (map[string]*models.Value, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UserConfigs")
|
||||
}
|
||||
|
||||
var r0 map[string]*models.Value
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (map[string]*models.Value, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package jobservice
|
||||
|
||||
@ -21,6 +21,10 @@ type SchedulerController struct {
|
||||
func (_m *SchedulerController) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *SchedulerController) Count(ctx context.Context, query *q.Query) (int64
|
||||
func (_m *SchedulerController) Create(ctx context.Context, vendorType string, cronType string, cron string, callbackFuncName string, policy interface{}, extrasParam map[string]interface{}) (int64, error) {
|
||||
ret := _m.Called(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -69,6 +77,10 @@ func (_m *SchedulerController) Create(ctx context.Context, vendorType string, cr
|
||||
func (_m *SchedulerController) Delete(ctx context.Context, vendorType string) error {
|
||||
ret := _m.Called(ctx, vendorType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, vendorType)
|
||||
@ -83,6 +95,10 @@ func (_m *SchedulerController) Delete(ctx context.Context, vendorType string) er
|
||||
func (_m *SchedulerController) Get(ctx context.Context, vendorType string) (*scheduler.Schedule, error) {
|
||||
ret := _m.Called(ctx, vendorType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *scheduler.Schedule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*scheduler.Schedule, error)); ok {
|
||||
@ -109,6 +125,10 @@ func (_m *SchedulerController) Get(ctx context.Context, vendorType string) (*sch
|
||||
func (_m *SchedulerController) List(ctx context.Context, query *q.Query) ([]*scheduler.Schedule, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*scheduler.Schedule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scheduler.Schedule, error)); ok {
|
||||
@ -135,6 +155,10 @@ func (_m *SchedulerController) List(ctx context.Context, query *q.Query) ([]*sch
|
||||
func (_m *SchedulerController) Paused(ctx context.Context) (bool, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Paused")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package project
|
||||
|
||||
@ -25,6 +25,10 @@ type Controller struct {
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -49,6 +53,10 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *Controller) Create(ctx context.Context, _a1 *models.Project) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) (int64, error)); ok {
|
||||
@ -73,6 +81,10 @@ func (_m *Controller) Create(ctx context.Context, _a1 *models.Project) (int64, e
|
||||
func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -87,6 +99,10 @@ func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) Exists(ctx context.Context, projectIDOrName interface{}) (bool, error) {
|
||||
ret := _m.Called(ctx, projectIDOrName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Exists")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, interface{}) (bool, error)); ok {
|
||||
@ -118,6 +134,10 @@ func (_m *Controller) Get(ctx context.Context, projectIDOrName interface{}, opti
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Project
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...project.Option) (*models.Project, error)); ok {
|
||||
@ -151,6 +171,10 @@ func (_m *Controller) GetByName(ctx context.Context, projectName string, options
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByName")
|
||||
}
|
||||
|
||||
var r0 *models.Project
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, ...project.Option) (*models.Project, error)); ok {
|
||||
@ -184,6 +208,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...proje
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Project
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...project.Option) ([]*models.Project, error)); ok {
|
||||
@ -210,6 +238,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...proje
|
||||
func (_m *Controller) ListRoles(ctx context.Context, projectID int64, u *commonmodels.User) ([]int, error) {
|
||||
ret := _m.Called(ctx, projectID, u)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRoles")
|
||||
}
|
||||
|
||||
var r0 []int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *commonmodels.User) ([]int, error)); ok {
|
||||
@ -236,6 +268,10 @@ func (_m *Controller) ListRoles(ctx context.Context, projectID int64, u *commonm
|
||||
func (_m *Controller) Update(ctx context.Context, _a1 *models.Project) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package proxy
|
||||
|
||||
@ -19,6 +19,10 @@ type RemoteInterface struct {
|
||||
func (_m *RemoteInterface) BlobReader(repo string, dig string) (int64, io.ReadCloser, error) {
|
||||
ret := _m.Called(repo, dig)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for BlobReader")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 io.ReadCloser
|
||||
var r2 error
|
||||
@ -52,6 +56,10 @@ func (_m *RemoteInterface) BlobReader(repo string, dig string) (int64, io.ReadCl
|
||||
func (_m *RemoteInterface) ListTags(repo string) ([]string, error) {
|
||||
ret := _m.Called(repo)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListTags")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
|
||||
@ -78,6 +86,10 @@ func (_m *RemoteInterface) ListTags(repo string) ([]string, error) {
|
||||
func (_m *RemoteInterface) Manifest(repo string, ref string) (distribution.Manifest, string, error) {
|
||||
ret := _m.Called(repo, ref)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Manifest")
|
||||
}
|
||||
|
||||
var r0 distribution.Manifest
|
||||
var r1 string
|
||||
var r2 error
|
||||
@ -111,6 +123,10 @@ func (_m *RemoteInterface) Manifest(repo string, ref string) (distribution.Manif
|
||||
func (_m *RemoteInterface) ManifestExist(repo string, ref string) (bool, *distribution.Descriptor, error) {
|
||||
ret := _m.Called(repo, ref)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ManifestExist")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 *distribution.Descriptor
|
||||
var r2 error
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package purge
|
||||
|
||||
@ -18,6 +18,10 @@ type Controller struct {
|
||||
func (_m *Controller) Start(ctx context.Context, policy purge.JobPolicy, trigger string) (int64, error) {
|
||||
ret := _m.Called(ctx, policy, trigger)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Start")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, purge.JobPolicy, string) (int64, error)); ok {
|
||||
@ -42,6 +46,10 @@ func (_m *Controller) Start(ctx context.Context, policy purge.JobPolicy, trigger
|
||||
func (_m *Controller) Stop(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package quota
|
||||
|
||||
@ -24,6 +24,10 @@ type Controller struct {
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -55,6 +59,10 @@ func (_m *Controller) Create(ctx context.Context, reference string, referenceID
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) (int64, error)); ok {
|
||||
@ -79,6 +87,10 @@ func (_m *Controller) Create(ctx context.Context, reference string, referenceID
|
||||
func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -100,6 +112,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, options ...quota.Option
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Quota
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...quota.Option) (*models.Quota, error)); ok {
|
||||
@ -133,6 +149,10 @@ func (_m *Controller) GetByRef(ctx context.Context, reference string, referenceI
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByRef")
|
||||
}
|
||||
|
||||
var r0 *models.Quota
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) (*models.Quota, error)); ok {
|
||||
@ -159,6 +179,10 @@ func (_m *Controller) GetByRef(ctx context.Context, reference string, referenceI
|
||||
func (_m *Controller) IsEnabled(ctx context.Context, reference string, referenceID string) (bool, error) {
|
||||
ret := _m.Called(ctx, reference, referenceID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsEnabled")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
|
||||
@ -190,6 +214,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...quota
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Quota
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...quota.Option) ([]*models.Quota, error)); ok {
|
||||
@ -223,6 +251,10 @@ func (_m *Controller) Refresh(ctx context.Context, reference string, referenceID
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Refresh")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) error); ok {
|
||||
r0 = rf(ctx, reference, referenceID, options...)
|
||||
@ -237,6 +269,10 @@ func (_m *Controller) Refresh(ctx context.Context, reference string, referenceID
|
||||
func (_m *Controller) Request(ctx context.Context, reference string, referenceID string, resources types.ResourceList, f func() error) error {
|
||||
ret := _m.Called(ctx, reference, referenceID, resources, f)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Request")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, func() error) error); ok {
|
||||
r0 = rf(ctx, reference, referenceID, resources, f)
|
||||
@ -251,6 +287,10 @@ func (_m *Controller) Request(ctx context.Context, reference string, referenceID
|
||||
func (_m *Controller) Update(ctx context.Context, _a1 *models.Quota) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Quota) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package replication
|
||||
|
||||
@ -24,6 +24,10 @@ type Controller struct {
|
||||
func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (int64, error) {
|
||||
ret := _m.Called(ctx, policy)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreatePolicy")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
|
||||
@ -48,6 +52,10 @@ func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (i
|
||||
func (_m *Controller) DeletePolicy(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeletePolicy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -62,6 +70,10 @@ func (_m *Controller) DeletePolicy(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) ExecutionCount(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ExecutionCount")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -86,6 +98,10 @@ func (_m *Controller) ExecutionCount(ctx context.Context, query *q.Query) (int64
|
||||
func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*replication.Execution, error) {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetExecution")
|
||||
}
|
||||
|
||||
var r0 *replication.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*replication.Execution, error)); ok {
|
||||
@ -112,6 +128,10 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*rep
|
||||
func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPolicy")
|
||||
}
|
||||
|
||||
var r0 *model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
|
||||
@ -138,6 +158,10 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e
|
||||
func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*replication.Task, error) {
|
||||
ret := _m.Called(ctx, taskID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTask")
|
||||
}
|
||||
|
||||
var r0 *replication.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*replication.Task, error)); ok {
|
||||
@ -164,6 +188,10 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*replication.T
|
||||
func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, error) {
|
||||
ret := _m.Called(ctx, taskID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTaskLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
|
||||
@ -190,6 +218,10 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err
|
||||
func (_m *Controller) ListExecutions(ctx context.Context, query *q.Query) ([]*replication.Execution, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListExecutions")
|
||||
}
|
||||
|
||||
var r0 []*replication.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*replication.Execution, error)); ok {
|
||||
@ -216,6 +248,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, query *q.Query) ([]*re
|
||||
func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListPolicies")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
|
||||
@ -242,6 +278,10 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode
|
||||
func (_m *Controller) ListTasks(ctx context.Context, query *q.Query) ([]*replication.Task, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListTasks")
|
||||
}
|
||||
|
||||
var r0 []*replication.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*replication.Task, error)); ok {
|
||||
@ -268,6 +308,10 @@ func (_m *Controller) ListTasks(ctx context.Context, query *q.Query) ([]*replica
|
||||
func (_m *Controller) PolicyCount(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PolicyCount")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -292,6 +336,10 @@ func (_m *Controller) PolicyCount(ctx context.Context, query *q.Query) (int64, e
|
||||
func (_m *Controller) Start(ctx context.Context, policy *model.Policy, resource *regmodel.Resource, trigger string) (int64, error) {
|
||||
ret := _m.Called(ctx, policy, resource, trigger)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Start")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, *regmodel.Resource, string) (int64, error)); ok {
|
||||
@ -316,6 +364,10 @@ func (_m *Controller) Start(ctx context.Context, policy *model.Policy, resource
|
||||
func (_m *Controller) Stop(ctx context.Context, executionID int64) error {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, executionID)
|
||||
@ -330,6 +382,10 @@ func (_m *Controller) Stop(ctx context.Context, executionID int64) error {
|
||||
func (_m *Controller) TaskCount(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for TaskCount")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -361,6 +417,10 @@ func (_m *Controller) UpdatePolicy(ctx context.Context, policy *model.Policy, pr
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdatePolicy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, ...string) error); ok {
|
||||
r0 = rf(ctx, policy, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
@ -20,6 +20,10 @@ type Controller struct {
|
||||
func (_m *Controller) AddPullCount(ctx context.Context, id int64, count uint64) error {
|
||||
ret := _m.Called(ctx, id, count)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddPullCount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok {
|
||||
r0 = rf(ctx, id, count)
|
||||
@ -34,6 +38,10 @@ func (_m *Controller) AddPullCount(ctx context.Context, id int64, count uint64)
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -58,6 +66,10 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -72,6 +84,10 @@ func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) Ensure(ctx context.Context, name string) (bool, int64, error) {
|
||||
ret := _m.Called(ctx, name)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ensure")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -103,6 +119,10 @@ func (_m *Controller) Ensure(ctx context.Context, name string) (bool, int64, err
|
||||
func (_m *Controller) Get(ctx context.Context, id int64) (*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok {
|
||||
@ -129,6 +149,10 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*model.RepoRecord, err
|
||||
func (_m *Controller) GetByName(ctx context.Context, name string) (*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, name)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByName")
|
||||
}
|
||||
|
||||
var r0 *model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.RepoRecord, error)); ok {
|
||||
@ -155,6 +179,10 @@ func (_m *Controller) GetByName(ctx context.Context, name string) (*model.RepoRe
|
||||
func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok {
|
||||
@ -188,6 +216,10 @@ func (_m *Controller) Update(ctx context.Context, _a1 *model.RepoRecord, propert
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord, ...string) error); ok {
|
||||
r0 = rf(ctx, _a1, properties...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package retention
|
||||
|
||||
@ -22,6 +22,10 @@ type Controller struct {
|
||||
func (_m *Controller) CreateRetention(ctx context.Context, p *policy.Metadata) (int64, error) {
|
||||
ret := _m.Called(ctx, p)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateRetention")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) (int64, error)); ok {
|
||||
@ -46,6 +50,10 @@ func (_m *Controller) CreateRetention(ctx context.Context, p *policy.Metadata) (
|
||||
func (_m *Controller) DeleteRetention(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteRetention")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -60,6 +68,10 @@ func (_m *Controller) DeleteRetention(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) DeleteRetentionByProject(ctx context.Context, projectID int64) error {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteRetentionByProject")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, projectID)
|
||||
@ -74,6 +86,10 @@ func (_m *Controller) DeleteRetentionByProject(ctx context.Context, projectID in
|
||||
func (_m *Controller) GetRetention(ctx context.Context, id int64) (*policy.Metadata, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRetention")
|
||||
}
|
||||
|
||||
var r0 *policy.Metadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*policy.Metadata, error)); ok {
|
||||
@ -100,6 +116,10 @@ func (_m *Controller) GetRetention(ctx context.Context, id int64) (*policy.Metad
|
||||
func (_m *Controller) GetRetentionExec(ctx context.Context, eid int64) (*pkgretention.Execution, error) {
|
||||
ret := _m.Called(ctx, eid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRetentionExec")
|
||||
}
|
||||
|
||||
var r0 *pkgretention.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgretention.Execution, error)); ok {
|
||||
@ -126,6 +146,10 @@ func (_m *Controller) GetRetentionExec(ctx context.Context, eid int64) (*pkgrete
|
||||
func (_m *Controller) GetRetentionExecTask(ctx context.Context, taskID int64) (*pkgretention.Task, error) {
|
||||
ret := _m.Called(ctx, taskID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRetentionExecTask")
|
||||
}
|
||||
|
||||
var r0 *pkgretention.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgretention.Task, error)); ok {
|
||||
@ -152,6 +176,10 @@ func (_m *Controller) GetRetentionExecTask(ctx context.Context, taskID int64) (*
|
||||
func (_m *Controller) GetRetentionExecTaskLog(ctx context.Context, taskID int64) ([]byte, error) {
|
||||
ret := _m.Called(ctx, taskID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRetentionExecTaskLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
|
||||
@ -178,6 +206,10 @@ func (_m *Controller) GetRetentionExecTaskLog(ctx context.Context, taskID int64)
|
||||
func (_m *Controller) GetTotalOfRetentionExecTasks(ctx context.Context, executionID int64) (int64, error) {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTotalOfRetentionExecTasks")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok {
|
||||
@ -202,6 +234,10 @@ func (_m *Controller) GetTotalOfRetentionExecTasks(ctx context.Context, executio
|
||||
func (_m *Controller) GetTotalOfRetentionExecs(ctx context.Context, policyID int64) (int64, error) {
|
||||
ret := _m.Called(ctx, policyID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTotalOfRetentionExecs")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok {
|
||||
@ -226,6 +262,10 @@ func (_m *Controller) GetTotalOfRetentionExecs(ctx context.Context, policyID int
|
||||
func (_m *Controller) ListRetentionExecTasks(ctx context.Context, executionID int64, query *q.Query) ([]*pkgretention.Task, error) {
|
||||
ret := _m.Called(ctx, executionID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRetentionExecTasks")
|
||||
}
|
||||
|
||||
var r0 []*pkgretention.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*pkgretention.Task, error)); ok {
|
||||
@ -252,6 +292,10 @@ func (_m *Controller) ListRetentionExecTasks(ctx context.Context, executionID in
|
||||
func (_m *Controller) ListRetentionExecs(ctx context.Context, policyID int64, query *q.Query) ([]*pkgretention.Execution, error) {
|
||||
ret := _m.Called(ctx, policyID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRetentionExecs")
|
||||
}
|
||||
|
||||
var r0 []*pkgretention.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*pkgretention.Execution, error)); ok {
|
||||
@ -278,6 +322,10 @@ func (_m *Controller) ListRetentionExecs(ctx context.Context, policyID int64, qu
|
||||
func (_m *Controller) OperateRetentionExec(ctx context.Context, eid int64, action string) error {
|
||||
ret := _m.Called(ctx, eid, action)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for OperateRetentionExec")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(ctx, eid, action)
|
||||
@ -292,6 +340,10 @@ func (_m *Controller) OperateRetentionExec(ctx context.Context, eid int64, actio
|
||||
func (_m *Controller) TriggerRetentionExec(ctx context.Context, policyID int64, trigger string, dryRun bool) (int64, error) {
|
||||
ret := _m.Called(ctx, policyID, trigger, dryRun)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for TriggerRetentionExec")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string, bool) (int64, error)); ok {
|
||||
@ -316,6 +368,10 @@ func (_m *Controller) TriggerRetentionExec(ctx context.Context, policyID int64,
|
||||
func (_m *Controller) UpdateRetention(ctx context.Context, p *policy.Metadata) error {
|
||||
ret := _m.Called(ctx, p)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateRetention")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) error); ok {
|
||||
r0 = rf(ctx, p)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package robot
|
||||
|
||||
@ -20,6 +20,10 @@ type Controller struct {
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *Controller) Create(ctx context.Context, r *robot.Robot) (int64, string, error) {
|
||||
ret := _m.Called(ctx, r)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 string
|
||||
var r2 error
|
||||
@ -75,6 +83,10 @@ func (_m *Controller) Create(ctx context.Context, r *robot.Robot) (int64, string
|
||||
func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -89,6 +101,10 @@ func (_m *Controller) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Controller) Get(ctx context.Context, id int64, option *robot.Option) (*robot.Robot, error) {
|
||||
ret := _m.Called(ctx, id, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *robot.Robot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *robot.Option) (*robot.Robot, error)); ok {
|
||||
@ -115,6 +131,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *robot.Option) (
|
||||
func (_m *Controller) List(ctx context.Context, query *q.Query, option *robot.Option) ([]*robot.Robot, error) {
|
||||
ret := _m.Called(ctx, query, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*robot.Robot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *robot.Option) ([]*robot.Robot, error)); ok {
|
||||
@ -141,6 +161,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *robot.Op
|
||||
func (_m *Controller) Update(ctx context.Context, r *robot.Robot, option *robot.Option) error {
|
||||
ret := _m.Called(ctx, r, option)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *robot.Robot, *robot.Option) error); ok {
|
||||
r0 = rf(ctx, r, option)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scan
|
||||
|
||||
@ -19,6 +19,10 @@ type Checker struct {
|
||||
func (_m *Checker) IsScannable(ctx context.Context, _a1 *artifact.Artifact) (bool, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsScannable")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) (bool, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scan
|
||||
|
||||
@ -32,6 +32,10 @@ func (_m *Controller) DeleteReports(ctx context.Context, digests ...string) erro
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteReports")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, ...string) error); ok {
|
||||
r0 = rf(ctx, digests...)
|
||||
@ -46,6 +50,10 @@ func (_m *Controller) DeleteReports(ctx context.Context, digests ...string) erro
|
||||
func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mimeTypes []string) ([]*daoscan.Report, error) {
|
||||
ret := _m.Called(ctx, _a1, mimeTypes)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetReport")
|
||||
}
|
||||
|
||||
var r0 []*daoscan.Report
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) ([]*daoscan.Report, error)); ok {
|
||||
@ -72,6 +80,10 @@ func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mim
|
||||
func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uuid string) ([]byte, error) {
|
||||
ret := _m.Called(ctx, art, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetScanLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) ([]byte, error)); ok {
|
||||
@ -98,6 +110,10 @@ func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uu
|
||||
func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, mimeTypes []string) (map[string]interface{}, error) {
|
||||
ret := _m.Called(ctx, _a1, mimeTypes)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetSummary")
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -124,6 +140,10 @@ func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, mi
|
||||
func (_m *Controller) GetVulnerable(ctx context.Context, _a1 *artifact.Artifact, allowlist models.CVESet, allowlistIsExpired bool) (*scan.Vulnerable, error) {
|
||||
ret := _m.Called(ctx, _a1, allowlist, allowlistIsExpired)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetVulnerable")
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -157,6 +177,10 @@ func (_m *Controller) Scan(ctx context.Context, _a1 *artifact.Artifact, options
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Scan")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, ...scan.Option) error); ok {
|
||||
r0 = rf(ctx, _a1, options...)
|
||||
@ -171,6 +195,10 @@ func (_m *Controller) Scan(ctx context.Context, _a1 *artifact.Artifact, options
|
||||
func (_m *Controller) ScanAll(ctx context.Context, trigger string, async bool) (int64, error) {
|
||||
ret := _m.Called(ctx, trigger, async)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ScanAll")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) (int64, error)); ok {
|
||||
@ -195,6 +223,10 @@ func (_m *Controller) ScanAll(ctx context.Context, trigger string, async bool) (
|
||||
func (_m *Controller) Stop(ctx context.Context, _a1 *artifact.Artifact, capType string) error {
|
||||
ret := _m.Called(ctx, _a1, capType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) error); ok {
|
||||
r0 = rf(ctx, _a1, capType)
|
||||
@ -209,6 +241,10 @@ func (_m *Controller) Stop(ctx context.Context, _a1 *artifact.Artifact, capType
|
||||
func (_m *Controller) StopScanAll(ctx context.Context, executionID int64, async bool) error {
|
||||
ret := _m.Called(ctx, executionID, async)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for StopScanAll")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) error); ok {
|
||||
r0 = rf(ctx, executionID, async)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scandataexport
|
||||
|
||||
@ -20,6 +20,10 @@ type Controller struct {
|
||||
func (_m *Controller) DeleteExecution(ctx context.Context, executionID int64) error {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteExecution")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, executionID)
|
||||
@ -34,6 +38,10 @@ func (_m *Controller) DeleteExecution(ctx context.Context, executionID int64) er
|
||||
func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*export.Execution, error) {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetExecution")
|
||||
}
|
||||
|
||||
var r0 *export.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*export.Execution, error)); ok {
|
||||
@ -60,6 +68,10 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*exp
|
||||
func (_m *Controller) GetTask(ctx context.Context, executionID int64) (*task.Task, error) {
|
||||
ret := _m.Called(ctx, executionID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTask")
|
||||
}
|
||||
|
||||
var r0 *task.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok {
|
||||
@ -86,6 +98,10 @@ func (_m *Controller) GetTask(ctx context.Context, executionID int64) (*task.Tas
|
||||
func (_m *Controller) ListExecutions(ctx context.Context, userName string) ([]*export.Execution, error) {
|
||||
ret := _m.Called(ctx, userName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListExecutions")
|
||||
}
|
||||
|
||||
var r0 []*export.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*export.Execution, error)); ok {
|
||||
@ -112,6 +128,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, userName string) ([]*e
|
||||
func (_m *Controller) Start(ctx context.Context, criteria export.Request) (int64, error) {
|
||||
ret := _m.Called(ctx, criteria)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Start")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, export.Request) (int64, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scanner
|
||||
|
||||
@ -24,6 +24,10 @@ type Controller struct {
|
||||
func (_m *Controller) CreateRegistration(ctx context.Context, registration *scanner.Registration) (string, error) {
|
||||
ret := _m.Called(ctx, registration)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateRegistration")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) (string, error)); ok {
|
||||
@ -48,6 +52,10 @@ func (_m *Controller) CreateRegistration(ctx context.Context, registration *scan
|
||||
func (_m *Controller) DeleteRegistration(ctx context.Context, registrationUUID string) (*scanner.Registration, error) {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteRegistration")
|
||||
}
|
||||
|
||||
var r0 *scanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*scanner.Registration, error)); ok {
|
||||
@ -74,6 +82,10 @@ func (_m *Controller) DeleteRegistration(ctx context.Context, registrationUUID s
|
||||
func (_m *Controller) GetMetadata(ctx context.Context, registrationUUID string) (*v1.ScannerAdapterMetadata, error) {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetMetadata")
|
||||
}
|
||||
|
||||
var r0 *v1.ScannerAdapterMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*v1.ScannerAdapterMetadata, error)); ok {
|
||||
@ -100,6 +112,10 @@ func (_m *Controller) GetMetadata(ctx context.Context, registrationUUID string)
|
||||
func (_m *Controller) GetRegistration(ctx context.Context, registrationUUID string) (*scanner.Registration, error) {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRegistration")
|
||||
}
|
||||
|
||||
var r0 *scanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*scanner.Registration, error)); ok {
|
||||
@ -133,6 +149,10 @@ func (_m *Controller) GetRegistrationByProject(ctx context.Context, projectID in
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRegistrationByProject")
|
||||
}
|
||||
|
||||
var r0 *scanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...controllerscanner.Option) (*scanner.Registration, error)); ok {
|
||||
@ -159,6 +179,10 @@ func (_m *Controller) GetRegistrationByProject(ctx context.Context, projectID in
|
||||
func (_m *Controller) GetTotalOfRegistrations(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTotalOfRegistrations")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -183,6 +207,10 @@ func (_m *Controller) GetTotalOfRegistrations(ctx context.Context, query *q.Quer
|
||||
func (_m *Controller) ListRegistrations(ctx context.Context, query *q.Query) ([]*scanner.Registration, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRegistrations")
|
||||
}
|
||||
|
||||
var r0 []*scanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scanner.Registration, error)); ok {
|
||||
@ -209,6 +237,10 @@ func (_m *Controller) ListRegistrations(ctx context.Context, query *q.Query) ([]
|
||||
func (_m *Controller) Ping(ctx context.Context, registration *scanner.Registration) (*v1.ScannerAdapterMetadata, error) {
|
||||
ret := _m.Called(ctx, registration)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ping")
|
||||
}
|
||||
|
||||
var r0 *v1.ScannerAdapterMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) (*v1.ScannerAdapterMetadata, error)); ok {
|
||||
@ -235,6 +267,10 @@ func (_m *Controller) Ping(ctx context.Context, registration *scanner.Registrati
|
||||
func (_m *Controller) RegistrationExists(ctx context.Context, registrationUUID string) bool {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RegistrationExists")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, registrationUUID)
|
||||
@ -249,6 +285,10 @@ func (_m *Controller) RegistrationExists(ctx context.Context, registrationUUID s
|
||||
func (_m *Controller) SetDefaultRegistration(ctx context.Context, registrationUUID string) error {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetDefaultRegistration")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, registrationUUID)
|
||||
@ -263,6 +303,10 @@ func (_m *Controller) SetDefaultRegistration(ctx context.Context, registrationUU
|
||||
func (_m *Controller) SetRegistrationByProject(ctx context.Context, projectID int64, scannerID string) error {
|
||||
ret := _m.Called(ctx, projectID, scannerID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetRegistrationByProject")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(ctx, projectID, scannerID)
|
||||
@ -277,6 +321,10 @@ func (_m *Controller) SetRegistrationByProject(ctx context.Context, projectID in
|
||||
func (_m *Controller) UpdateRegistration(ctx context.Context, registration *scanner.Registration) error {
|
||||
ret := _m.Called(ctx, registration)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateRegistration")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) error); ok {
|
||||
r0 = rf(ctx, registration)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package securityhub
|
||||
|
||||
@ -22,6 +22,10 @@ type Controller struct {
|
||||
func (_m *Controller) CountVuls(ctx context.Context, scannerUUID string, projectID int64, tuneCount bool, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, tuneCount, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CountVuls")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, bool, *q.Query) (int64, error)); ok {
|
||||
@ -46,6 +50,10 @@ func (_m *Controller) CountVuls(ctx context.Context, scannerUUID string, project
|
||||
func (_m *Controller) ListVuls(ctx context.Context, scannerUUID string, projectID int64, withTag bool, query *q.Query) ([]*model.VulnerabilityItem, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, withTag, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListVuls")
|
||||
}
|
||||
|
||||
var r0 []*model.VulnerabilityItem
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, bool, *q.Query) ([]*model.VulnerabilityItem, error)); ok {
|
||||
@ -79,6 +87,10 @@ func (_m *Controller) SecuritySummary(ctx context.Context, projectID int64, opti
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SecuritySummary")
|
||||
}
|
||||
|
||||
var r0 *model.Summary
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...securityhub.Option) (*model.Summary, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package systemartifact
|
||||
|
||||
@ -17,6 +17,10 @@ type Controller struct {
|
||||
func (_m *Controller) Start(ctx context.Context, async bool, trigger string) error {
|
||||
ret := _m.Called(ctx, async, trigger)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Start")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, bool, string) error); ok {
|
||||
r0 = rf(ctx, async, trigger)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -20,6 +20,10 @@ type Controller struct {
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *Controller) Get(ctx context.Context, id int64) (*pkgtask.Task, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *pkgtask.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgtask.Task, error)); ok {
|
||||
@ -70,6 +78,10 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*pkgtask.Task, error)
|
||||
func (_m *Controller) GetLog(ctx context.Context, id int64) ([]byte, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
|
||||
@ -96,6 +108,10 @@ func (_m *Controller) GetLog(ctx context.Context, id int64) ([]byte, error) {
|
||||
func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*pkgtask.Task, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*pkgtask.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*pkgtask.Task, error)); ok {
|
||||
@ -122,6 +138,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*pkgtask.Task
|
||||
func (_m *Controller) Stop(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -20,6 +20,10 @@ type ExecutionController struct {
|
||||
func (_m *ExecutionController) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *ExecutionController) Count(ctx context.Context, query *q.Query) (int64
|
||||
func (_m *ExecutionController) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -58,6 +66,10 @@ func (_m *ExecutionController) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *ExecutionController) Get(ctx context.Context, id int64) (*pkgtask.Execution, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *pkgtask.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgtask.Execution, error)); ok {
|
||||
@ -84,6 +96,10 @@ func (_m *ExecutionController) Get(ctx context.Context, id int64) (*pkgtask.Exec
|
||||
func (_m *ExecutionController) List(ctx context.Context, query *q.Query) ([]*pkgtask.Execution, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*pkgtask.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*pkgtask.Execution, error)); ok {
|
||||
@ -110,6 +126,10 @@ func (_m *ExecutionController) List(ctx context.Context, query *q.Query) ([]*pkg
|
||||
func (_m *ExecutionController) Stop(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package user
|
||||
|
||||
@ -24,6 +24,10 @@ type Controller struct {
|
||||
func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -48,6 +52,10 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error)
|
||||
func (_m *Controller) Create(ctx context.Context, u *models.User) (int, error) {
|
||||
ret := _m.Called(ctx, u)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.User) (int, error)); ok {
|
||||
@ -72,6 +80,10 @@ func (_m *Controller) Create(ctx context.Context, u *models.User) (int, error) {
|
||||
func (_m *Controller) Delete(ctx context.Context, id int) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -86,6 +98,10 @@ func (_m *Controller) Delete(ctx context.Context, id int) error {
|
||||
func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*models.User, error) {
|
||||
ret := _m.Called(ctx, id, opt)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) (*models.User, error)); ok {
|
||||
@ -112,6 +128,10 @@ func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*model
|
||||
func (_m *Controller) GetByName(ctx context.Context, username string) (*models.User, error) {
|
||||
ret := _m.Called(ctx, username)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByName")
|
||||
}
|
||||
|
||||
var r0 *models.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.User, error)); ok {
|
||||
@ -138,6 +158,10 @@ func (_m *Controller) GetByName(ctx context.Context, username string) (*models.U
|
||||
func (_m *Controller) GetBySubIss(ctx context.Context, sub string, iss string) (*models.User, error) {
|
||||
ret := _m.Called(ctx, sub, iss)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetBySubIss")
|
||||
}
|
||||
|
||||
var r0 *models.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.User, error)); ok {
|
||||
@ -171,6 +195,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...userm
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...usermodels.Option) ([]*models.User, error)); ok {
|
||||
@ -197,6 +225,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...userm
|
||||
func (_m *Controller) OnboardOIDCUser(ctx context.Context, u *models.User) error {
|
||||
ret := _m.Called(ctx, u)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for OnboardOIDCUser")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.User) error); ok {
|
||||
r0 = rf(ctx, u)
|
||||
@ -211,6 +243,10 @@ func (_m *Controller) OnboardOIDCUser(ctx context.Context, u *models.User) error
|
||||
func (_m *Controller) SetCliSecret(ctx context.Context, id int, secret string) error {
|
||||
ret := _m.Called(ctx, id, secret)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetCliSecret")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, string) error); ok {
|
||||
r0 = rf(ctx, id, secret)
|
||||
@ -225,6 +261,10 @@ func (_m *Controller) SetCliSecret(ctx context.Context, id int, secret string) e
|
||||
func (_m *Controller) SetSysAdmin(ctx context.Context, id int, adminFlag bool) error {
|
||||
ret := _m.Called(ctx, id, adminFlag)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetSysAdmin")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, bool) error); ok {
|
||||
r0 = rf(ctx, id, adminFlag)
|
||||
@ -246,6 +286,10 @@ func (_m *Controller) UpdateOIDCMeta(ctx context.Context, ou *models.OIDCUser, c
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateOIDCMeta")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser, ...string) error); ok {
|
||||
r0 = rf(ctx, ou, cols...)
|
||||
@ -260,6 +304,10 @@ func (_m *Controller) UpdateOIDCMeta(ctx context.Context, ou *models.OIDCUser, c
|
||||
func (_m *Controller) UpdatePassword(ctx context.Context, id int, password string) error {
|
||||
ret := _m.Called(ctx, id, password)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdatePassword")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, string) error); ok {
|
||||
r0 = rf(ctx, id, password)
|
||||
@ -281,6 +329,10 @@ func (_m *Controller) UpdateProfile(ctx context.Context, u *models.User, cols ..
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateProfile")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.User, ...string) error); ok {
|
||||
r0 = rf(ctx, u, cols...)
|
||||
@ -295,6 +347,10 @@ func (_m *Controller) UpdateProfile(ctx context.Context, u *models.User, cols ..
|
||||
func (_m *Controller) VerifyPassword(ctx context.Context, usernameOrEmail string, password string) (bool, error) {
|
||||
ret := _m.Called(ctx, usernameOrEmail, password)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for VerifyPassword")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package webhook
|
||||
|
||||
@ -24,6 +24,10 @@ type Controller struct {
|
||||
func (_m *Controller) CountExecutions(ctx context.Context, policyID int64, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, policyID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CountExecutions")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) (int64, error)); ok {
|
||||
@ -48,6 +52,10 @@ func (_m *Controller) CountExecutions(ctx context.Context, policyID int64, query
|
||||
func (_m *Controller) CountPolicies(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CountPolicies")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -72,6 +80,10 @@ func (_m *Controller) CountPolicies(ctx context.Context, query *q.Query) (int64,
|
||||
func (_m *Controller) CountTasks(ctx context.Context, execID int64, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, execID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CountTasks")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) (int64, error)); ok {
|
||||
@ -96,6 +108,10 @@ func (_m *Controller) CountTasks(ctx context.Context, execID int64, query *q.Que
|
||||
func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (int64, error) {
|
||||
ret := _m.Called(ctx, policy)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreatePolicy")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
|
||||
@ -120,6 +136,10 @@ func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (i
|
||||
func (_m *Controller) DeletePolicy(ctx context.Context, policyID int64) error {
|
||||
ret := _m.Called(ctx, policyID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeletePolicy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, policyID)
|
||||
@ -134,6 +154,10 @@ func (_m *Controller) DeletePolicy(ctx context.Context, policyID int64) error {
|
||||
func (_m *Controller) GetLastTriggerTime(ctx context.Context, eventType string, policyID int64) (time.Time, error) {
|
||||
ret := _m.Called(ctx, eventType, policyID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLastTriggerTime")
|
||||
}
|
||||
|
||||
var r0 time.Time
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) (time.Time, error)); ok {
|
||||
@ -158,6 +182,10 @@ func (_m *Controller) GetLastTriggerTime(ctx context.Context, eventType string,
|
||||
func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPolicy")
|
||||
}
|
||||
|
||||
var r0 *model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
|
||||
@ -184,6 +212,10 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e
|
||||
func (_m *Controller) GetRelatedPolices(ctx context.Context, projectID int64, eventType string) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, projectID, eventType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRelatedPolices")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*model.Policy, error)); ok {
|
||||
@ -210,6 +242,10 @@ func (_m *Controller) GetRelatedPolices(ctx context.Context, projectID int64, ev
|
||||
func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*task.Task, error) {
|
||||
ret := _m.Called(ctx, taskID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTask")
|
||||
}
|
||||
|
||||
var r0 *task.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok {
|
||||
@ -236,6 +272,10 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*task.Task, er
|
||||
func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, error) {
|
||||
ret := _m.Called(ctx, taskID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTaskLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
|
||||
@ -262,6 +302,10 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err
|
||||
func (_m *Controller) ListExecutions(ctx context.Context, policyID int64, query *q.Query) ([]*task.Execution, error) {
|
||||
ret := _m.Called(ctx, policyID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListExecutions")
|
||||
}
|
||||
|
||||
var r0 []*task.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*task.Execution, error)); ok {
|
||||
@ -288,6 +332,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, policyID int64, query
|
||||
func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListPolicies")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
|
||||
@ -314,6 +362,10 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode
|
||||
func (_m *Controller) ListTasks(ctx context.Context, execID int64, query *q.Query) ([]*task.Task, error) {
|
||||
ret := _m.Called(ctx, execID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListTasks")
|
||||
}
|
||||
|
||||
var r0 []*task.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*task.Task, error)); ok {
|
||||
@ -340,6 +392,10 @@ func (_m *Controller) ListTasks(ctx context.Context, execID int64, query *q.Quer
|
||||
func (_m *Controller) UpdatePolicy(ctx context.Context, policy *model.Policy) error {
|
||||
ret := _m.Called(ctx, policy)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdatePolicy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) error); ok {
|
||||
r0 = rf(ctx, policy)
|
||||
|
26
src/testing/lib/cache/cache.go
vendored
26
src/testing/lib/cache/cache.go
vendored
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package cache
|
||||
|
||||
@ -21,6 +21,10 @@ type Cache struct {
|
||||
func (_m *Cache) Contains(ctx context.Context, key string) bool {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Contains")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, key)
|
||||
@ -35,6 +39,10 @@ func (_m *Cache) Contains(ctx context.Context, key string) bool {
|
||||
func (_m *Cache) Delete(ctx context.Context, key string) error {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, key)
|
||||
@ -49,6 +57,10 @@ func (_m *Cache) Delete(ctx context.Context, key string) error {
|
||||
func (_m *Cache) Fetch(ctx context.Context, key string, value interface{}) error {
|
||||
ret := _m.Called(ctx, key, value)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Fetch")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, interface{}) error); ok {
|
||||
r0 = rf(ctx, key, value)
|
||||
@ -63,6 +75,10 @@ func (_m *Cache) Fetch(ctx context.Context, key string, value interface{}) error
|
||||
func (_m *Cache) Ping(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ping")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -84,6 +100,10 @@ func (_m *Cache) Save(ctx context.Context, key string, value interface{}, expira
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Save")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, interface{}, ...time.Duration) error); ok {
|
||||
r0 = rf(ctx, key, value, expiration...)
|
||||
@ -98,6 +118,10 @@ func (_m *Cache) Save(ctx context.Context, key string, value interface{}, expira
|
||||
func (_m *Cache) Scan(ctx context.Context, match string) (cache.Iterator, error) {
|
||||
ret := _m.Called(ctx, match)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Scan")
|
||||
}
|
||||
|
||||
var r0 cache.Iterator
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (cache.Iterator, error)); ok {
|
||||
|
10
src/testing/lib/cache/iterator.go
vendored
10
src/testing/lib/cache/iterator.go
vendored
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package cache
|
||||
|
||||
@ -17,6 +17,10 @@ type Iterator struct {
|
||||
func (_m *Iterator) Next(ctx context.Context) bool {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Next")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context) bool); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -31,6 +35,10 @@ func (_m *Iterator) Next(ctx context.Context) bool {
|
||||
func (_m *Iterator) Val() string {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Val")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package config
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Get(ctx context.Context, key string) *metadata.ConfigureValue {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *metadata.ConfigureValue
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) *metadata.ConfigureValue); ok {
|
||||
r0 = rf(ctx, key)
|
||||
@ -36,6 +40,10 @@ func (_m *Manager) Get(ctx context.Context, key string) *metadata.ConfigureValue
|
||||
func (_m *Manager) GetAll(ctx context.Context) map[string]interface{} {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetAll")
|
||||
}
|
||||
|
||||
var r0 map[string]interface{}
|
||||
if rf, ok := ret.Get(0).(func(context.Context) map[string]interface{}); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -52,6 +60,10 @@ func (_m *Manager) GetAll(ctx context.Context) map[string]interface{} {
|
||||
func (_m *Manager) GetDatabaseCfg() *models.Database {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDatabaseCfg")
|
||||
}
|
||||
|
||||
var r0 *models.Database
|
||||
if rf, ok := ret.Get(0).(func() *models.Database); ok {
|
||||
r0 = rf()
|
||||
@ -68,6 +80,10 @@ func (_m *Manager) GetDatabaseCfg() *models.Database {
|
||||
func (_m *Manager) GetUserCfgs(ctx context.Context) map[string]interface{} {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetUserCfgs")
|
||||
}
|
||||
|
||||
var r0 map[string]interface{}
|
||||
if rf, ok := ret.Get(0).(func(context.Context) map[string]interface{}); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -84,6 +100,10 @@ func (_m *Manager) GetUserCfgs(ctx context.Context) map[string]interface{} {
|
||||
func (_m *Manager) Load(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Load")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -98,6 +118,10 @@ func (_m *Manager) Load(ctx context.Context) error {
|
||||
func (_m *Manager) Save(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Save")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -117,6 +141,10 @@ func (_m *Manager) Set(ctx context.Context, key string, value interface{}) {
|
||||
func (_m *Manager) UpdateConfig(ctx context.Context, cfgs map[string]interface{}) error {
|
||||
ret := _m.Called(ctx, cfgs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateConfig")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}) error); ok {
|
||||
r0 = rf(ctx, cfgs)
|
||||
@ -131,6 +159,10 @@ func (_m *Manager) UpdateConfig(ctx context.Context, cfgs map[string]interface{}
|
||||
func (_m *Manager) ValidateCfg(ctx context.Context, cfgs map[string]interface{}) error {
|
||||
ret := _m.Called(ctx, cfgs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ValidateCfg")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}) error); ok {
|
||||
r0 = rf(ctx, cfgs)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package orm
|
||||
|
||||
@ -16,6 +16,10 @@ type Creator struct {
|
||||
func (_m *Creator) Create() orm.Ormer {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 orm.Ormer
|
||||
if rf, ok := ret.Get(0).(func() orm.Ormer); ok {
|
||||
r0 = rf()
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -20,6 +20,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, accessory *dao.Accessory) (int64, error) {
|
||||
ret := _m.Called(ctx, accessory)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *DAO) Create(ctx context.Context, accessory *dao.Accessory) (int64, err
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) DeleteAccessories(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteAccessories")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -106,6 +122,10 @@ func (_m *DAO) DeleteAccessories(ctx context.Context, query *q.Query) (int64, er
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Accessory, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *dao.Accessory
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Accessory, error)); ok {
|
||||
@ -132,6 +152,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Accessory, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Accessory, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*dao.Accessory
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Accessory, error)); ok {
|
||||
@ -158,6 +182,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Accessory, erro
|
||||
func (_m *DAO) Update(ctx context.Context, accessory *dao.Accessory) error {
|
||||
ret := _m.Called(ctx, accessory)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) error); ok {
|
||||
r0 = rf(ctx, accessory)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package accessory
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 model.AccessoryData) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 model.AccessoryData) (int64,
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) DeleteAccessories(ctx context.Context, _a1 *q.Query) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteAccessories")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
@ -96,6 +112,10 @@ func (_m *Manager) DeleteAccessories(ctx context.Context, _a1 *q.Query) error {
|
||||
func (_m *Manager) Ensure(ctx context.Context, subArtDigest string, subArtRepo string, subArtID int64, artifactID int64, size int64, digest string, accType string) error {
|
||||
ret := _m.Called(ctx, subArtDigest, subArtRepo, subArtID, artifactID, size, digest, accType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ensure")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64, int64, int64, string, string) error); ok {
|
||||
r0 = rf(ctx, subArtDigest, subArtRepo, subArtID, artifactID, size, digest, accType)
|
||||
@ -110,6 +130,10 @@ func (_m *Manager) Ensure(ctx context.Context, subArtDigest string, subArtRepo s
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (model.Accessory, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 model.Accessory
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (model.Accessory, error)); ok {
|
||||
@ -136,6 +160,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (model.Accessory, error) {
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]model.Accessory, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []model.Accessory
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]model.Accessory, error)); ok {
|
||||
@ -162,6 +190,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]model.Accessory,
|
||||
func (_m *Manager) Update(ctx context.Context, _a1 model.AccessoryData) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package model
|
||||
|
||||
@ -16,6 +16,10 @@ type Accessory struct {
|
||||
func (_m *Accessory) Display() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Display")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@ -30,6 +34,10 @@ func (_m *Accessory) Display() bool {
|
||||
func (_m *Accessory) GetData() model.AccessoryData {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetData")
|
||||
}
|
||||
|
||||
var r0 model.AccessoryData
|
||||
if rf, ok := ret.Get(0).(func() model.AccessoryData); ok {
|
||||
r0 = rf()
|
||||
@ -44,6 +52,10 @@ func (_m *Accessory) GetData() model.AccessoryData {
|
||||
func (_m *Accessory) IsHard() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsHard")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@ -58,6 +70,10 @@ func (_m *Accessory) IsHard() bool {
|
||||
func (_m *Accessory) IsSoft() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for IsSoft")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
@ -72,6 +88,10 @@ func (_m *Accessory) IsSoft() bool {
|
||||
func (_m *Accessory) Kind() string {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Kind")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -19,6 +19,10 @@ type DAO struct {
|
||||
func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllowlist, error) {
|
||||
ret := _m.Called(ctx, pid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for QueryByProjectID")
|
||||
}
|
||||
|
||||
var r0 *models.CVEAllowlist
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllo
|
||||
func (_m *DAO) Set(ctx context.Context, l models.CVEAllowlist) (int64, error) {
|
||||
ret := _m.Called(ctx, l)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Set")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) (int64, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package robot
|
||||
|
||||
@ -18,6 +18,10 @@ type Manager struct {
|
||||
func (_m *Manager) CreateEmpty(ctx context.Context, projectID int64) error {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateEmpty")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, projectID)
|
||||
@ -32,6 +36,10 @@ func (_m *Manager) CreateEmpty(ctx context.Context, projectID int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, projectID int64) (*models.CVEAllowlist, error) {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.CVEAllowlist
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok {
|
||||
@ -58,6 +66,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64) (*models.CVEAllowli
|
||||
func (_m *Manager) GetSys(ctx context.Context) (*models.CVEAllowlist, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetSys")
|
||||
}
|
||||
|
||||
var r0 *models.CVEAllowlist
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (*models.CVEAllowlist, error)); ok {
|
||||
@ -84,6 +96,10 @@ func (_m *Manager) GetSys(ctx context.Context) (*models.CVEAllowlist, error) {
|
||||
func (_m *Manager) Set(ctx context.Context, projectID int64, list models.CVEAllowlist) error {
|
||||
ret := _m.Called(ctx, projectID, list)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Set")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, models.CVEAllowlist) error); ok {
|
||||
r0 = rf(ctx, projectID, list)
|
||||
@ -98,6 +114,10 @@ func (_m *Manager) Set(ctx context.Context, projectID int64, list models.CVEAllo
|
||||
func (_m *Manager) SetSys(ctx context.Context, list models.CVEAllowlist) error {
|
||||
ret := _m.Called(ctx, list)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetSys")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) error); ok {
|
||||
r0 = rf(ctx, list)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package artifact
|
||||
|
||||
@ -23,6 +23,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -47,6 +51,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 *artifact.Artifact) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) (int64, error)); ok {
|
||||
@ -71,6 +79,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 *artifact.Artifact) (int64, e
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -85,6 +97,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) DeleteReference(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteReference")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -99,6 +115,10 @@ func (_m *Manager) DeleteReference(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*artifact.Artifact, error)); ok {
|
||||
@ -125,6 +145,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*artifact.Artifact, error
|
||||
func (_m *Manager) GetByDigest(ctx context.Context, repository string, digest string) (*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByDigest")
|
||||
}
|
||||
|
||||
var r0 *artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*artifact.Artifact, error)); ok {
|
||||
@ -151,6 +175,10 @@ func (_m *Manager) GetByDigest(ctx context.Context, repository string, digest st
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*artifact.Artifact, error)); ok {
|
||||
@ -177,6 +205,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*artifact.Artifa
|
||||
func (_m *Manager) ListReferences(ctx context.Context, query *q.Query) ([]*artifact.Reference, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListReferences")
|
||||
}
|
||||
|
||||
var r0 []*artifact.Reference
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*artifact.Reference, error)); ok {
|
||||
@ -210,6 +242,10 @@ func (_m *Manager) Update(ctx context.Context, _a1 *artifact.Artifact, props ...
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, ...string) error); ok {
|
||||
r0 = rf(ctx, _a1, props...)
|
||||
@ -224,6 +260,10 @@ func (_m *Manager) Update(ctx context.Context, _a1 *artifact.Artifact, props ...
|
||||
func (_m *Manager) UpdatePullTime(ctx context.Context, id int64, pullTime time.Time) error {
|
||||
ret := _m.Called(ctx, id, pullTime)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdatePullTime")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) error); ok {
|
||||
r0 = rf(ctx, id, pullTime)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, access *model.AuditLog) (int64, error) {
|
||||
ret := _m.Called(ctx, access)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) Create(ctx context.Context, access *model.AuditLog) (int64, error
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.AuditLog
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.AuditLog, error)); ok {
|
||||
@ -109,6 +125,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.AuditLog
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.AuditLog, error)); ok {
|
||||
@ -135,6 +155,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, err
|
||||
func (_m *DAO) Purge(ctx context.Context, retentionHour int, includeOperations []string, dryRun bool) (int64, error) {
|
||||
ret := _m.Called(ctx, retentionHour, includeOperations, dryRun)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Purge")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) (int64, error)); ok {
|
||||
@ -159,6 +183,10 @@ func (_m *DAO) Purge(ctx context.Context, retentionHour int, includeOperations [
|
||||
func (_m *DAO) UpdateUsername(ctx context.Context, username string, usernameReplace string) error {
|
||||
ret := _m.Called(ctx, username, usernameReplace)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateUsername")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
||||
r0 = rf(ctx, username, usernameReplace)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package audit
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 *model.AuditLog) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.AuditLog) (int64, erro
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.AuditLog
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.AuditLog, error)); ok {
|
||||
@ -108,6 +124,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.AuditLog
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.AuditLog, error)); ok {
|
||||
@ -134,6 +154,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.AuditLog,
|
||||
func (_m *Manager) Purge(ctx context.Context, retentionHour int, includeOperations []string, dryRun bool) (int64, error) {
|
||||
ret := _m.Called(ctx, retentionHour, includeOperations, dryRun)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Purge")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) (int64, error)); ok {
|
||||
@ -158,6 +182,10 @@ func (_m *Manager) Purge(ctx context.Context, retentionHour int, includeOperatio
|
||||
func (_m *Manager) UpdateUsername(ctx context.Context, username string, replaceWith string) error {
|
||||
ret := _m.Called(ctx, username, replaceWith)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateUsername")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
||||
r0 = rf(ctx, username, replaceWith)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package blob
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) AssociateWithArtifact(ctx context.Context, blobDigest string, artifactDigest string) (int64, error) {
|
||||
ret := _m.Called(ctx, blobDigest, artifactDigest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AssociateWithArtifact")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) AssociateWithArtifact(ctx context.Context, blobDigest string,
|
||||
func (_m *Manager) AssociateWithProject(ctx context.Context, blobID int64, projectID int64) (int64, error) {
|
||||
ret := _m.Called(ctx, blobID, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AssociateWithProject")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) AssociateWithProject(ctx context.Context, blobID int64, proje
|
||||
func (_m *Manager) CalculateTotalSize(ctx context.Context, excludeForeignLayer bool) (int64, error) {
|
||||
ret := _m.Called(ctx, excludeForeignLayer)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CalculateTotalSize")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, bool) (int64, error)); ok {
|
||||
@ -92,6 +104,10 @@ func (_m *Manager) CalculateTotalSize(ctx context.Context, excludeForeignLayer b
|
||||
func (_m *Manager) CalculateTotalSizeByProject(ctx context.Context, projectID int64, excludeForeignLayer bool) (int64, error) {
|
||||
ret := _m.Called(ctx, projectID, excludeForeignLayer)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CalculateTotalSizeByProject")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) (int64, error)); ok {
|
||||
@ -116,6 +132,10 @@ func (_m *Manager) CalculateTotalSizeByProject(ctx context.Context, projectID in
|
||||
func (_m *Manager) CleanupAssociationsForArtifact(ctx context.Context, artifactDigest string) error {
|
||||
ret := _m.Called(ctx, artifactDigest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CleanupAssociationsForArtifact")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, artifactDigest)
|
||||
@ -130,6 +150,10 @@ func (_m *Manager) CleanupAssociationsForArtifact(ctx context.Context, artifactD
|
||||
func (_m *Manager) CleanupAssociationsForProject(ctx context.Context, projectID int64, blobs []*models.Blob) error {
|
||||
ret := _m.Called(ctx, projectID, blobs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CleanupAssociationsForProject")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) error); ok {
|
||||
r0 = rf(ctx, projectID, blobs)
|
||||
@ -144,6 +168,10 @@ func (_m *Manager) CleanupAssociationsForProject(ctx context.Context, projectID
|
||||
func (_m *Manager) Create(ctx context.Context, digest string, contentType string, size int64) (int64, error) {
|
||||
ret := _m.Called(ctx, digest, contentType, size)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (int64, error)); ok {
|
||||
@ -168,6 +196,10 @@ func (_m *Manager) Create(ctx context.Context, digest string, contentType string
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -182,6 +214,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) FindBlobsShouldUnassociatedWithProject(ctx context.Context, projectID int64, blobs []*models.Blob) ([]*models.Blob, error) {
|
||||
ret := _m.Called(ctx, projectID, blobs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FindBlobsShouldUnassociatedWithProject")
|
||||
}
|
||||
|
||||
var r0 []*models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) ([]*models.Blob, error)); ok {
|
||||
@ -208,6 +244,10 @@ func (_m *Manager) FindBlobsShouldUnassociatedWithProject(ctx context.Context, p
|
||||
func (_m *Manager) Get(ctx context.Context, digest string) (*models.Blob, error) {
|
||||
ret := _m.Called(ctx, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.Blob, error)); ok {
|
||||
@ -234,6 +274,10 @@ func (_m *Manager) Get(ctx context.Context, digest string) (*models.Blob, error)
|
||||
func (_m *Manager) GetByArt(ctx context.Context, digest string) ([]*models.Blob, error) {
|
||||
ret := _m.Called(ctx, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByArt")
|
||||
}
|
||||
|
||||
var r0 []*models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*models.Blob, error)); ok {
|
||||
@ -260,6 +304,10 @@ func (_m *Manager) GetByArt(ctx context.Context, digest string) ([]*models.Blob,
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Blob, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Blob, error)); ok {
|
||||
@ -286,6 +334,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Blob, er
|
||||
func (_m *Manager) Update(ctx context.Context, _a1 *models.Blob) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
@ -300,6 +352,10 @@ func (_m *Manager) Update(ctx context.Context, _a1 *models.Blob) error {
|
||||
func (_m *Manager) UpdateBlobStatus(ctx context.Context, _a1 *models.Blob) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateBlobStatus")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) (int64, error)); ok {
|
||||
@ -324,6 +380,10 @@ func (_m *Manager) UpdateBlobStatus(ctx context.Context, _a1 *models.Blob) (int6
|
||||
func (_m *Manager) UselessBlobs(ctx context.Context, timeWindowHours int64) ([]*models.Blob, error) {
|
||||
ret := _m.Called(ctx, timeWindowHours)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UselessBlobs")
|
||||
}
|
||||
|
||||
var r0 []*models.Blob
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*models.Blob, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package redis
|
||||
|
||||
@ -19,6 +19,10 @@ type CachedManager struct {
|
||||
func (_m *CachedManager) CacheClient(ctx context.Context) cache.Cache {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CacheClient")
|
||||
}
|
||||
|
||||
var r0 cache.Cache
|
||||
if rf, ok := ret.Get(0).(func(context.Context) cache.Cache); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -35,6 +39,10 @@ func (_m *CachedManager) CacheClient(ctx context.Context) cache.Cache {
|
||||
func (_m *CachedManager) CountCache(ctx context.Context) (int64, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CountCache")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
|
||||
@ -59,6 +67,10 @@ func (_m *CachedManager) CountCache(ctx context.Context) (int64, error) {
|
||||
func (_m *CachedManager) Delete(ctx context.Context, digest string) error {
|
||||
ret := _m.Called(ctx, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, digest)
|
||||
@ -73,6 +85,10 @@ func (_m *CachedManager) Delete(ctx context.Context, digest string) error {
|
||||
func (_m *CachedManager) DeleteCache(ctx context.Context, key string) error {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteCache")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, key)
|
||||
@ -87,6 +103,10 @@ func (_m *CachedManager) DeleteCache(ctx context.Context, key string) error {
|
||||
func (_m *CachedManager) FlushAll(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for FlushAll")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -101,6 +121,10 @@ func (_m *CachedManager) FlushAll(ctx context.Context) error {
|
||||
func (_m *CachedManager) Get(ctx context.Context, digest string) ([]byte, error) {
|
||||
ret := _m.Called(ctx, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
|
||||
@ -127,6 +151,10 @@ func (_m *CachedManager) Get(ctx context.Context, digest string) ([]byte, error)
|
||||
func (_m *CachedManager) ResourceType(ctx context.Context) string {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ResourceType")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(context.Context) string); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -141,6 +169,10 @@ func (_m *CachedManager) ResourceType(ctx context.Context) string {
|
||||
func (_m *CachedManager) Save(ctx context.Context, digest string, manifest []byte) error {
|
||||
ret := _m.Called(ctx, digest, manifest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Save")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, []byte) error); ok {
|
||||
r0 = rf(ctx, digest, manifest)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) CreateImmutableRule(ctx context.Context, ir *model.ImmutableRule) (int64, error) {
|
||||
ret := _m.Called(ctx, ir)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateImmutableRule")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.ImmutableRule) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) CreateImmutableRule(ctx context.Context, ir *model.ImmutableRule)
|
||||
func (_m *DAO) DeleteImmutableRule(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteImmutableRule")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) DeleteImmutableRule(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) GetImmutableRule(ctx context.Context, id int64) (*model.ImmutableRule, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetImmutableRule")
|
||||
}
|
||||
|
||||
var r0 *model.ImmutableRule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.ImmutableRule, error)); ok {
|
||||
@ -109,6 +125,10 @@ func (_m *DAO) GetImmutableRule(ctx context.Context, id int64) (*model.Immutable
|
||||
func (_m *DAO) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model.ImmutableRule, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListImmutableRules")
|
||||
}
|
||||
|
||||
var r0 []*model.ImmutableRule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.ImmutableRule, error)); ok {
|
||||
@ -135,6 +155,10 @@ func (_m *DAO) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model
|
||||
func (_m *DAO) ToggleImmutableRule(ctx context.Context, id int64, status bool) error {
|
||||
ret := _m.Called(ctx, id, status)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ToggleImmutableRule")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, bool) error); ok {
|
||||
r0 = rf(ctx, id, status)
|
||||
@ -149,6 +173,10 @@ func (_m *DAO) ToggleImmutableRule(ctx context.Context, id int64, status bool) e
|
||||
func (_m *DAO) UpdateImmutableRule(ctx context.Context, projectID int64, ir *model.ImmutableRule) error {
|
||||
ret := _m.Called(ctx, projectID, ir)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateImmutableRule")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *model.ImmutableRule) error); ok {
|
||||
r0 = rf(ctx, projectID, ir)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Create(ctx context.Context, jobLog *models.JobLog) (int64, error) {
|
||||
ret := _m.Called(ctx, jobLog)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Create(ctx context.Context, jobLog *models.JobLog) (int64, error)
|
||||
func (_m *DAO) DeleteBefore(ctx context.Context, t time.Time) (int64, error) {
|
||||
ret := _m.Called(ctx, t)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteBefore")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) DeleteBefore(ctx context.Context, t time.Time) (int64, error) {
|
||||
func (_m *DAO) Get(ctx context.Context, uuid string) (*models.JobLog, error) {
|
||||
ret := _m.Called(ctx, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.JobLog
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.JobLog, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package joblog
|
||||
|
||||
@ -21,6 +21,10 @@ type Manager struct {
|
||||
func (_m *Manager) Create(ctx context.Context, jobLog *models.JobLog) (int64, error) {
|
||||
ret := _m.Called(ctx, jobLog)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *Manager) Create(ctx context.Context, jobLog *models.JobLog) (int64, er
|
||||
func (_m *Manager) DeleteBefore(ctx context.Context, t time.Time) (int64, error) {
|
||||
ret := _m.Called(ctx, t)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteBefore")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *Manager) DeleteBefore(ctx context.Context, t time.Time) (int64, error)
|
||||
func (_m *Manager) Get(ctx context.Context, uuid string) (*models.JobLog, error) {
|
||||
ret := _m.Called(ctx, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.JobLog
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.JobLog, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package jobmonitor
|
||||
|
||||
@ -16,6 +16,10 @@ type JobServiceMonitorClient struct {
|
||||
func (_m *JobServiceMonitorClient) Queues() ([]*work.Queue, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Queues")
|
||||
}
|
||||
|
||||
var r0 []*work.Queue
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*work.Queue, error)); ok {
|
||||
@ -42,6 +46,10 @@ func (_m *JobServiceMonitorClient) Queues() ([]*work.Queue, error) {
|
||||
func (_m *JobServiceMonitorClient) WorkerObservations() ([]*work.WorkerObservation, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for WorkerObservations")
|
||||
}
|
||||
|
||||
var r0 []*work.WorkerObservation
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*work.WorkerObservation, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *JobServiceMonitorClient) WorkerObservations() ([]*work.WorkerObservati
|
||||
func (_m *JobServiceMonitorClient) WorkerPoolHeartbeats() ([]*work.WorkerPoolHeartbeat, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for WorkerPoolHeartbeats")
|
||||
}
|
||||
|
||||
var r0 []*work.WorkerPoolHeartbeat
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]*work.WorkerPoolHeartbeat, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package jobmonitor
|
||||
|
||||
@ -18,6 +18,10 @@ type PoolManager struct {
|
||||
func (_m *PoolManager) List(ctx context.Context, monitorClient jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.WorkerPool, error) {
|
||||
ret := _m.Called(ctx, monitorClient)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*jobmonitor.WorkerPool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.WorkerPool, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package jobmonitor
|
||||
|
||||
@ -18,6 +18,10 @@ type QueueManager struct {
|
||||
func (_m *QueueManager) List(ctx context.Context, monitClient jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.Queue, error) {
|
||||
ret := _m.Called(ctx, monitClient)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*jobmonitor.Queue
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.Queue, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package jobmonitor
|
||||
|
||||
@ -17,6 +17,10 @@ type RedisClient struct {
|
||||
func (_m *RedisClient) AllJobTypes(ctx context.Context) ([]string, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AllJobTypes")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
||||
@ -43,6 +47,10 @@ func (_m *RedisClient) AllJobTypes(ctx context.Context) ([]string, error) {
|
||||
func (_m *RedisClient) PauseJob(ctx context.Context, jobName string) error {
|
||||
ret := _m.Called(ctx, jobName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PauseJob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, jobName)
|
||||
@ -57,6 +65,10 @@ func (_m *RedisClient) PauseJob(ctx context.Context, jobName string) error {
|
||||
func (_m *RedisClient) StopPendingJobs(ctx context.Context, jobType string) ([]string, error) {
|
||||
ret := _m.Called(ctx, jobType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for StopPendingJobs")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
|
||||
@ -83,6 +95,10 @@ func (_m *RedisClient) StopPendingJobs(ctx context.Context, jobType string) ([]s
|
||||
func (_m *RedisClient) UnpauseJob(ctx context.Context, jobName string) error {
|
||||
ret := _m.Called(ctx, jobName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UnpauseJob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, jobName)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package jobmonitor
|
||||
|
||||
@ -18,6 +18,10 @@ type WorkerManager struct {
|
||||
func (_m *WorkerManager) List(ctx context.Context, monitClient jobmonitor.JobServiceMonitorClient, poolID string) ([]*jobmonitor.Worker, error) {
|
||||
ret := _m.Called(ctx, monitClient, poolID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*jobmonitor.Worker
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) ([]*jobmonitor.Worker, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, label *model.Label) (int64, error) {
|
||||
ret := _m.Called(ctx, label)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) Create(ctx context.Context, label *model.Label) (int64, error) {
|
||||
func (_m *DAO) CreateReference(ctx context.Context, reference *model.Reference) (int64, error) {
|
||||
ret := _m.Called(ctx, reference)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateReference")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Reference) (int64, error)); ok {
|
||||
@ -93,6 +105,10 @@ func (_m *DAO) CreateReference(ctx context.Context, reference *model.Reference)
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -107,6 +123,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) DeleteReference(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteReference")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -121,6 +141,10 @@ func (_m *DAO) DeleteReference(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) DeleteReferences(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteReferences")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -145,6 +169,10 @@ func (_m *DAO) DeleteReferences(ctx context.Context, query *q.Query) (int64, err
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*model.Label, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Label
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Label, error)); ok {
|
||||
@ -171,6 +199,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Label, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Label, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Label
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Label, error)); ok {
|
||||
@ -197,6 +229,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Label, error)
|
||||
func (_m *DAO) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.Label, error) {
|
||||
ret := _m.Called(ctx, artifactID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListByArtifact")
|
||||
}
|
||||
|
||||
var r0 []*model.Label
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*model.Label, error)); ok {
|
||||
@ -223,6 +259,10 @@ func (_m *DAO) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.L
|
||||
func (_m *DAO) Update(ctx context.Context, label *model.Label) error {
|
||||
ret := _m.Called(ctx, label)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) error); ok {
|
||||
r0 = rf(ctx, label)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package label
|
||||
|
||||
@ -21,6 +21,10 @@ type Manager struct {
|
||||
func (_m *Manager) AddTo(ctx context.Context, labelID int64, artifactID int64) error {
|
||||
ret := _m.Called(ctx, labelID, artifactID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddTo")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, labelID, artifactID)
|
||||
@ -35,6 +39,10 @@ func (_m *Manager) AddTo(ctx context.Context, labelID int64, artifactID int64) e
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -59,6 +67,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 *model.Label) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) (int64, error)); ok {
|
||||
@ -83,6 +95,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.Label) (int64, error)
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -97,6 +113,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.Label, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Label
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Label, error)); ok {
|
||||
@ -123,6 +143,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Label, error) {
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Label, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Label
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Label, error)); ok {
|
||||
@ -149,6 +173,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Label, er
|
||||
func (_m *Manager) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.Label, error) {
|
||||
ret := _m.Called(ctx, artifactID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListByArtifact")
|
||||
}
|
||||
|
||||
var r0 []*model.Label
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*model.Label, error)); ok {
|
||||
@ -175,6 +203,10 @@ func (_m *Manager) ListByArtifact(ctx context.Context, artifactID int64) ([]*mod
|
||||
func (_m *Manager) RemoveAllFrom(ctx context.Context, artifactID int64) error {
|
||||
ret := _m.Called(ctx, artifactID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RemoveAllFrom")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, artifactID)
|
||||
@ -189,6 +221,10 @@ func (_m *Manager) RemoveAllFrom(ctx context.Context, artifactID int64) error {
|
||||
func (_m *Manager) RemoveFrom(ctx context.Context, labelID int64, artifactID int64) error {
|
||||
ret := _m.Called(ctx, labelID, artifactID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RemoveFrom")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, labelID, artifactID)
|
||||
@ -203,6 +239,10 @@ func (_m *Manager) RemoveFrom(ctx context.Context, labelID int64, artifactID int
|
||||
func (_m *Manager) RemoveFromAllArtifacts(ctx context.Context, labelID int64) error {
|
||||
ret := _m.Called(ctx, labelID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RemoveFromAllArtifacts")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, labelID)
|
||||
@ -217,6 +257,10 @@ func (_m *Manager) RemoveFromAllArtifacts(ctx context.Context, labelID int64) er
|
||||
func (_m *Manager) Update(ctx context.Context, _a1 *model.Label) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Label) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package ldap
|
||||
|
||||
@ -22,6 +22,10 @@ type Manager struct {
|
||||
func (_m *Manager) ImportUser(ctx context.Context, sess *ldap.Session, ldapImportUsers []string) ([]model.FailedImportUser, error) {
|
||||
ret := _m.Called(ctx, sess, ldapImportUsers)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ImportUser")
|
||||
}
|
||||
|
||||
var r0 []model.FailedImportUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, []string) ([]model.FailedImportUser, error)); ok {
|
||||
@ -48,6 +52,10 @@ func (_m *Manager) ImportUser(ctx context.Context, sess *ldap.Session, ldapImpor
|
||||
func (_m *Manager) Ping(ctx context.Context, cfg models.LdapConf) (bool, error) {
|
||||
ret := _m.Called(ctx, cfg)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ping")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.LdapConf) (bool, error)); ok {
|
||||
@ -72,6 +80,10 @@ func (_m *Manager) Ping(ctx context.Context, cfg models.LdapConf) (bool, error)
|
||||
func (_m *Manager) SearchGroup(ctx context.Context, sess *ldap.Session, groupName string, groupDN string) ([]model.Group, error) {
|
||||
ret := _m.Called(ctx, sess, groupName, groupDN)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SearchGroup")
|
||||
}
|
||||
|
||||
var r0 []model.Group
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string, string) ([]model.Group, error)); ok {
|
||||
@ -98,6 +110,10 @@ func (_m *Manager) SearchGroup(ctx context.Context, sess *ldap.Session, groupNam
|
||||
func (_m *Manager) SearchUser(ctx context.Context, sess *ldap.Session, username string) ([]model.User, error) {
|
||||
ret := _m.Called(ctx, sess, username)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SearchUser")
|
||||
}
|
||||
|
||||
var r0 []model.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string) ([]model.User, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package member
|
||||
|
||||
@ -21,6 +21,10 @@ type Manager struct {
|
||||
func (_m *Manager) AddProjectMember(ctx context.Context, _a1 models.Member) (int, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddProjectMember")
|
||||
}
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.Member) (int, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *Manager) AddProjectMember(ctx context.Context, _a1 models.Member) (int
|
||||
func (_m *Manager) Delete(ctx context.Context, projectID int64, memberID int) error {
|
||||
ret := _m.Called(ctx, projectID, memberID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int) error); ok {
|
||||
r0 = rf(ctx, projectID, memberID)
|
||||
@ -59,6 +67,10 @@ func (_m *Manager) Delete(ctx context.Context, projectID int64, memberID int) er
|
||||
func (_m *Manager) DeleteMemberByProjectID(ctx context.Context, projectID int64) error {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteMemberByProjectID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, projectID)
|
||||
@ -73,6 +85,10 @@ func (_m *Manager) DeleteMemberByProjectID(ctx context.Context, projectID int64)
|
||||
func (_m *Manager) DeleteMemberByUserID(ctx context.Context, uid int) error {
|
||||
ret := _m.Called(ctx, uid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteMemberByUserID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
||||
r0 = rf(ctx, uid)
|
||||
@ -87,6 +103,10 @@ func (_m *Manager) DeleteMemberByUserID(ctx context.Context, uid int) error {
|
||||
func (_m *Manager) Get(ctx context.Context, projectID int64, memberID int) (*models.Member, error) {
|
||||
ret := _m.Called(ctx, projectID, memberID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Member
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int) (*models.Member, error)); ok {
|
||||
@ -120,6 +140,10 @@ func (_m *Manager) GetTotalOfProjectMembers(ctx context.Context, projectID int64
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetTotalOfProjectMembers")
|
||||
}
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query, ...int) (int, error)); ok {
|
||||
@ -144,6 +168,10 @@ func (_m *Manager) GetTotalOfProjectMembers(ctx context.Context, projectID int64
|
||||
func (_m *Manager) List(ctx context.Context, queryMember models.Member, query *q.Query) ([]*models.Member, error) {
|
||||
ret := _m.Called(ctx, queryMember, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Member
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, models.Member, *q.Query) ([]*models.Member, error)); ok {
|
||||
@ -170,6 +198,10 @@ func (_m *Manager) List(ctx context.Context, queryMember models.Member, query *q
|
||||
func (_m *Manager) ListRoles(ctx context.Context, user *models.User, projectID int64) ([]int, error) {
|
||||
ret := _m.Called(ctx, user, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRoles")
|
||||
}
|
||||
|
||||
var r0 []int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.User, int64) ([]int, error)); ok {
|
||||
@ -196,6 +228,10 @@ func (_m *Manager) ListRoles(ctx context.Context, user *models.User, projectID i
|
||||
func (_m *Manager) SearchMemberByName(ctx context.Context, projectID int64, entityName string) ([]*models.Member, error) {
|
||||
ret := _m.Called(ctx, projectID, entityName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SearchMemberByName")
|
||||
}
|
||||
|
||||
var r0 []*models.Member
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*models.Member, error)); ok {
|
||||
@ -222,6 +258,10 @@ func (_m *Manager) SearchMemberByName(ctx context.Context, projectID int64, enti
|
||||
func (_m *Manager) UpdateRole(ctx context.Context, projectID int64, pmID int, role int) error {
|
||||
ret := _m.Called(ctx, projectID, pmID, role)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateRole")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int, int) error); ok {
|
||||
r0 = rf(ctx, projectID, pmID, role)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, n *model.Policy) (int64, error) {
|
||||
ret := _m.Called(ctx, n)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) Create(ctx context.Context, n *model.Policy) (int64, error) {
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
|
||||
@ -109,6 +125,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
|
||||
@ -135,6 +155,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error
|
||||
func (_m *DAO) Update(ctx context.Context, n *model.Policy) error {
|
||||
ret := _m.Called(ctx, n)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) error); ok {
|
||||
r0 = rf(ctx, n)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package policy
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 *model.Policy) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.Policy) (int64, error)
|
||||
func (_m *Manager) Delete(ctx context.Context, policyID int64) error {
|
||||
ret := _m.Called(ctx, policyID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, policyID)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Delete(ctx context.Context, policyID int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
|
||||
@ -108,6 +124,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
func (_m *Manager) GetRelatedPolices(ctx context.Context, projectID int64, eventType string) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, projectID, eventType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetRelatedPolices")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*model.Policy, error)); ok {
|
||||
@ -134,6 +154,10 @@ func (_m *Manager) GetRelatedPolices(ctx context.Context, projectID int64, event
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
|
||||
@ -160,6 +184,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e
|
||||
func (_m *Manager) Update(ctx context.Context, _a1 *model.Policy) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type MetaDAO struct {
|
||||
func (_m *MetaDAO) Create(ctx context.Context, oidcUser *models.OIDCUser) (int, error) {
|
||||
ret := _m.Called(ctx, oidcUser)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) (int, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *MetaDAO) Create(ctx context.Context, oidcUser *models.OIDCUser) (int,
|
||||
func (_m *MetaDAO) DeleteByUserID(ctx context.Context, uid int) error {
|
||||
ret := _m.Called(ctx, uid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteByUserID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
||||
r0 = rf(ctx, uid)
|
||||
@ -59,6 +67,10 @@ func (_m *MetaDAO) DeleteByUserID(ctx context.Context, uid int) error {
|
||||
func (_m *MetaDAO) GetByUsername(ctx context.Context, username string) (*models.OIDCUser, error) {
|
||||
ret := _m.Called(ctx, username)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByUsername")
|
||||
}
|
||||
|
||||
var r0 *models.OIDCUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*models.OIDCUser, error)); ok {
|
||||
@ -85,6 +97,10 @@ func (_m *MetaDAO) GetByUsername(ctx context.Context, username string) (*models.
|
||||
func (_m *MetaDAO) List(ctx context.Context, query *q.Query) ([]*models.OIDCUser, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.OIDCUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.OIDCUser, error)); ok {
|
||||
@ -118,6 +134,10 @@ func (_m *MetaDAO) Update(ctx context.Context, oidcUser *models.OIDCUser, props
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser, ...string) error); ok {
|
||||
r0 = rf(ctx, oidcUser, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package oidc
|
||||
|
||||
@ -18,6 +18,10 @@ type MetaManager struct {
|
||||
func (_m *MetaManager) Create(ctx context.Context, oidcUser *models.OIDCUser) (int, error) {
|
||||
ret := _m.Called(ctx, oidcUser)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) (int, error)); ok {
|
||||
@ -42,6 +46,10 @@ func (_m *MetaManager) Create(ctx context.Context, oidcUser *models.OIDCUser) (i
|
||||
func (_m *MetaManager) DeleteByUserID(ctx context.Context, uid int) error {
|
||||
ret := _m.Called(ctx, uid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteByUserID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
||||
r0 = rf(ctx, uid)
|
||||
@ -56,6 +64,10 @@ func (_m *MetaManager) DeleteByUserID(ctx context.Context, uid int) error {
|
||||
func (_m *MetaManager) GetBySubIss(ctx context.Context, sub string, iss string) (*models.OIDCUser, error) {
|
||||
ret := _m.Called(ctx, sub, iss)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetBySubIss")
|
||||
}
|
||||
|
||||
var r0 *models.OIDCUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.OIDCUser, error)); ok {
|
||||
@ -82,6 +94,10 @@ func (_m *MetaManager) GetBySubIss(ctx context.Context, sub string, iss string)
|
||||
func (_m *MetaManager) GetByUserID(ctx context.Context, uid int) (*models.OIDCUser, error) {
|
||||
ret := _m.Called(ctx, uid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByUserID")
|
||||
}
|
||||
|
||||
var r0 *models.OIDCUser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) (*models.OIDCUser, error)); ok {
|
||||
@ -108,6 +124,10 @@ func (_m *MetaManager) GetByUserID(ctx context.Context, uid int) (*models.OIDCUs
|
||||
func (_m *MetaManager) SetCliSecretByUserID(ctx context.Context, uid int, secret string) error {
|
||||
ret := _m.Called(ctx, uid, secret)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetCliSecretByUserID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int, string) error); ok {
|
||||
r0 = rf(ctx, uid, secret)
|
||||
@ -129,6 +149,10 @@ func (_m *MetaManager) Update(ctx context.Context, oidcUser *models.OIDCUser, co
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser, ...string) error); ok {
|
||||
r0 = rf(ctx, oidcUser, cols...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package project
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 *models.Project) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Project) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 *models.Project) (int64, erro
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, idOrName interface{}) (*models.Project, error) {
|
||||
ret := _m.Called(ctx, idOrName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Project
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, interface{}) (*models.Project, error)); ok {
|
||||
@ -108,6 +124,10 @@ func (_m *Manager) Get(ctx context.Context, idOrName interface{}) (*models.Proje
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Project, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Project
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Project, error)); ok {
|
||||
@ -134,6 +154,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Project,
|
||||
func (_m *Manager) ListAdminRolesOfUser(ctx context.Context, userID int) ([]models.Member, error) {
|
||||
ret := _m.Called(ctx, userID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListAdminRolesOfUser")
|
||||
}
|
||||
|
||||
var r0 []models.Member
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) ([]models.Member, error)); ok {
|
||||
@ -167,6 +191,10 @@ func (_m *Manager) ListRoles(ctx context.Context, projectID int64, userID int, g
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRoles")
|
||||
}
|
||||
|
||||
var r0 []int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int, ...int) ([]int, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package metadata
|
||||
|
||||
@ -19,6 +19,10 @@ type Manager struct {
|
||||
func (_m *Manager) Add(ctx context.Context, projectID int64, meta map[string]string) error {
|
||||
ret := _m.Called(ctx, projectID, meta)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Add")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, map[string]string) error); ok {
|
||||
r0 = rf(ctx, projectID, meta)
|
||||
@ -40,6 +44,10 @@ func (_m *Manager) Delete(ctx context.Context, projectID int64, meta ...string)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) error); ok {
|
||||
r0 = rf(ctx, projectID, meta...)
|
||||
@ -61,6 +69,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, meta ...string) (ma
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 map[string]string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) (map[string]string, error)); ok {
|
||||
@ -87,6 +99,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, meta ...string) (ma
|
||||
func (_m *Manager) List(ctx context.Context, name string, value string) ([]*models.ProjectMetadata, error) {
|
||||
ret := _m.Called(ctx, name, value)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.ProjectMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]*models.ProjectMetadata, error)); ok {
|
||||
@ -113,6 +129,10 @@ func (_m *Manager) List(ctx context.Context, name string, value string) ([]*mode
|
||||
func (_m *Manager) Update(ctx context.Context, projectID int64, meta map[string]string) error {
|
||||
ret := _m.Called(ctx, projectID, meta)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, map[string]string) error); ok {
|
||||
r0 = rf(ctx, projectID, meta)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package queuestatus
|
||||
|
||||
@ -18,6 +18,10 @@ type Manager struct {
|
||||
func (_m *Manager) AllJobTypeStatus(ctx context.Context) (map[string]bool, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AllJobTypeStatus")
|
||||
}
|
||||
|
||||
var r0 map[string]bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (map[string]bool, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) AllJobTypeStatus(ctx context.Context) (map[string]bool, error
|
||||
func (_m *Manager) CreateOrUpdate(ctx context.Context, status *model.JobQueueStatus) (int64, error) {
|
||||
ret := _m.Called(ctx, status)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateOrUpdate")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.JobQueueStatus) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) CreateOrUpdate(ctx context.Context, status *model.JobQueueSta
|
||||
func (_m *Manager) Get(ctx context.Context, jobType string) (*model.JobQueueStatus, error) {
|
||||
ret := _m.Called(ctx, jobType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.JobQueueStatus
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.JobQueueStatus, error)); ok {
|
||||
@ -94,6 +106,10 @@ func (_m *Manager) Get(ctx context.Context, jobType string) (*model.JobQueueStat
|
||||
func (_m *Manager) List(ctx context.Context) ([]*model.JobQueueStatus, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.JobQueueStatus
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.JobQueueStatus, error)); ok {
|
||||
@ -120,6 +136,10 @@ func (_m *Manager) List(ctx context.Context) ([]*model.JobQueueStatus, error) {
|
||||
func (_m *Manager) UpdateStatus(ctx context.Context, jobType string, paused bool) error {
|
||||
ret := _m.Called(ctx, jobType, paused)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateStatus")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, bool) error); ok {
|
||||
r0 = rf(ctx, jobType, paused)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package driver
|
||||
|
||||
@ -20,6 +20,10 @@ type Driver struct {
|
||||
func (_m *Driver) CalculateUsage(ctx context.Context, key string) (types.ResourceList, error) {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CalculateUsage")
|
||||
}
|
||||
|
||||
var r0 types.ResourceList
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (types.ResourceList, error)); ok {
|
||||
@ -46,6 +50,10 @@ func (_m *Driver) CalculateUsage(ctx context.Context, key string) (types.Resourc
|
||||
func (_m *Driver) Enabled(ctx context.Context, key string) (bool, error) {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Enabled")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
|
||||
@ -70,6 +78,10 @@ func (_m *Driver) Enabled(ctx context.Context, key string) (bool, error) {
|
||||
func (_m *Driver) HardLimits(ctx context.Context) types.ResourceList {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for HardLimits")
|
||||
}
|
||||
|
||||
var r0 types.ResourceList
|
||||
if rf, ok := ret.Get(0).(func(context.Context) types.ResourceList); ok {
|
||||
r0 = rf(ctx)
|
||||
@ -86,6 +98,10 @@ func (_m *Driver) HardLimits(ctx context.Context) types.ResourceList {
|
||||
func (_m *Driver) Load(ctx context.Context, key string) (driver.RefObject, error) {
|
||||
ret := _m.Called(ctx, key)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Load")
|
||||
}
|
||||
|
||||
var r0 driver.RefObject
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (driver.RefObject, error)); ok {
|
||||
@ -112,6 +128,10 @@ func (_m *Driver) Load(ctx context.Context, key string) (driver.RefObject, error
|
||||
func (_m *Driver) Validate(hardLimits types.ResourceList) error {
|
||||
ret := _m.Called(hardLimits)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Validate")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(types.ResourceList) error); ok {
|
||||
r0 = rf(hardLimits)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package quota
|
||||
|
||||
@ -22,6 +22,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -53,6 +57,10 @@ func (_m *Manager) Create(ctx context.Context, reference string, referenceID str
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) (int64, error)); ok {
|
||||
@ -77,6 +85,10 @@ func (_m *Manager) Create(ctx context.Context, reference string, referenceID str
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -91,6 +103,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*models.Quota, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *models.Quota
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.Quota, error)); ok {
|
||||
@ -117,6 +133,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*models.Quota, error) {
|
||||
func (_m *Manager) GetByRef(ctx context.Context, reference string, referenceID string) (*models.Quota, error) {
|
||||
ret := _m.Called(ctx, reference, referenceID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByRef")
|
||||
}
|
||||
|
||||
var r0 *models.Quota
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.Quota, error)); ok {
|
||||
@ -143,6 +163,10 @@ func (_m *Manager) GetByRef(ctx context.Context, reference string, referenceID s
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Quota, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.Quota
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Quota, error)); ok {
|
||||
@ -169,6 +193,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Quota, e
|
||||
func (_m *Manager) Update(ctx context.Context, _a1 *models.Quota) error {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.Quota) error); ok {
|
||||
r0 = rf(ctx, _a1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) CreatePermission(ctx context.Context, rp *model.RolePermission) (int64, error) {
|
||||
ret := _m.Called(ctx, rp)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreatePermission")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) CreatePermission(ctx context.Context, rp *model.RolePermission) (
|
||||
func (_m *DAO) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPolicy) (int64, error) {
|
||||
ret := _m.Called(ctx, pp)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateRbacPolicy")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPolicy)
|
||||
func (_m *DAO) DeletePermission(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeletePermission")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) DeletePermission(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) DeletePermissionsByRole(ctx context.Context, roleType string, roleID int64) error {
|
||||
ret := _m.Called(ctx, roleType, roleID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeletePermissionsByRole")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
||||
r0 = rf(ctx, roleType, roleID)
|
||||
@ -97,6 +113,10 @@ func (_m *DAO) DeletePermissionsByRole(ctx context.Context, roleType string, rol
|
||||
func (_m *DAO) DeleteRbacPolicy(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteRbacPolicy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -111,6 +131,10 @@ func (_m *DAO) DeleteRbacPolicy(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) GetPermissionsByRole(ctx context.Context, roleType string, roleID int64) ([]*model.UniversalRolePermission, error) {
|
||||
ret := _m.Called(ctx, roleType, roleID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPermissionsByRole")
|
||||
}
|
||||
|
||||
var r0 []*model.UniversalRolePermission
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*model.UniversalRolePermission, error)); ok {
|
||||
@ -137,6 +161,10 @@ func (_m *DAO) GetPermissionsByRole(ctx context.Context, roleType string, roleID
|
||||
func (_m *DAO) ListPermissions(ctx context.Context, query *q.Query) ([]*model.RolePermission, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListPermissions")
|
||||
}
|
||||
|
||||
var r0 []*model.RolePermission
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RolePermission, error)); ok {
|
||||
@ -163,6 +191,10 @@ func (_m *DAO) ListPermissions(ctx context.Context, query *q.Query) ([]*model.Ro
|
||||
func (_m *DAO) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.PermissionPolicy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRbacPolicies")
|
||||
}
|
||||
|
||||
var r0 []*model.PermissionPolicy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.PermissionPolicy, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package rbac
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) CreatePermission(ctx context.Context, rp *model.RolePermission) (int64, error) {
|
||||
ret := _m.Called(ctx, rp)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreatePermission")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) CreatePermission(ctx context.Context, rp *model.RolePermissio
|
||||
func (_m *Manager) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPolicy) (int64, error) {
|
||||
ret := _m.Called(ctx, pp)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateRbacPolicy")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPol
|
||||
func (_m *Manager) DeletePermission(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeletePermission")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) DeletePermission(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) DeletePermissionsByRole(ctx context.Context, roleType string, roleID int64) error {
|
||||
ret := _m.Called(ctx, roleType, roleID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeletePermissionsByRole")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
||||
r0 = rf(ctx, roleType, roleID)
|
||||
@ -96,6 +112,10 @@ func (_m *Manager) DeletePermissionsByRole(ctx context.Context, roleType string,
|
||||
func (_m *Manager) DeleteRbacPolicy(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteRbacPolicy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -110,6 +130,10 @@ func (_m *Manager) DeleteRbacPolicy(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, roleID int64) ([]*model.UniversalRolePermission, error) {
|
||||
ret := _m.Called(ctx, roleType, roleID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetPermissionsByRole")
|
||||
}
|
||||
|
||||
var r0 []*model.UniversalRolePermission
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*model.UniversalRolePermission, error)); ok {
|
||||
@ -136,6 +160,10 @@ func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, ro
|
||||
func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*model.RolePermission, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListPermissions")
|
||||
}
|
||||
|
||||
var r0 []*model.RolePermission
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RolePermission, error)); ok {
|
||||
@ -162,6 +190,10 @@ func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*mode
|
||||
func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.PermissionPolicy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRbacPolicies")
|
||||
}
|
||||
|
||||
var r0 []*model.PermissionPolicy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.PermissionPolicy, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package adapter
|
||||
|
||||
@ -16,6 +16,10 @@ type Adapter struct {
|
||||
func (_m *Adapter) HealthCheck() (string, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for HealthCheck")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
||||
@ -40,6 +44,10 @@ func (_m *Adapter) HealthCheck() (string, error) {
|
||||
func (_m *Adapter) Info() (*model.RegistryInfo, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Info")
|
||||
}
|
||||
|
||||
var r0 *model.RegistryInfo
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok {
|
||||
@ -66,6 +74,10 @@ func (_m *Adapter) Info() (*model.RegistryInfo, error) {
|
||||
func (_m *Adapter) PrepareForPush(_a0 []*model.Resource) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PrepareForPush")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func([]*model.Resource) error); ok {
|
||||
r0 = rf(_a0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -20,6 +20,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, registry *dao.Registry) (int64, error) {
|
||||
ret := _m.Called(ctx, registry)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *DAO) Create(ctx context.Context, registry *dao.Registry) (int64, error
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Registry, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *dao.Registry
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Registry, error)); ok {
|
||||
@ -108,6 +124,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Registry, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Registry, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*dao.Registry
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Registry, error)); ok {
|
||||
@ -141,6 +161,10 @@ func (_m *DAO) Update(ctx context.Context, registry *dao.Registry, props ...stri
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry, ...string) error); ok {
|
||||
r0 = rf(ctx, registry, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package manager
|
||||
|
||||
@ -23,6 +23,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -47,6 +51,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, registry *model.Registry) (int64, error) {
|
||||
ret := _m.Called(ctx, registry)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) (int64, error)); ok {
|
||||
@ -71,6 +79,10 @@ func (_m *Manager) Create(ctx context.Context, registry *model.Registry) (int64,
|
||||
func (_m *Manager) CreateAdapter(ctx context.Context, registry *model.Registry) (adapter.Adapter, error) {
|
||||
ret := _m.Called(ctx, registry)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CreateAdapter")
|
||||
}
|
||||
|
||||
var r0 adapter.Adapter
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) (adapter.Adapter, error)); ok {
|
||||
@ -97,6 +109,10 @@ func (_m *Manager) CreateAdapter(ctx context.Context, registry *model.Registry)
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -111,6 +127,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.Registry, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Registry
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Registry, error)); ok {
|
||||
@ -137,6 +157,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Registry, error) {
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Registry, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Registry
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Registry, error)); ok {
|
||||
@ -163,6 +187,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Registry,
|
||||
func (_m *Manager) ListRegistryProviderInfos(ctx context.Context) (map[string]*model.AdapterPattern, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRegistryProviderInfos")
|
||||
}
|
||||
|
||||
var r0 map[string]*model.AdapterPattern
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (map[string]*model.AdapterPattern, error)); ok {
|
||||
@ -189,6 +217,10 @@ func (_m *Manager) ListRegistryProviderInfos(ctx context.Context) (map[string]*m
|
||||
func (_m *Manager) ListRegistryProviderTypes(ctx context.Context) ([]string, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListRegistryProviderTypes")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
|
||||
@ -222,6 +254,10 @@ func (_m *Manager) Update(ctx context.Context, registry *model.Registry, props .
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Registry, ...string) error); ok {
|
||||
r0 = rf(ctx, registry, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package registry
|
||||
|
||||
@ -21,6 +21,10 @@ type Client struct {
|
||||
func (_m *Client) BlobExist(repository string, digest string) (bool, error) {
|
||||
ret := _m.Called(repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for BlobExist")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *Client) BlobExist(repository string, digest string) (bool, error) {
|
||||
func (_m *Client) Catalog() ([]string, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Catalog")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() ([]string, error)); ok {
|
||||
@ -71,6 +79,10 @@ func (_m *Client) Catalog() ([]string, error) {
|
||||
func (_m *Client) Copy(srcRepository string, srcReference string, dstRepository string, dstReference string, override bool) error {
|
||||
ret := _m.Called(srcRepository, srcReference, dstRepository, dstReference, override)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Copy")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, string, bool) error); ok {
|
||||
r0 = rf(srcRepository, srcReference, dstRepository, dstReference, override)
|
||||
@ -85,6 +97,10 @@ func (_m *Client) Copy(srcRepository string, srcReference string, dstRepository
|
||||
func (_m *Client) DeleteBlob(repository string, digest string) error {
|
||||
ret := _m.Called(repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteBlob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(repository, digest)
|
||||
@ -99,6 +115,10 @@ func (_m *Client) DeleteBlob(repository string, digest string) error {
|
||||
func (_m *Client) DeleteManifest(repository string, reference string) error {
|
||||
ret := _m.Called(repository, reference)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteManifest")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(repository, reference)
|
||||
@ -113,6 +133,10 @@ func (_m *Client) DeleteManifest(repository string, reference string) error {
|
||||
func (_m *Client) Do(req *http.Request) (*http.Response, error) {
|
||||
ret := _m.Called(req)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Do")
|
||||
}
|
||||
|
||||
var r0 *http.Response
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok {
|
||||
@ -139,6 +163,10 @@ func (_m *Client) Do(req *http.Request) (*http.Response, error) {
|
||||
func (_m *Client) ListTags(repository string) ([]string, error) {
|
||||
ret := _m.Called(repository)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListTags")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
|
||||
@ -165,6 +193,10 @@ func (_m *Client) ListTags(repository string) ([]string, error) {
|
||||
func (_m *Client) ManifestExist(repository string, reference string) (bool, *distribution.Descriptor, error) {
|
||||
ret := _m.Called(repository, reference)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ManifestExist")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 *distribution.Descriptor
|
||||
var r2 error
|
||||
@ -198,6 +230,10 @@ func (_m *Client) ManifestExist(repository string, reference string) (bool, *dis
|
||||
func (_m *Client) MountBlob(srcRepository string, digest string, dstRepository string) error {
|
||||
ret := _m.Called(srcRepository, digest, dstRepository)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for MountBlob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
|
||||
r0 = rf(srcRepository, digest, dstRepository)
|
||||
@ -212,6 +248,10 @@ func (_m *Client) MountBlob(srcRepository string, digest string, dstRepository s
|
||||
func (_m *Client) Ping() error {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Ping")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
@ -226,6 +266,10 @@ func (_m *Client) Ping() error {
|
||||
func (_m *Client) PullBlob(repository string, digest string) (int64, io.ReadCloser, error) {
|
||||
ret := _m.Called(repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PullBlob")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 io.ReadCloser
|
||||
var r2 error
|
||||
@ -259,6 +303,10 @@ func (_m *Client) PullBlob(repository string, digest string) (int64, io.ReadClos
|
||||
func (_m *Client) PullBlobChunk(repository string, digest string, blobSize int64, start int64, end int64) (int64, io.ReadCloser, error) {
|
||||
ret := _m.Called(repository, digest, blobSize, start, end)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PullBlobChunk")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 io.ReadCloser
|
||||
var r2 error
|
||||
@ -299,6 +347,10 @@ func (_m *Client) PullManifest(repository string, reference string, acceptedMedi
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PullManifest")
|
||||
}
|
||||
|
||||
var r0 distribution.Manifest
|
||||
var r1 string
|
||||
var r2 error
|
||||
@ -332,6 +384,10 @@ func (_m *Client) PullManifest(repository string, reference string, acceptedMedi
|
||||
func (_m *Client) PushBlob(repository string, digest string, size int64, blob io.Reader) error {
|
||||
ret := _m.Called(repository, digest, size, blob)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PushBlob")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader) error); ok {
|
||||
r0 = rf(repository, digest, size, blob)
|
||||
@ -346,6 +402,10 @@ func (_m *Client) PushBlob(repository string, digest string, size int64, blob io
|
||||
func (_m *Client) PushBlobChunk(repository string, digest string, blobSize int64, chunk io.Reader, start int64, end int64, location string) (string, int64, error) {
|
||||
ret := _m.Called(repository, digest, blobSize, chunk, start, end, location)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PushBlobChunk")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -377,6 +437,10 @@ func (_m *Client) PushBlobChunk(repository string, digest string, blobSize int64
|
||||
func (_m *Client) PushManifest(repository string, reference string, mediaType string, payload []byte) (string, error) {
|
||||
ret := _m.Called(repository, reference, mediaType, payload)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for PushManifest")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, []byte) (string, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, policy *model.Policy) (int64, error) {
|
||||
ret := _m.Called(ctx, policy)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) Create(ctx context.Context, policy *model.Policy) (int64, error)
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
|
||||
@ -109,6 +125,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
|
||||
@ -142,6 +162,10 @@ func (_m *DAO) Update(ctx context.Context, policy *model.Policy, props ...string
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, ...string) error); ok {
|
||||
r0 = rf(ctx, policy, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package manager
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, policy *model.Policy) (int64, error) {
|
||||
ret := _m.Called(ctx, policy)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, policy *model.Policy) (int64, err
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok {
|
||||
@ -108,6 +124,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) {
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Policy
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok {
|
||||
@ -141,6 +161,10 @@ func (_m *Manager) Update(ctx context.Context, policy *model.Policy, props ...st
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, ...string) error); ok {
|
||||
r0 = rf(ctx, policy, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) AddPullCount(ctx context.Context, id int64, count uint64) error {
|
||||
ret := _m.Called(ctx, id, count)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddPullCount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok {
|
||||
r0 = rf(ctx, id, count)
|
||||
@ -35,6 +39,10 @@ func (_m *DAO) AddPullCount(ctx context.Context, id int64, count uint64) error {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -59,6 +67,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, repository *model.RepoRecord) (int64, error) {
|
||||
ret := _m.Called(ctx, repository)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) (int64, error)); ok {
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) Create(ctx context.Context, repository *model.RepoRecord) (int64,
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -97,6 +113,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok {
|
||||
@ -123,6 +143,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.RepoRecord, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok {
|
||||
@ -149,6 +173,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, e
|
||||
func (_m *DAO) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for NonEmptyRepos")
|
||||
}
|
||||
|
||||
var r0 []*model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.RepoRecord, error)); ok {
|
||||
@ -182,6 +210,10 @@ func (_m *DAO) Update(ctx context.Context, repository *model.RepoRecord, props .
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord, ...string) error); ok {
|
||||
r0 = rf(ctx, repository, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) AddPullCount(ctx context.Context, id int64, count uint64) error {
|
||||
ret := _m.Called(ctx, id, count)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for AddPullCount")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok {
|
||||
r0 = rf(ctx, id, count)
|
||||
@ -34,6 +38,10 @@ func (_m *Manager) AddPullCount(ctx context.Context, id int64, count uint64) err
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -58,6 +66,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, _a1 *model.RepoRecord) (int64, error) {
|
||||
ret := _m.Called(ctx, _a1)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) (int64, error)); ok {
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.RepoRecord) (int64, er
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -96,6 +112,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok {
|
||||
@ -122,6 +142,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.RepoRecord, error)
|
||||
func (_m *Manager) GetByName(ctx context.Context, name string) (*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, name)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetByName")
|
||||
}
|
||||
|
||||
var r0 *model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.RepoRecord, error)); ok {
|
||||
@ -148,6 +172,10 @@ func (_m *Manager) GetByName(ctx context.Context, name string) (*model.RepoRecor
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok {
|
||||
@ -174,6 +202,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.RepoRecor
|
||||
func (_m *Manager) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for NonEmptyRepos")
|
||||
}
|
||||
|
||||
var r0 []*model.RepoRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.RepoRecord, error)); ok {
|
||||
@ -207,6 +239,10 @@ func (_m *Manager) Update(ctx context.Context, _a1 *model.RepoRecord, props ...s
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord, ...string) error); ok {
|
||||
r0 = rf(ctx, _a1, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, r *model.Robot) (int64, error) {
|
||||
ret := _m.Called(ctx, r)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) (int64, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) Create(ctx context.Context, r *model.Robot) (int64, error) {
|
||||
func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *DAO) DeleteByProjectID(ctx context.Context, projectID int64) error {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteByProjectID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, projectID)
|
||||
@ -97,6 +113,10 @@ func (_m *DAO) DeleteByProjectID(ctx context.Context, projectID int64) error {
|
||||
func (_m *DAO) Get(ctx context.Context, id int64) (*model.Robot, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Robot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Robot, error)); ok {
|
||||
@ -123,6 +143,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Robot, error) {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Robot, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Robot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Robot, error)); ok {
|
||||
@ -156,6 +180,10 @@ func (_m *DAO) Update(ctx context.Context, r *model.Robot, props ...string) erro
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot, ...string) error); ok {
|
||||
r0 = rf(ctx, r, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package robot
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, m *model.Robot) (int64, error) {
|
||||
ret := _m.Called(ctx, m)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) (int64, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, m *model.Robot) (int64, error) {
|
||||
func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -82,6 +94,10 @@ func (_m *Manager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *Manager) DeleteByProjectID(ctx context.Context, projectID int64) error {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteByProjectID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, projectID)
|
||||
@ -96,6 +112,10 @@ func (_m *Manager) DeleteByProjectID(ctx context.Context, projectID int64) error
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*model.Robot, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.Robot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Robot, error)); ok {
|
||||
@ -122,6 +142,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Robot, error) {
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Robot, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.Robot
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Robot, error)); ok {
|
||||
@ -155,6 +179,10 @@ func (_m *Manager) Update(ctx context.Context, m *model.Robot, props ...string)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Robot, ...string) error); ok {
|
||||
r0 = rf(ctx, m, props...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package export
|
||||
|
||||
@ -17,6 +17,10 @@ type ArtifactDigestCalculator struct {
|
||||
func (_m *ArtifactDigestCalculator) Calculate(fileName string) (digest.Digest, error) {
|
||||
ret := _m.Called(fileName)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Calculate")
|
||||
}
|
||||
|
||||
var r0 digest.Digest
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (digest.Digest, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package export
|
||||
|
||||
@ -19,6 +19,10 @@ type FilterProcessor struct {
|
||||
func (_m *FilterProcessor) ProcessLabelFilter(ctx context.Context, labelIDs []int64, arts []*artifact.Artifact) ([]*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, labelIDs, arts)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ProcessLabelFilter")
|
||||
}
|
||||
|
||||
var r0 []*artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []int64, []*artifact.Artifact) ([]*artifact.Artifact, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *FilterProcessor) ProcessLabelFilter(ctx context.Context, labelIDs []in
|
||||
func (_m *FilterProcessor) ProcessRepositoryFilter(ctx context.Context, filter string, projectIds []int64) ([]int64, error) {
|
||||
ret := _m.Called(ctx, filter, projectIds)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ProcessRepositoryFilter")
|
||||
}
|
||||
|
||||
var r0 []int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, []int64) ([]int64, error)); ok {
|
||||
@ -71,6 +79,10 @@ func (_m *FilterProcessor) ProcessRepositoryFilter(ctx context.Context, filter s
|
||||
func (_m *FilterProcessor) ProcessTagFilter(ctx context.Context, filter string, repositoryIds []int64) ([]*artifact.Artifact, error) {
|
||||
ret := _m.Called(ctx, filter, repositoryIds)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ProcessTagFilter")
|
||||
}
|
||||
|
||||
var r0 []*artifact.Artifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, []int64) ([]*artifact.Artifact, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package export
|
||||
|
||||
@ -18,6 +18,10 @@ type Manager struct {
|
||||
func (_m *Manager) Fetch(ctx context.Context, params export.Params) ([]export.Data, error) {
|
||||
ret := _m.Called(ctx, params)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Fetch")
|
||||
}
|
||||
|
||||
var r0 []export.Data
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, export.Params) ([]export.Data, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package report
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Create(ctx context.Context, r *scan.Report) (string, error) {
|
||||
ret := _m.Called(ctx, r)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *scan.Report) (string, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Create(ctx context.Context, r *scan.Report) (string, error) {
|
||||
func (_m *Manager) Delete(ctx context.Context, uuid string) error {
|
||||
ret := _m.Called(ctx, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, uuid)
|
||||
@ -65,6 +73,10 @@ func (_m *Manager) DeleteByDigests(ctx context.Context, digests ...string) error
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteByDigests")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, ...string) error); ok {
|
||||
r0 = rf(ctx, digests...)
|
||||
@ -79,6 +91,10 @@ func (_m *Manager) DeleteByDigests(ctx context.Context, digests ...string) error
|
||||
func (_m *Manager) GetBy(ctx context.Context, digest string, registrationUUID string, mimeTypes []string) ([]*scan.Report, error) {
|
||||
ret := _m.Called(ctx, digest, registrationUUID, mimeTypes)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetBy")
|
||||
}
|
||||
|
||||
var r0 []*scan.Report
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) ([]*scan.Report, error)); ok {
|
||||
@ -105,6 +121,10 @@ func (_m *Manager) GetBy(ctx context.Context, digest string, registrationUUID st
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*scan.Report, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*scan.Report
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scan.Report, error)); ok {
|
||||
@ -138,6 +158,10 @@ func (_m *Manager) Update(ctx context.Context, r *scan.Report, cols ...string) e
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *scan.Report, ...string) error); ok {
|
||||
r0 = rf(ctx, r, cols...)
|
||||
@ -152,6 +176,10 @@ func (_m *Manager) Update(ctx context.Context, r *scan.Report, cols ...string) e
|
||||
func (_m *Manager) UpdateReportData(ctx context.Context, uuid string, _a2 string) error {
|
||||
ret := _m.Called(ctx, uuid, _a2)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateReportData")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
||||
r0 = rf(ctx, uuid, _a2)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
@ -16,6 +16,10 @@ type Client struct {
|
||||
func (_m *Client) GetMetadata() (*v1.ScannerAdapterMetadata, error) {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetMetadata")
|
||||
}
|
||||
|
||||
var r0 *v1.ScannerAdapterMetadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func() (*v1.ScannerAdapterMetadata, error)); ok {
|
||||
@ -42,6 +46,10 @@ func (_m *Client) GetMetadata() (*v1.ScannerAdapterMetadata, error) {
|
||||
func (_m *Client) GetScanReport(scanRequestID string, reportMIMEType string) (string, error) {
|
||||
ret := _m.Called(scanRequestID, reportMIMEType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetScanReport")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
|
||||
@ -66,6 +74,10 @@ func (_m *Client) GetScanReport(scanRequestID string, reportMIMEType string) (st
|
||||
func (_m *Client) SubmitScan(req *v1.ScanRequest) (*v1.ScanResponse, error) {
|
||||
ret := _m.Called(req)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SubmitScan")
|
||||
}
|
||||
|
||||
var r0 *v1.ScanResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(*v1.ScanRequest) (*v1.ScanResponse, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
@ -16,6 +16,10 @@ type ClientPool struct {
|
||||
func (_m *ClientPool) Get(url string, authType string, accessCredential string, skipCertVerify bool) (v1.Client, error) {
|
||||
ret := _m.Called(url, authType, accessCredential, skipCertVerify)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 v1.Client
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string, string, string, bool) (v1.Client, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
@ -17,6 +17,10 @@ type responseHandler struct {
|
||||
func (_m *responseHandler) Execute(code int, resp *http.Response) ([]byte, error) {
|
||||
ret := _m.Called(code, resp)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Execute")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, *http.Response) ([]byte, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scanner
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, registration *daoscanner.Registration) (string, error) {
|
||||
ret := _m.Called(ctx, registration)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) (string, error)); ok {
|
||||
@ -68,6 +76,10 @@ func (_m *Manager) Create(ctx context.Context, registration *daoscanner.Registra
|
||||
func (_m *Manager) DefaultScannerUUID(ctx context.Context) (string, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DefaultScannerUUID")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
|
||||
@ -92,6 +104,10 @@ func (_m *Manager) DefaultScannerUUID(ctx context.Context) (string, error) {
|
||||
func (_m *Manager) Delete(ctx context.Context, registrationUUID string) error {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, registrationUUID)
|
||||
@ -106,6 +122,10 @@ func (_m *Manager) Delete(ctx context.Context, registrationUUID string) error {
|
||||
func (_m *Manager) Get(ctx context.Context, registrationUUID string) (*daoscanner.Registration, error) {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *daoscanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) (*daoscanner.Registration, error)); ok {
|
||||
@ -132,6 +152,10 @@ func (_m *Manager) Get(ctx context.Context, registrationUUID string) (*daoscanne
|
||||
func (_m *Manager) GetDefault(ctx context.Context) (*daoscanner.Registration, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetDefault")
|
||||
}
|
||||
|
||||
var r0 *daoscanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (*daoscanner.Registration, error)); ok {
|
||||
@ -158,6 +182,10 @@ func (_m *Manager) GetDefault(ctx context.Context) (*daoscanner.Registration, er
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*daoscanner.Registration, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*daoscanner.Registration
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*daoscanner.Registration, error)); ok {
|
||||
@ -184,6 +212,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*daoscanner.Regi
|
||||
func (_m *Manager) SetAsDefault(ctx context.Context, registrationUUID string) error {
|
||||
ret := _m.Called(ctx, registrationUUID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for SetAsDefault")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, registrationUUID)
|
||||
@ -198,6 +230,10 @@ func (_m *Manager) SetAsDefault(ctx context.Context, registrationUUID string) er
|
||||
func (_m *Manager) Update(ctx context.Context, registration *daoscanner.Registration) error {
|
||||
ret := _m.Called(ctx, registration)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) error); ok {
|
||||
r0 = rf(ctx, registration)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package scheduler
|
||||
|
||||
@ -20,6 +20,10 @@ type Scheduler struct {
|
||||
func (_m *Scheduler) CountSchedules(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for CountSchedules")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -44,6 +48,10 @@ func (_m *Scheduler) CountSchedules(ctx context.Context, query *q.Query) (int64,
|
||||
func (_m *Scheduler) GetSchedule(ctx context.Context, id int64) (*scheduler.Schedule, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetSchedule")
|
||||
}
|
||||
|
||||
var r0 *scheduler.Schedule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*scheduler.Schedule, error)); ok {
|
||||
@ -70,6 +78,10 @@ func (_m *Scheduler) GetSchedule(ctx context.Context, id int64) (*scheduler.Sche
|
||||
func (_m *Scheduler) ListSchedules(ctx context.Context, query *q.Query) ([]*scheduler.Schedule, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListSchedules")
|
||||
}
|
||||
|
||||
var r0 []*scheduler.Schedule
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scheduler.Schedule, error)); ok {
|
||||
@ -96,6 +108,10 @@ func (_m *Scheduler) ListSchedules(ctx context.Context, query *q.Query) ([]*sche
|
||||
func (_m *Scheduler) Schedule(ctx context.Context, vendorType string, vendorID int64, cronType string, cron string, callbackFuncName string, callbackFuncParams interface{}, extraAttrs map[string]interface{}) (int64, error) {
|
||||
ret := _m.Called(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Schedule")
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -120,6 +136,10 @@ func (_m *Scheduler) Schedule(ctx context.Context, vendorType string, vendorID i
|
||||
func (_m *Scheduler) UnScheduleByID(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UnScheduleByID")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -134,6 +154,10 @@ func (_m *Scheduler) UnScheduleByID(ctx context.Context, id int64) error {
|
||||
func (_m *Scheduler) UnScheduleByVendor(ctx context.Context, vendorType string, vendorID int64) error {
|
||||
ret := _m.Called(ctx, vendorType, vendorID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UnScheduleByVendor")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
||||
r0 = rf(ctx, vendorType, vendorID)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package securityhub
|
||||
|
||||
@ -22,6 +22,10 @@ type Manager struct {
|
||||
func (_m *Manager) DangerousArtifacts(ctx context.Context, scannerUUID string, projectID int64, query *q.Query) ([]*model.DangerousArtifact, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DangerousArtifacts")
|
||||
}
|
||||
|
||||
var r0 []*model.DangerousArtifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, *q.Query) ([]*model.DangerousArtifact, error)); ok {
|
||||
@ -48,6 +52,10 @@ func (_m *Manager) DangerousArtifacts(ctx context.Context, scannerUUID string, p
|
||||
func (_m *Manager) DangerousCVEs(ctx context.Context, scannerUUID string, projectID int64, query *q.Query) ([]*scan.VulnerabilityRecord, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DangerousCVEs")
|
||||
}
|
||||
|
||||
var r0 []*scan.VulnerabilityRecord
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, *q.Query) ([]*scan.VulnerabilityRecord, error)); ok {
|
||||
@ -74,6 +82,10 @@ func (_m *Manager) DangerousCVEs(ctx context.Context, scannerUUID string, projec
|
||||
func (_m *Manager) ListVuls(ctx context.Context, scannerUUID string, projectID int64, query *q.Query) ([]*model.VulnerabilityItem, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListVuls")
|
||||
}
|
||||
|
||||
var r0 []*model.VulnerabilityItem
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, *q.Query) ([]*model.VulnerabilityItem, error)); ok {
|
||||
@ -100,6 +112,10 @@ func (_m *Manager) ListVuls(ctx context.Context, scannerUUID string, projectID i
|
||||
func (_m *Manager) ScannedArtifactsCount(ctx context.Context, scannerUUID string, projectID int64, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ScannedArtifactsCount")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, *q.Query) (int64, error)); ok {
|
||||
@ -124,6 +140,10 @@ func (_m *Manager) ScannedArtifactsCount(ctx context.Context, scannerUUID string
|
||||
func (_m *Manager) Summary(ctx context.Context, scannerUUID string, projectID int64, query *q.Query) (*model.Summary, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Summary")
|
||||
}
|
||||
|
||||
var r0 *model.Summary
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, *q.Query) (*model.Summary, error)); ok {
|
||||
@ -150,6 +170,10 @@ func (_m *Manager) Summary(ctx context.Context, scannerUUID string, projectID in
|
||||
func (_m *Manager) TotalArtifactsCount(ctx context.Context, projectID int64) (int64, error) {
|
||||
ret := _m.Called(ctx, projectID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for TotalArtifactsCount")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok {
|
||||
@ -174,6 +198,10 @@ func (_m *Manager) TotalArtifactsCount(ctx context.Context, projectID int64) (in
|
||||
func (_m *Manager) TotalVuls(ctx context.Context, scannerUUID string, projectID int64, tuneCount bool, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, scannerUUID, projectID, tuneCount, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for TotalVuls")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, bool, *q.Query) (int64, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package cleanup
|
||||
|
||||
@ -20,6 +20,10 @@ type Selector struct {
|
||||
func (_m *Selector) List(ctx context.Context) ([]*model.SystemArtifact, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.SystemArtifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) ([]*model.SystemArtifact, error)); ok {
|
||||
@ -46,6 +50,10 @@ func (_m *Selector) List(ctx context.Context) ([]*model.SystemArtifact, error) {
|
||||
func (_m *Selector) ListWithFilters(ctx context.Context, query *q.Query) ([]*model.SystemArtifact, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListWithFilters")
|
||||
}
|
||||
|
||||
var r0 []*model.SystemArtifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.SystemArtifact, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Create(ctx context.Context, systemArtifact *model.SystemArtifact) (int64, error) {
|
||||
ret := _m.Called(ctx, systemArtifact)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Create(ctx context.Context, systemArtifact *model.SystemArtifact)
|
||||
func (_m *DAO) Delete(ctx context.Context, vendor string, repository string, digest string) error {
|
||||
ret := _m.Called(ctx, vendor, repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
|
||||
r0 = rf(ctx, vendor, repository, digest)
|
||||
@ -59,6 +67,10 @@ func (_m *DAO) Delete(ctx context.Context, vendor string, repository string, dig
|
||||
func (_m *DAO) Get(ctx context.Context, vendor string, repository string, digest string) (*model.SystemArtifact, error) {
|
||||
ret := _m.Called(ctx, vendor, repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *model.SystemArtifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*model.SystemArtifact, error)); ok {
|
||||
@ -85,6 +97,10 @@ func (_m *DAO) Get(ctx context.Context, vendor string, repository string, digest
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.SystemArtifact, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*model.SystemArtifact
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.SystemArtifact, error)); ok {
|
||||
@ -111,6 +127,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.SystemArtifac
|
||||
func (_m *DAO) Size(ctx context.Context) (int64, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Size")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package systemartifact
|
||||
|
||||
@ -22,6 +22,10 @@ type Manager struct {
|
||||
func (_m *Manager) Cleanup(ctx context.Context) (int64, int64, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Cleanup")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 int64
|
||||
var r2 error
|
||||
@ -53,6 +57,10 @@ func (_m *Manager) Cleanup(ctx context.Context) (int64, int64, error) {
|
||||
func (_m *Manager) Create(ctx context.Context, artifactRecord *model.SystemArtifact, reader io.Reader) (int64, error) {
|
||||
ret := _m.Called(ctx, artifactRecord, reader)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact, io.Reader) (int64, error)); ok {
|
||||
@ -77,6 +85,10 @@ func (_m *Manager) Create(ctx context.Context, artifactRecord *model.SystemArtif
|
||||
func (_m *Manager) Delete(ctx context.Context, vendor string, repository string, digest string) error {
|
||||
ret := _m.Called(ctx, vendor, repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
|
||||
r0 = rf(ctx, vendor, repository, digest)
|
||||
@ -91,6 +103,10 @@ func (_m *Manager) Delete(ctx context.Context, vendor string, repository string,
|
||||
func (_m *Manager) Exists(ctx context.Context, vendor string, repository string, digest string) (bool, error) {
|
||||
ret := _m.Called(ctx, vendor, repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Exists")
|
||||
}
|
||||
|
||||
var r0 bool
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (bool, error)); ok {
|
||||
@ -115,6 +131,10 @@ func (_m *Manager) Exists(ctx context.Context, vendor string, repository string,
|
||||
func (_m *Manager) GetCleanupCriteria(vendor string, artifactType string) systemartifact.Selector {
|
||||
ret := _m.Called(vendor, artifactType)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetCleanupCriteria")
|
||||
}
|
||||
|
||||
var r0 systemartifact.Selector
|
||||
if rf, ok := ret.Get(0).(func(string, string) systemartifact.Selector); ok {
|
||||
r0 = rf(vendor, artifactType)
|
||||
@ -131,6 +151,10 @@ func (_m *Manager) GetCleanupCriteria(vendor string, artifactType string) system
|
||||
func (_m *Manager) GetStorageSize(ctx context.Context) (int64, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetStorageSize")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
|
||||
@ -155,6 +179,10 @@ func (_m *Manager) GetStorageSize(ctx context.Context) (int64, error) {
|
||||
func (_m *Manager) GetSystemArtifactProjectNames() []string {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetSystemArtifactProjectNames")
|
||||
}
|
||||
|
||||
var r0 []string
|
||||
if rf, ok := ret.Get(0).(func() []string); ok {
|
||||
r0 = rf()
|
||||
@ -171,6 +199,10 @@ func (_m *Manager) GetSystemArtifactProjectNames() []string {
|
||||
func (_m *Manager) Read(ctx context.Context, vendor string, repository string, digest string) (io.ReadCloser, error) {
|
||||
ret := _m.Called(ctx, vendor, repository, digest)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Read")
|
||||
}
|
||||
|
||||
var r0 io.ReadCloser
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (io.ReadCloser, error)); ok {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -22,6 +22,10 @@ type ExecutionManager struct {
|
||||
func (_m *ExecutionManager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -53,6 +57,10 @@ func (_m *ExecutionManager) Create(ctx context.Context, vendorType string, vendo
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) (int64, error)); ok {
|
||||
@ -77,6 +85,10 @@ func (_m *ExecutionManager) Create(ctx context.Context, vendorType string, vendo
|
||||
func (_m *ExecutionManager) Delete(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -91,6 +103,10 @@ func (_m *ExecutionManager) Delete(ctx context.Context, id int64) error {
|
||||
func (_m *ExecutionManager) DeleteByVendor(ctx context.Context, vendorType string, vendorID int64) error {
|
||||
ret := _m.Called(ctx, vendorType, vendorID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for DeleteByVendor")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, int64) error); ok {
|
||||
r0 = rf(ctx, vendorType, vendorID)
|
||||
@ -105,6 +121,10 @@ func (_m *ExecutionManager) DeleteByVendor(ctx context.Context, vendorType strin
|
||||
func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *task.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Execution, error)); ok {
|
||||
@ -131,6 +151,10 @@ func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution,
|
||||
func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.Execution, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*task.Execution
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*task.Execution, error)); ok {
|
||||
@ -157,6 +181,10 @@ func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.E
|
||||
func (_m *ExecutionManager) MarkDone(ctx context.Context, id int64, message string) error {
|
||||
ret := _m.Called(ctx, id, message)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for MarkDone")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(ctx, id, message)
|
||||
@ -171,6 +199,10 @@ func (_m *ExecutionManager) MarkDone(ctx context.Context, id int64, message stri
|
||||
func (_m *ExecutionManager) MarkError(ctx context.Context, id int64, message string) error {
|
||||
ret := _m.Called(ctx, id, message)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for MarkError")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||||
r0 = rf(ctx, id, message)
|
||||
@ -185,6 +217,10 @@ func (_m *ExecutionManager) MarkError(ctx context.Context, id int64, message str
|
||||
func (_m *ExecutionManager) Stop(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -199,6 +235,10 @@ func (_m *ExecutionManager) Stop(ctx context.Context, id int64) error {
|
||||
func (_m *ExecutionManager) StopAndWait(ctx context.Context, id int64, timeout time.Duration) error {
|
||||
ret := _m.Called(ctx, id, timeout)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for StopAndWait")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Duration) error); ok {
|
||||
r0 = rf(ctx, id, timeout)
|
||||
@ -213,6 +253,10 @@ func (_m *ExecutionManager) StopAndWait(ctx context.Context, id int64, timeout t
|
||||
func (_m *ExecutionManager) StopAndWaitWithError(ctx context.Context, id int64, timeout time.Duration, origError error) error {
|
||||
ret := _m.Called(ctx, id, timeout, origError)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for StopAndWaitWithError")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Duration, error) error); ok {
|
||||
r0 = rf(ctx, id, timeout, origError)
|
||||
@ -227,6 +271,10 @@ func (_m *ExecutionManager) StopAndWaitWithError(ctx context.Context, id int64,
|
||||
func (_m *ExecutionManager) UpdateExtraAttrs(ctx context.Context, id int64, extraAttrs map[string]interface{}) error {
|
||||
ret := _m.Called(ctx, id, extraAttrs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateExtraAttrs")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, map[string]interface{}) error); ok {
|
||||
r0 = rf(ctx, id, extraAttrs)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
@ -20,6 +20,10 @@ type Manager struct {
|
||||
func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -51,6 +55,10 @@ func (_m *Manager) Create(ctx context.Context, executionID int64, job *task.Job,
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, *task.Job, ...map[string]interface{}) (int64, error)); ok {
|
||||
@ -75,6 +83,10 @@ func (_m *Manager) Create(ctx context.Context, executionID int64, job *task.Job,
|
||||
func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType string, status string) ([]int64, error) {
|
||||
ret := _m.Called(ctx, vendorType, status)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ExecutionIDsByVendorAndStatus")
|
||||
}
|
||||
|
||||
var r0 []int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok {
|
||||
@ -101,6 +113,10 @@ func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType
|
||||
func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Get")
|
||||
}
|
||||
|
||||
var r0 *task.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok {
|
||||
@ -127,6 +143,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error) {
|
||||
func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error) {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLog")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok {
|
||||
@ -153,6 +173,10 @@ func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error) {
|
||||
func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, error) {
|
||||
ret := _m.Called(ctx, jobID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetLogByJobID")
|
||||
}
|
||||
|
||||
var r0 []byte
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
|
||||
@ -179,6 +203,10 @@ func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, err
|
||||
func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*task.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*task.Task, error)); ok {
|
||||
@ -205,6 +233,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, erro
|
||||
func (_m *Manager) ListScanTasksByReportUUID(ctx context.Context, uuid string) ([]*task.Task, error) {
|
||||
ret := _m.Called(ctx, uuid)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListScanTasksByReportUUID")
|
||||
}
|
||||
|
||||
var r0 []*task.Task
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*task.Task, error)); ok {
|
||||
@ -231,6 +263,10 @@ func (_m *Manager) ListScanTasksByReportUUID(ctx context.Context, uuid string) (
|
||||
func (_m *Manager) Stop(ctx context.Context, id int64) error {
|
||||
ret := _m.Called(ctx, id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Stop")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||
r0 = rf(ctx, id)
|
||||
@ -252,6 +288,10 @@ func (_m *Manager) Update(ctx context.Context, _a1 *task.Task, props ...string)
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *task.Task, ...string) error); ok {
|
||||
r0 = rf(ctx, _a1, props...)
|
||||
@ -266,6 +306,10 @@ func (_m *Manager) Update(ctx context.Context, _a1 *task.Task, props ...string)
|
||||
func (_m *Manager) UpdateExtraAttrs(ctx context.Context, id int64, extraAttrs map[string]interface{}) error {
|
||||
ret := _m.Called(ctx, id, extraAttrs)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateExtraAttrs")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, map[string]interface{}) error); ok {
|
||||
r0 = rf(ctx, id, extraAttrs)
|
||||
@ -280,6 +324,10 @@ func (_m *Manager) UpdateExtraAttrs(ctx context.Context, id int64, extraAttrs ma
|
||||
func (_m *Manager) UpdateStatusInBatch(ctx context.Context, jobIDs []string, status string, batchSize int) error {
|
||||
ret := _m.Called(ctx, jobIDs, status, batchSize)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateStatusInBatch")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []string, string, int) error); ok {
|
||||
r0 = rf(ctx, jobIDs, status, batchSize)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.35.4. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
package dao
|
||||
|
||||
@ -21,6 +21,10 @@ type DAO struct {
|
||||
func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Count")
|
||||
}
|
||||
|
||||
var r0 int64
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok {
|
||||
@ -45,6 +49,10 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) {
|
||||
func (_m *DAO) Create(ctx context.Context, user *models.User) (int, error) {
|
||||
ret := _m.Called(ctx, user)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Create")
|
||||
}
|
||||
|
||||
var r0 int
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.User) (int, error)); ok {
|
||||
@ -69,6 +77,10 @@ func (_m *DAO) Create(ctx context.Context, user *models.User) (int, error) {
|
||||
func (_m *DAO) Delete(ctx context.Context, userID int) error {
|
||||
ret := _m.Called(ctx, userID)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Delete")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
||||
r0 = rf(ctx, userID)
|
||||
@ -83,6 +95,10 @@ func (_m *DAO) Delete(ctx context.Context, userID int) error {
|
||||
func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*models.User, error) {
|
||||
ret := _m.Called(ctx, query)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
}
|
||||
|
||||
var r0 []*models.User
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.User, error)); ok {
|
||||
@ -116,6 +132,10 @@ func (_m *DAO) Update(ctx context.Context, user *models.User, props ...string) e
|
||||
_ca = append(_ca, _va...)
|
||||
ret := _m.Called(_ca...)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Update")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *models.User, ...string) error); ok {
|
||||
r0 = rf(ctx, user, props...)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user