Documentation
¶
Index ¶
- type MockScheduler
- func (_mock *MockScheduler) CreateOrUpdateOneTimeTask(tag string, at time.Time, task func() error) error
- func (_mock *MockScheduler) CreateOrUpdateRecurringTask(tag string, cron string, task func() error) error
- func (_mock *MockScheduler) DeleteTask(tag string) error
- func (_m *MockScheduler) EXPECT() *MockScheduler_Expecter
- func (_mock *MockScheduler) GetTaskNextRun(tag string) string
- type MockScheduler_CreateOrUpdateOneTimeTask_Call
- func (_c *MockScheduler_CreateOrUpdateOneTimeTask_Call) Return(err error) *MockScheduler_CreateOrUpdateOneTimeTask_Call
- func (_c *MockScheduler_CreateOrUpdateOneTimeTask_Call) Run(run func(tag string, at time.Time, task func() error)) *MockScheduler_CreateOrUpdateOneTimeTask_Call
- func (_c *MockScheduler_CreateOrUpdateOneTimeTask_Call) RunAndReturn(run func(tag string, at time.Time, task func() error) error) *MockScheduler_CreateOrUpdateOneTimeTask_Call
- type MockScheduler_CreateOrUpdateRecurringTask_Call
- func (_c *MockScheduler_CreateOrUpdateRecurringTask_Call) Return(err error) *MockScheduler_CreateOrUpdateRecurringTask_Call
- func (_c *MockScheduler_CreateOrUpdateRecurringTask_Call) Run(run func(tag string, cron string, task func() error)) *MockScheduler_CreateOrUpdateRecurringTask_Call
- func (_c *MockScheduler_CreateOrUpdateRecurringTask_Call) RunAndReturn(run func(tag string, cron string, task func() error) error) *MockScheduler_CreateOrUpdateRecurringTask_Call
- type MockScheduler_DeleteTask_Call
- func (_c *MockScheduler_DeleteTask_Call) Return(err error) *MockScheduler_DeleteTask_Call
- func (_c *MockScheduler_DeleteTask_Call) Run(run func(tag string)) *MockScheduler_DeleteTask_Call
- func (_c *MockScheduler_DeleteTask_Call) RunAndReturn(run func(tag string) error) *MockScheduler_DeleteTask_Call
- type MockScheduler_Expecter
- func (_e *MockScheduler_Expecter) CreateOrUpdateOneTimeTask(tag interface{}, at interface{}, task interface{}) *MockScheduler_CreateOrUpdateOneTimeTask_Call
- func (_e *MockScheduler_Expecter) CreateOrUpdateRecurringTask(tag interface{}, cron interface{}, task interface{}) *MockScheduler_CreateOrUpdateRecurringTask_Call
- func (_e *MockScheduler_Expecter) DeleteTask(tag interface{}) *MockScheduler_DeleteTask_Call
- func (_e *MockScheduler_Expecter) GetTaskNextRun(tag interface{}) *MockScheduler_GetTaskNextRun_Call
- type MockScheduler_GetTaskNextRun_Call
- func (_c *MockScheduler_GetTaskNextRun_Call) Return(s string) *MockScheduler_GetTaskNextRun_Call
- func (_c *MockScheduler_GetTaskNextRun_Call) Run(run func(tag string)) *MockScheduler_GetTaskNextRun_Call
- func (_c *MockScheduler_GetTaskNextRun_Call) RunAndReturn(run func(tag string) string) *MockScheduler_GetTaskNextRun_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockScheduler ¶
MockScheduler is an autogenerated mock type for the Scheduler type
func NewMockScheduler ¶
func NewMockScheduler(t interface {
mock.TestingT
Cleanup(func())
}) *MockScheduler
NewMockScheduler creates a new instance of MockScheduler. 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 (*MockScheduler) CreateOrUpdateOneTimeTask ¶ added in v1.2.0
func (_mock *MockScheduler) CreateOrUpdateOneTimeTask(tag string, at time.Time, task func() error) error
CreateOrUpdateOneTimeTask provides a mock function for the type MockScheduler
func (*MockScheduler) CreateOrUpdateRecurringTask ¶ added in v1.2.0
func (_mock *MockScheduler) CreateOrUpdateRecurringTask(tag string, cron string, task func() error) error
CreateOrUpdateRecurringTask provides a mock function for the type MockScheduler
func (*MockScheduler) DeleteTask ¶
func (_mock *MockScheduler) DeleteTask(tag string) error
DeleteTask provides a mock function for the type MockScheduler
func (*MockScheduler) EXPECT ¶
func (_m *MockScheduler) EXPECT() *MockScheduler_Expecter
func (*MockScheduler) GetTaskNextRun ¶ added in v1.2.0
func (_mock *MockScheduler) GetTaskNextRun(tag string) string
GetTaskNextRun provides a mock function for the type MockScheduler
type MockScheduler_CreateOrUpdateOneTimeTask_Call ¶ added in v1.2.0
MockScheduler_CreateOrUpdateOneTimeTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOrUpdateOneTimeTask'
func (*MockScheduler_CreateOrUpdateOneTimeTask_Call) Return ¶ added in v1.2.0
func (_c *MockScheduler_CreateOrUpdateOneTimeTask_Call) Return(err error) *MockScheduler_CreateOrUpdateOneTimeTask_Call
func (*MockScheduler_CreateOrUpdateOneTimeTask_Call) Run ¶ added in v1.2.0
func (_c *MockScheduler_CreateOrUpdateOneTimeTask_Call) Run(run func(tag string, at time.Time, task func() error)) *MockScheduler_CreateOrUpdateOneTimeTask_Call
func (*MockScheduler_CreateOrUpdateOneTimeTask_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockScheduler_CreateOrUpdateOneTimeTask_Call) RunAndReturn(run func(tag string, at time.Time, task func() error) error) *MockScheduler_CreateOrUpdateOneTimeTask_Call
type MockScheduler_CreateOrUpdateRecurringTask_Call ¶ added in v1.2.0
MockScheduler_CreateOrUpdateRecurringTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOrUpdateRecurringTask'
func (*MockScheduler_CreateOrUpdateRecurringTask_Call) Return ¶ added in v1.2.0
func (_c *MockScheduler_CreateOrUpdateRecurringTask_Call) Return(err error) *MockScheduler_CreateOrUpdateRecurringTask_Call
func (*MockScheduler_CreateOrUpdateRecurringTask_Call) Run ¶ added in v1.2.0
func (_c *MockScheduler_CreateOrUpdateRecurringTask_Call) Run(run func(tag string, cron string, task func() error)) *MockScheduler_CreateOrUpdateRecurringTask_Call
func (*MockScheduler_CreateOrUpdateRecurringTask_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockScheduler_CreateOrUpdateRecurringTask_Call) RunAndReturn(run func(tag string, cron string, task func() error) error) *MockScheduler_CreateOrUpdateRecurringTask_Call
type MockScheduler_DeleteTask_Call ¶
MockScheduler_DeleteTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTask'
func (*MockScheduler_DeleteTask_Call) Return ¶
func (_c *MockScheduler_DeleteTask_Call) Return(err error) *MockScheduler_DeleteTask_Call
func (*MockScheduler_DeleteTask_Call) Run ¶
func (_c *MockScheduler_DeleteTask_Call) Run(run func(tag string)) *MockScheduler_DeleteTask_Call
func (*MockScheduler_DeleteTask_Call) RunAndReturn ¶
func (_c *MockScheduler_DeleteTask_Call) RunAndReturn(run func(tag string) error) *MockScheduler_DeleteTask_Call
type MockScheduler_Expecter ¶
type MockScheduler_Expecter struct {
// contains filtered or unexported fields
}
func (*MockScheduler_Expecter) CreateOrUpdateOneTimeTask ¶ added in v1.2.0
func (_e *MockScheduler_Expecter) CreateOrUpdateOneTimeTask(tag interface{}, at interface{}, task interface{}) *MockScheduler_CreateOrUpdateOneTimeTask_Call
CreateOrUpdateOneTimeTask is a helper method to define mock.On call
- tag string
- at time.Time
- task func() error
func (*MockScheduler_Expecter) CreateOrUpdateRecurringTask ¶ added in v1.2.0
func (_e *MockScheduler_Expecter) CreateOrUpdateRecurringTask(tag interface{}, cron interface{}, task interface{}) *MockScheduler_CreateOrUpdateRecurringTask_Call
CreateOrUpdateRecurringTask is a helper method to define mock.On call
- tag string
- cron string
- task func() error
func (*MockScheduler_Expecter) DeleteTask ¶
func (_e *MockScheduler_Expecter) DeleteTask(tag interface{}) *MockScheduler_DeleteTask_Call
DeleteTask is a helper method to define mock.On call
- tag string
func (*MockScheduler_Expecter) GetTaskNextRun ¶ added in v1.2.0
func (_e *MockScheduler_Expecter) GetTaskNextRun(tag interface{}) *MockScheduler_GetTaskNextRun_Call
GetTaskNextRun is a helper method to define mock.On call
- tag string
type MockScheduler_GetTaskNextRun_Call ¶ added in v1.2.0
MockScheduler_GetTaskNextRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskNextRun'
func (*MockScheduler_GetTaskNextRun_Call) Return ¶ added in v1.2.0
func (_c *MockScheduler_GetTaskNextRun_Call) Return(s string) *MockScheduler_GetTaskNextRun_Call
func (*MockScheduler_GetTaskNextRun_Call) Run ¶ added in v1.2.0
func (_c *MockScheduler_GetTaskNextRun_Call) Run(run func(tag string)) *MockScheduler_GetTaskNextRun_Call
func (*MockScheduler_GetTaskNextRun_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockScheduler_GetTaskNextRun_Call) RunAndReturn(run func(tag string) string) *MockScheduler_GetTaskNextRun_Call