/
caller_mock.go
255 lines (218 loc) · 8.53 KB
/
caller_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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/juju/juju/api/base (interfaces: APICaller,FacadeCaller)
//
// Generated by this command:
//
// mockgen -package mocks -destination mocks/caller_mock.go github.com/juju/juju/api/base APICaller,FacadeCaller
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
http "net/http"
url "net/url"
reflect "reflect"
base "github.com/juju/juju/api/base"
names "github.com/juju/names/v5"
gomock "go.uber.org/mock/gomock"
httprequest "gopkg.in/httprequest.v1"
)
// MockAPICaller is a mock of APICaller interface.
type MockAPICaller struct {
ctrl *gomock.Controller
recorder *MockAPICallerMockRecorder
}
// MockAPICallerMockRecorder is the mock recorder for MockAPICaller.
type MockAPICallerMockRecorder struct {
mock *MockAPICaller
}
// NewMockAPICaller creates a new mock instance.
func NewMockAPICaller(ctrl *gomock.Controller) *MockAPICaller {
mock := &MockAPICaller{ctrl: ctrl}
mock.recorder = &MockAPICallerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAPICaller) EXPECT() *MockAPICallerMockRecorder {
return m.recorder
}
// APICall mocks base method.
func (m *MockAPICaller) APICall(arg0 string, arg1 int, arg2, arg3 string, arg4, arg5 any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "APICall", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(error)
return ret0
}
// APICall indicates an expected call of APICall.
func (mr *MockAPICallerMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockAPICaller)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5)
}
// BakeryClient mocks base method.
func (m *MockAPICaller) BakeryClient() base.MacaroonDischarger {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BakeryClient")
ret0, _ := ret[0].(base.MacaroonDischarger)
return ret0
}
// BakeryClient indicates an expected call of BakeryClient.
func (mr *MockAPICallerMockRecorder) BakeryClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BakeryClient", reflect.TypeOf((*MockAPICaller)(nil).BakeryClient))
}
// BestFacadeVersion mocks base method.
func (m *MockAPICaller) BestFacadeVersion(arg0 string) int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BestFacadeVersion", arg0)
ret0, _ := ret[0].(int)
return ret0
}
// BestFacadeVersion indicates an expected call of BestFacadeVersion.
func (mr *MockAPICallerMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockAPICaller)(nil).BestFacadeVersion), arg0)
}
// ConnectControllerStream mocks base method.
func (m *MockAPICaller) ConnectControllerStream(arg0 string, arg1 url.Values, arg2 http.Header) (base.Stream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ConnectControllerStream", arg0, arg1, arg2)
ret0, _ := ret[0].(base.Stream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ConnectControllerStream indicates an expected call of ConnectControllerStream.
func (mr *MockAPICallerMockRecorder) ConnectControllerStream(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectControllerStream), arg0, arg1, arg2)
}
// ConnectStream mocks base method.
func (m *MockAPICaller) ConnectStream(arg0 string, arg1 url.Values) (base.Stream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ConnectStream", arg0, arg1)
ret0, _ := ret[0].(base.Stream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ConnectStream indicates an expected call of ConnectStream.
func (mr *MockAPICallerMockRecorder) ConnectStream(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockAPICaller)(nil).ConnectStream), arg0, arg1)
}
// Context mocks base method.
func (m *MockAPICaller) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context.
func (mr *MockAPICallerMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockAPICaller)(nil).Context))
}
// HTTPClient mocks base method.
func (m *MockAPICaller) HTTPClient() (*httprequest.Client, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HTTPClient")
ret0, _ := ret[0].(*httprequest.Client)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HTTPClient indicates an expected call of HTTPClient.
func (mr *MockAPICallerMockRecorder) HTTPClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPClient", reflect.TypeOf((*MockAPICaller)(nil).HTTPClient))
}
// ModelTag mocks base method.
func (m *MockAPICaller) ModelTag() (names.ModelTag, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ModelTag")
ret0, _ := ret[0].(names.ModelTag)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// ModelTag indicates an expected call of ModelTag.
func (mr *MockAPICallerMockRecorder) ModelTag() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelTag", reflect.TypeOf((*MockAPICaller)(nil).ModelTag))
}
// RootHTTPClient mocks base method.
func (m *MockAPICaller) RootHTTPClient() (*httprequest.Client, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RootHTTPClient")
ret0, _ := ret[0].(*httprequest.Client)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RootHTTPClient indicates an expected call of RootHTTPClient.
func (mr *MockAPICallerMockRecorder) RootHTTPClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHTTPClient", reflect.TypeOf((*MockAPICaller)(nil).RootHTTPClient))
}
// MockFacadeCaller is a mock of FacadeCaller interface.
type MockFacadeCaller struct {
ctrl *gomock.Controller
recorder *MockFacadeCallerMockRecorder
}
// MockFacadeCallerMockRecorder is the mock recorder for MockFacadeCaller.
type MockFacadeCallerMockRecorder struct {
mock *MockFacadeCaller
}
// NewMockFacadeCaller creates a new mock instance.
func NewMockFacadeCaller(ctrl *gomock.Controller) *MockFacadeCaller {
mock := &MockFacadeCaller{ctrl: ctrl}
mock.recorder = &MockFacadeCallerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFacadeCaller) EXPECT() *MockFacadeCallerMockRecorder {
return m.recorder
}
// BestAPIVersion mocks base method.
func (m *MockFacadeCaller) BestAPIVersion() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BestAPIVersion")
ret0, _ := ret[0].(int)
return ret0
}
// BestAPIVersion indicates an expected call of BestAPIVersion.
func (mr *MockFacadeCallerMockRecorder) BestAPIVersion() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestAPIVersion", reflect.TypeOf((*MockFacadeCaller)(nil).BestAPIVersion))
}
// FacadeCall mocks base method.
func (m *MockFacadeCaller) FacadeCall(arg0 string, arg1, arg2 any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FacadeCall", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// FacadeCall indicates an expected call of FacadeCall.
func (mr *MockFacadeCallerMockRecorder) FacadeCall(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FacadeCall", reflect.TypeOf((*MockFacadeCaller)(nil).FacadeCall), arg0, arg1, arg2)
}
// Name mocks base method.
func (m *MockFacadeCaller) 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 *MockFacadeCallerMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockFacadeCaller)(nil).Name))
}
// RawAPICaller mocks base method.
func (m *MockFacadeCaller) RawAPICaller() base.APICaller {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RawAPICaller")
ret0, _ := ret[0].(base.APICaller)
return ret0
}
// RawAPICaller indicates an expected call of RawAPICaller.
func (mr *MockFacadeCallerMockRecorder) RawAPICaller() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawAPICaller", reflect.TypeOf((*MockFacadeCaller)(nil).RawAPICaller))
}