// Code generated by mockery v2.42.2. DO NOT EDIT. package task import ( context "context" pkgtask "github.com/goharbor/harbor/src/pkg/task" mock "github.com/stretchr/testify/mock" q "github.com/goharbor/harbor/src/lib/q" ) // Controller is an autogenerated mock type for the Controller type type Controller struct { mock.Mock } // Count provides a mock function with given fields: ctx, query 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 { return rf(ctx, query) } 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 } // Get provides a mock function with given fields: ctx, id 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 { return rf(ctx, id) } if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Task); ok { r0 = rf(ctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*pkgtask.Task) } } if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // GetLog provides a mock function with given fields: ctx, id 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 { return rf(ctx, id) } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // List provides a mock function with given fields: ctx, query 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 { return rf(ctx, query) } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Task); ok { r0 = rf(ctx, query) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*pkgtask.Task) } } 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 } // Stop provides a mock function with given fields: ctx, id 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) } else { r0 = ret.Error(0) } return r0 } // NewController creates a new instance of Controller. 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 NewController(t interface { mock.TestingT Cleanup(func()) }) *Controller { mock := &Controller{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }