2024-04-11 05:37:59 +02:00
// Code generated by mockery v2.42.2. DO NOT EDIT.
2020-03-12 12:30:12 +01:00
package scanner
import (
2021-03-01 05:02:40 +01:00
context "context"
2021-03-03 05:23:36 +01:00
daoscanner "github.com/goharbor/harbor/src/pkg/scan/dao/scanner"
2020-03-12 12:30:12 +01:00
mock "github.com/stretchr/testify/mock"
2021-03-03 05:23:36 +01:00
q "github.com/goharbor/harbor/src/lib/q"
2020-03-12 12:30:12 +01:00
)
// Manager is an autogenerated mock type for the Manager type
type Manager struct {
mock . Mock
}
2021-03-03 05:23:36 +01:00
// Count provides a mock function with given fields: ctx, query
func ( _m * Manager ) Count ( ctx context . Context , query * q . Query ) ( int64 , error ) {
ret := _m . Called ( ctx , query )
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for Count" )
}
2021-03-03 05:23:36 +01:00
var r0 int64
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * q . Query ) ( int64 , error ) ) ; ok {
return rf ( ctx , query )
}
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * q . Query ) int64 ) ; ok {
r0 = rf ( ctx , query )
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * q . Query ) error ) ; ok {
r1 = rf ( ctx , query )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-03-01 05:02:40 +01:00
// Create provides a mock function with given fields: ctx, registration
2021-03-03 05:23:36 +01:00
func ( _m * Manager ) Create ( ctx context . Context , registration * daoscanner . Registration ) ( string , error ) {
2021-03-01 05:02:40 +01:00
ret := _m . Called ( ctx , registration )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for Create" )
}
2020-03-12 12:30:12 +01:00
var r0 string
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * daoscanner . Registration ) ( string , error ) ) ; ok {
return rf ( ctx , registration )
}
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * daoscanner . Registration ) string ) ; ok {
2021-03-01 05:02:40 +01:00
r0 = rf ( ctx , registration )
2020-03-12 12:30:12 +01:00
} else {
r0 = ret . Get ( 0 ) . ( string )
}
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * daoscanner . Registration ) error ) ; ok {
2021-03-01 05:02:40 +01:00
r1 = rf ( ctx , registration )
2020-03-12 12:30:12 +01:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-19 04:17:14 +02:00
// DefaultScannerUUID provides a mock function with given fields: ctx
func ( _m * Manager ) DefaultScannerUUID ( ctx context . Context ) ( string , error ) {
ret := _m . Called ( ctx )
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for DefaultScannerUUID" )
}
2023-07-19 04:17:14 +02:00
var r0 string
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( string , error ) ) ; ok {
return rf ( ctx )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) string ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-03-01 05:02:40 +01:00
// Delete provides a mock function with given fields: ctx, registrationUUID
func ( _m * Manager ) Delete ( ctx context . Context , registrationUUID string ) error {
ret := _m . Called ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for Delete" )
}
2020-03-12 12:30:12 +01:00
var r0 error
2021-03-01 05:02:40 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2021-03-01 05:02:40 +01:00
// Get provides a mock function with given fields: ctx, registrationUUID
2021-03-03 05:23:36 +01:00
func ( _m * Manager ) Get ( ctx context . Context , registrationUUID string ) ( * daoscanner . Registration , error ) {
2021-03-01 05:02:40 +01:00
ret := _m . Called ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for Get" )
}
2021-03-03 05:23:36 +01:00
var r0 * daoscanner . Registration
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( * daoscanner . Registration , error ) ) ; ok {
return rf ( ctx , registrationUUID )
}
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * daoscanner . Registration ) ; ok {
2021-03-01 05:02:40 +01:00
r0 = rf ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
} else {
if ret . Get ( 0 ) != nil {
2021-03-03 05:23:36 +01:00
r0 = ret . Get ( 0 ) . ( * daoscanner . Registration )
2020-03-12 12:30:12 +01:00
}
}
2021-03-01 05:02:40 +01:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-03-01 05:02:40 +01:00
// GetDefault provides a mock function with given fields: ctx
2021-03-03 05:23:36 +01:00
func ( _m * Manager ) GetDefault ( ctx context . Context ) ( * daoscanner . Registration , error ) {
2021-03-01 05:02:40 +01:00
ret := _m . Called ( ctx )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetDefault" )
}
2021-03-03 05:23:36 +01:00
var r0 * daoscanner . Registration
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( * daoscanner . Registration , error ) ) ; ok {
return rf ( ctx )
}
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) * daoscanner . Registration ) ; ok {
2021-03-01 05:02:40 +01:00
r0 = rf ( ctx )
2020-03-12 12:30:12 +01:00
} else {
if ret . Get ( 0 ) != nil {
2021-03-03 05:23:36 +01:00
r0 = ret . Get ( 0 ) . ( * daoscanner . Registration )
2020-03-12 12:30:12 +01:00
}
}
2021-03-01 05:02:40 +01:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
2020-03-12 12:30:12 +01:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-03-01 05:02:40 +01:00
// List provides a mock function with given fields: ctx, query
2021-03-03 05:23:36 +01:00
func ( _m * Manager ) List ( ctx context . Context , query * q . Query ) ( [ ] * daoscanner . Registration , error ) {
2021-03-01 05:02:40 +01:00
ret := _m . Called ( ctx , query )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for List" )
}
2021-03-03 05:23:36 +01:00
var r0 [ ] * daoscanner . Registration
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * q . Query ) ( [ ] * daoscanner . Registration , error ) ) ; ok {
return rf ( ctx , query )
}
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * q . Query ) [ ] * daoscanner . Registration ) ; ok {
2021-03-01 05:02:40 +01:00
r0 = rf ( ctx , query )
2020-03-12 12:30:12 +01:00
} else {
if ret . Get ( 0 ) != nil {
2021-03-03 05:23:36 +01:00
r0 = ret . Get ( 0 ) . ( [ ] * daoscanner . Registration )
2020-03-12 12:30:12 +01:00
}
}
2021-03-01 05:02:40 +01:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * q . Query ) error ) ; ok {
r1 = rf ( ctx , query )
2020-03-12 12:30:12 +01:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-03-01 05:02:40 +01:00
// SetAsDefault provides a mock function with given fields: ctx, registrationUUID
func ( _m * Manager ) SetAsDefault ( ctx context . Context , registrationUUID string ) error {
ret := _m . Called ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for SetAsDefault" )
}
2020-03-12 12:30:12 +01:00
var r0 error
2021-03-01 05:02:40 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , registrationUUID )
2020-03-12 12:30:12 +01:00
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2021-03-01 05:02:40 +01:00
// Update provides a mock function with given fields: ctx, registration
2021-03-03 05:23:36 +01:00
func ( _m * Manager ) Update ( ctx context . Context , registration * daoscanner . Registration ) error {
2021-03-01 05:02:40 +01:00
ret := _m . Called ( ctx , registration )
2020-03-12 12:30:12 +01:00
2024-04-11 05:37:59 +02:00
if len ( ret ) == 0 {
panic ( "no return value specified for Update" )
}
2020-03-12 12:30:12 +01:00
var r0 error
2021-03-03 05:23:36 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * daoscanner . Registration ) error ) ; ok {
2021-03-01 05:02:40 +01:00
r0 = rf ( ctx , registration )
2020-03-12 12:30:12 +01:00
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-06-07 10:04:33 +02:00
2023-11-05 07:37:25 +01:00
// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewManager ( t interface {
2022-06-07 10:04:33 +02:00
mock . TestingT
Cleanup ( func ( ) )
2023-11-05 07:37:25 +01:00
} ) * Manager {
2022-06-07 10:04:33 +02:00
mock := & Manager { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}