-
-
Notifications
You must be signed in to change notification settings - Fork 314
/
job.go
141 lines (121 loc) · 3.8 KB
/
job.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/go-co-op/gocron/v2 (interfaces: Job)
//
// Generated by this command:
//
// mockgen -destination=mocks/job.go -package=gocronmocks . Job
//
// Package gocronmocks is a generated GoMock package.
package gocronmocks
import (
reflect "reflect"
time "time"
uuid "github.com/google/uuid"
gomock "go.uber.org/mock/gomock"
)
// MockJob is a mock of Job interface.
type MockJob struct {
ctrl *gomock.Controller
recorder *MockJobMockRecorder
}
// MockJobMockRecorder is the mock recorder for MockJob.
type MockJobMockRecorder struct {
mock *MockJob
}
// NewMockJob creates a new mock instance.
func NewMockJob(ctrl *gomock.Controller) *MockJob {
mock := &MockJob{ctrl: ctrl}
mock.recorder = &MockJobMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockJob) EXPECT() *MockJobMockRecorder {
return m.recorder
}
// ID mocks base method.
func (m *MockJob) ID() uuid.UUID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ID")
ret0, _ := ret[0].(uuid.UUID)
return ret0
}
// ID indicates an expected call of ID.
func (mr *MockJobMockRecorder) ID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockJob)(nil).ID))
}
// LastRun mocks base method.
func (m *MockJob) LastRun() (time.Time, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LastRun")
ret0, _ := ret[0].(time.Time)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LastRun indicates an expected call of LastRun.
func (mr *MockJobMockRecorder) LastRun() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastRun", reflect.TypeOf((*MockJob)(nil).LastRun))
}
// Name mocks base method.
func (m *MockJob) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockJobMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockJob)(nil).Name))
}
// NextRun mocks base method.
func (m *MockJob) NextRun() (time.Time, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextRun")
ret0, _ := ret[0].(time.Time)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NextRun indicates an expected call of NextRun.
func (mr *MockJobMockRecorder) NextRun() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextRun", reflect.TypeOf((*MockJob)(nil).NextRun))
}
// NextRuns mocks base method.
func (m *MockJob) NextRuns(arg0 int) ([]time.Time, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextRuns", arg0)
ret0, _ := ret[0].([]time.Time)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NextRuns indicates an expected call of NextRuns.
func (mr *MockJobMockRecorder) NextRuns(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextRuns", reflect.TypeOf((*MockJob)(nil).NextRuns), arg0)
}
// RunNow mocks base method.
func (m *MockJob) RunNow() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RunNow")
ret0, _ := ret[0].(error)
return ret0
}
// RunNow indicates an expected call of RunNow.
func (mr *MockJobMockRecorder) RunNow() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunNow", reflect.TypeOf((*MockJob)(nil).RunNow))
}
// Tags mocks base method.
func (m *MockJob) Tags() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Tags")
ret0, _ := ret[0].([]string)
return ret0
}
// Tags indicates an expected call of Tags.
func (mr *MockJobMockRecorder) Tags() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tags", reflect.TypeOf((*MockJob)(nil).Tags))
}