2023-03-11 01:16:11 +01:00
// Code generated by mockery v2.22.1. DO NOT EDIT.
2022-03-21 08:49:42 +01:00
package jobservice
import (
context "context"
mock "github.com/stretchr/testify/mock"
2022-11-17 13:12:07 +01:00
q "github.com/goharbor/harbor/src/lib/q"
2022-03-21 08:49:42 +01:00
scheduler "github.com/goharbor/harbor/src/pkg/scheduler"
)
// SchedulerController is an autogenerated mock type for the SchedulerController type
type SchedulerController struct {
mock . Mock
}
2022-11-17 13:12:07 +01:00
// Count provides a mock function with given fields: ctx, query
func ( _m * SchedulerController ) Count ( ctx context . Context , query * q . Query ) ( int64 , error ) {
ret := _m . Called ( ctx , query )
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 )
}
2022-11-17 13:12:07 +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
}
2022-03-21 08:49:42 +01:00
// Create provides a mock function with given fields: ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam
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 )
var r0 int64
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , string , interface { } , map [ string ] interface { } ) ( int64 , error ) ) ; ok {
return rf ( ctx , vendorType , cronType , cron , callbackFuncName , policy , extrasParam )
}
2022-03-21 08:49:42 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , string , interface { } , map [ string ] interface { } ) int64 ) ; ok {
r0 = rf ( ctx , vendorType , cronType , cron , callbackFuncName , policy , extrasParam )
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string , string , string , interface { } , map [ string ] interface { } ) error ) ; ok {
r1 = rf ( ctx , vendorType , cronType , cron , callbackFuncName , policy , extrasParam )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// Delete provides a mock function with given fields: ctx, vendorType
func ( _m * SchedulerController ) Delete ( ctx context . Context , vendorType string ) error {
ret := _m . Called ( ctx , vendorType )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , vendorType )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Get provides a mock function with given fields: ctx, vendorType
func ( _m * SchedulerController ) Get ( ctx context . Context , vendorType string ) ( * scheduler . Schedule , error ) {
ret := _m . Called ( ctx , vendorType )
var r0 * scheduler . Schedule
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( * scheduler . Schedule , error ) ) ; ok {
return rf ( ctx , vendorType )
}
2022-03-21 08:49:42 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * scheduler . Schedule ) ; ok {
r0 = rf ( ctx , vendorType )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * scheduler . Schedule )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , vendorType )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-06-07 10:04:33 +02:00
2022-11-17 13:12:07 +01:00
// List provides a mock function with given fields: ctx, query
func ( _m * SchedulerController ) List ( ctx context . Context , query * q . Query ) ( [ ] * scheduler . Schedule , error ) {
ret := _m . Called ( ctx , query )
var r0 [ ] * scheduler . Schedule
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * q . Query ) ( [ ] * scheduler . Schedule , error ) ) ; ok {
return rf ( ctx , query )
}
2022-11-17 13:12:07 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * q . Query ) [ ] * scheduler . Schedule ) ; ok {
r0 = rf ( ctx , query )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * scheduler . Schedule )
}
}
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
}
// Paused provides a mock function with given fields: ctx
func ( _m * SchedulerController ) Paused ( ctx context . Context ) ( bool , error ) {
ret := _m . Called ( ctx )
var r0 bool
2023-03-11 01:16:11 +01:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( bool , error ) ) ; ok {
return rf ( ctx )
}
2022-11-17 13:12:07 +01:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) bool ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-22 08:21:13 +02:00
type mockConstructorTestingTNewSchedulerController interface {
2022-06-07 10:04:33 +02:00
mock . TestingT
Cleanup ( func ( ) )
}
// NewSchedulerController creates a new instance of SchedulerController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2022-08-22 08:21:13 +02:00
func NewSchedulerController ( t mockConstructorTestingTNewSchedulerController ) * SchedulerController {
2022-06-07 10:04:33 +02:00
mock := & SchedulerController { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}