This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackend_mock.go
210 lines (179 loc) · 7.52 KB
/
backend_mock.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// Code generated by MockGen. DO NOT EDIT.
// Source: backend.go
// Package rmb is a generated GoMock package.
package rmb
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
)
// MockBackend is a mock of Backend interface.
type MockBackend struct {
ctrl *gomock.Controller
recorder *MockBackendMockRecorder
}
// MockBackendMockRecorder is the mock recorder for MockBackend.
type MockBackendMockRecorder struct {
mock *MockBackend
}
// NewMockBackend creates a new mock instance.
func NewMockBackend(ctrl *gomock.Controller) *MockBackend {
mock := &MockBackend{ctrl: ctrl}
mock.recorder = &MockBackendMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBackend) EXPECT() *MockBackendMockRecorder {
return m.recorder
}
// GetMessageReply mocks base method.
func (m *MockBackend) GetMessageReply(ctx context.Context, msg MessageIdentifier) ([]Message, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMessageReply", ctx, msg)
ret0, _ := ret[0].([]Message)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetMessageReply indicates an expected call of GetMessageReply.
func (mr *MockBackendMockRecorder) GetMessageReply(ctx, msg interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMessageReply", reflect.TypeOf((*MockBackend)(nil).GetMessageReply), ctx, msg)
}
// IncrementID mocks base method.
func (m *MockBackend) IncrementID(ctx context.Context, id int) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IncrementID", ctx, id)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IncrementID indicates an expected call of IncrementID.
func (mr *MockBackendMockRecorder) IncrementID(ctx, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrementID", reflect.TypeOf((*MockBackend)(nil).IncrementID), ctx, id)
}
// Next mocks base method.
func (m *MockBackend) Next(ctx context.Context, timeout time.Duration) (Envelope, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next", ctx, timeout)
ret0, _ := ret[0].(Envelope)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Next indicates an expected call of Next.
func (mr *MockBackendMockRecorder) Next(ctx, timeout interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockBackend)(nil).Next), ctx, timeout)
}
// PopExpiredBacklogMessages mocks base method.
func (m *MockBackend) PopExpiredBacklogMessages(ctx context.Context) ([]Message, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PopExpiredBacklogMessages", ctx)
ret0, _ := ret[0].([]Message)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PopExpiredBacklogMessages indicates an expected call of PopExpiredBacklogMessages.
func (mr *MockBackendMockRecorder) PopExpiredBacklogMessages(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopExpiredBacklogMessages", reflect.TypeOf((*MockBackend)(nil).PopExpiredBacklogMessages), ctx)
}
// PopMessageFromBacklog mocks base method.
func (m *MockBackend) PopMessageFromBacklog(ctx context.Context, id string) (Message, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PopMessageFromBacklog", ctx, id)
ret0, _ := ret[0].(Message)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PopMessageFromBacklog indicates an expected call of PopMessageFromBacklog.
func (mr *MockBackendMockRecorder) PopMessageFromBacklog(ctx, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopMessageFromBacklog", reflect.TypeOf((*MockBackend)(nil).PopMessageFromBacklog), ctx, id)
}
// PopRetryMessages mocks base method.
func (m *MockBackend) PopRetryMessages(ctx context.Context, olderThan time.Duration) ([]Message, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PopRetryMessages", ctx, olderThan)
ret0, _ := ret[0].([]Message)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PopRetryMessages indicates an expected call of PopRetryMessages.
func (mr *MockBackendMockRecorder) PopRetryMessages(ctx, olderThan interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopRetryMessages", reflect.TypeOf((*MockBackend)(nil).PopRetryMessages), ctx, olderThan)
}
// PushProcessedMessage mocks base method.
func (m *MockBackend) PushProcessedMessage(ctx context.Context, msg Message) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushProcessedMessage", ctx, msg)
ret0, _ := ret[0].(error)
return ret0
}
// PushProcessedMessage indicates an expected call of PushProcessedMessage.
func (mr *MockBackendMockRecorder) PushProcessedMessage(ctx, msg interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushProcessedMessage", reflect.TypeOf((*MockBackend)(nil).PushProcessedMessage), ctx, msg)
}
// PushToBacklog mocks base method.
func (m *MockBackend) PushToBacklog(ctx context.Context, msg Message, id string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushToBacklog", ctx, msg, id)
ret0, _ := ret[0].(error)
return ret0
}
// PushToBacklog indicates an expected call of PushToBacklog.
func (mr *MockBackendMockRecorder) PushToBacklog(ctx, msg, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushToBacklog", reflect.TypeOf((*MockBackend)(nil).PushToBacklog), ctx, msg, id)
}
// QueueCommand mocks base method.
func (m *MockBackend) QueueCommand(ctx context.Context, msg Message) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueueCommand", ctx, msg)
ret0, _ := ret[0].(error)
return ret0
}
// QueueCommand indicates an expected call of QueueCommand.
func (mr *MockBackendMockRecorder) QueueCommand(ctx, msg interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueCommand", reflect.TypeOf((*MockBackend)(nil).QueueCommand), ctx, msg)
}
// QueueRemote mocks base method.
func (m *MockBackend) QueueRemote(ctx context.Context, msg Message) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueueRemote", ctx, msg)
ret0, _ := ret[0].(error)
return ret0
}
// QueueRemote indicates an expected call of QueueRemote.
func (mr *MockBackendMockRecorder) QueueRemote(ctx, msg interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueRemote", reflect.TypeOf((*MockBackend)(nil).QueueRemote), ctx, msg)
}
// QueueReply mocks base method.
func (m *MockBackend) QueueReply(ctx context.Context, msg Message) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueueReply", ctx, msg)
ret0, _ := ret[0].(error)
return ret0
}
// QueueReply indicates an expected call of QueueReply.
func (mr *MockBackendMockRecorder) QueueReply(ctx, msg interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueReply", reflect.TypeOf((*MockBackend)(nil).QueueReply), ctx, msg)
}
// QueueRetry mocks base method.
func (m *MockBackend) QueueRetry(ctx context.Context, msg Message) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueueRetry", ctx, msg)
ret0, _ := ret[0].(error)
return ret0
}
// QueueRetry indicates an expected call of QueueRetry.
func (mr *MockBackendMockRecorder) QueueRetry(ctx, msg interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueRetry", reflect.TypeOf((*MockBackend)(nil).QueueRetry), ctx, msg)
}