-
Notifications
You must be signed in to change notification settings - Fork 211
/
mocks.go
190 lines (160 loc) · 4.93 KB
/
mocks.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
//
// Generated by this command:
//
// mockgen -typed -package=sql -destination=./mocks.go -source=./interface.go
//
// Package sql is a generated GoMock package.
package sql
import (
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockMigration is a mock of Migration interface.
type MockMigration struct {
ctrl *gomock.Controller
recorder *MockMigrationMockRecorder
}
// MockMigrationMockRecorder is the mock recorder for MockMigration.
type MockMigrationMockRecorder struct {
mock *MockMigration
}
// NewMockMigration creates a new mock instance.
func NewMockMigration(ctrl *gomock.Controller) *MockMigration {
mock := &MockMigration{ctrl: ctrl}
mock.recorder = &MockMigrationMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMigration) EXPECT() *MockMigrationMockRecorder {
return m.recorder
}
// Apply mocks base method.
func (m *MockMigration) Apply(db Executor) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Apply", db)
ret0, _ := ret[0].(error)
return ret0
}
// Apply indicates an expected call of Apply.
func (mr *MockMigrationMockRecorder) Apply(db any) *MigrationApplyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMigration)(nil).Apply), db)
return &MigrationApplyCall{Call: call}
}
// MigrationApplyCall wrap *gomock.Call
type MigrationApplyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MigrationApplyCall) Return(arg0 error) *MigrationApplyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MigrationApplyCall) Do(f func(Executor) error) *MigrationApplyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MigrationApplyCall) DoAndReturn(f func(Executor) error) *MigrationApplyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Name mocks base method.
func (m *MockMigration) 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 *MockMigrationMockRecorder) Name() *MigrationNameCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockMigration)(nil).Name))
return &MigrationNameCall{Call: call}
}
// MigrationNameCall wrap *gomock.Call
type MigrationNameCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MigrationNameCall) Return(arg0 string) *MigrationNameCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MigrationNameCall) Do(f func() string) *MigrationNameCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MigrationNameCall) DoAndReturn(f func() string) *MigrationNameCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Order mocks base method.
func (m *MockMigration) Order() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Order")
ret0, _ := ret[0].(int)
return ret0
}
// Order indicates an expected call of Order.
func (mr *MockMigrationMockRecorder) Order() *MigrationOrderCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Order", reflect.TypeOf((*MockMigration)(nil).Order))
return &MigrationOrderCall{Call: call}
}
// MigrationOrderCall wrap *gomock.Call
type MigrationOrderCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MigrationOrderCall) Return(arg0 int) *MigrationOrderCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MigrationOrderCall) Do(f func() int) *MigrationOrderCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MigrationOrderCall) DoAndReturn(f func() int) *MigrationOrderCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Rollback mocks base method.
func (m *MockMigration) Rollback() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Rollback")
ret0, _ := ret[0].(error)
return ret0
}
// Rollback indicates an expected call of Rollback.
func (mr *MockMigrationMockRecorder) Rollback() *MigrationRollbackCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockMigration)(nil).Rollback))
return &MigrationRollbackCall{Call: call}
}
// MigrationRollbackCall wrap *gomock.Call
type MigrationRollbackCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MigrationRollbackCall) Return(arg0 error) *MigrationRollbackCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MigrationRollbackCall) Do(f func() error) *MigrationRollbackCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MigrationRollbackCall) DoAndReturn(f func() error) *MigrationRollbackCall {
c.Call = c.Call.DoAndReturn(f)
return c
}