-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_mock.go
209 lines (180 loc) · 6.35 KB
/
client_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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./client/http.go
// Package client is a generated GoMock package.
package auth
import (
http "net/http"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockHttpClient is a mock of HttpClient interface.
type MockHttpClient struct {
ctrl *gomock.Controller
recorder *MockHttpClientMockRecorder
}
// MockHttpClientMockRecorder is the mock recorder for MockHttpClient.
type MockHttpClientMockRecorder struct {
mock *MockHttpClient
}
// NewMockHttpClient creates a new mock instance.
func NewMockHttpClient(ctrl *gomock.Controller) *MockHttpClient {
mock := &MockHttpClient{ctrl: ctrl}
mock.recorder = &MockHttpClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHttpClient) EXPECT() *MockHttpClientMockRecorder {
return m.recorder
}
// Delete mocks base method.
func (m *MockHttpClient) Delete(url string, v ...interface{}) (HttpReponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{url}
for _, a := range v {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Delete", varargs...)
ret0, _ := ret[0].(HttpReponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Delete indicates an expected call of Delete.
func (mr *MockHttpClientMockRecorder) Delete(url interface{}, v ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{url}, v...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockHttpClient)(nil).Delete), varargs...)
}
// Get mocks base method.
func (m *MockHttpClient) Get(url string, v ...interface{}) (HttpReponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{url}
for _, a := range v {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Get", varargs...)
ret0, _ := ret[0].(HttpReponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockHttpClientMockRecorder) Get(url interface{}, v ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{url}, v...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockHttpClient)(nil).Get), varargs...)
}
// Post mocks base method.
func (m *MockHttpClient) Post(url string, v ...interface{}) (HttpReponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{url}
for _, a := range v {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Post", varargs...)
ret0, _ := ret[0].(HttpReponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Post indicates an expected call of Post.
func (mr *MockHttpClientMockRecorder) Post(url interface{}, v ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{url}, v...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockHttpClient)(nil).Post), varargs...)
}
// Put mocks base method.
func (m *MockHttpClient) Put(url string, v ...interface{}) (HttpReponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{url}
for _, a := range v {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Put", varargs...)
ret0, _ := ret[0].(HttpReponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Put indicates an expected call of Put.
func (mr *MockHttpClientMockRecorder) Put(url interface{}, v ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{url}, v...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockHttpClient)(nil).Put), varargs...)
}
// MockHttpReponse is a mock of HttpReponse interface.
type MockHttpReponse struct {
ctrl *gomock.Controller
recorder *MockHttpReponseMockRecorder
}
// MockHttpReponseMockRecorder is the mock recorder for MockHttpReponse.
type MockHttpReponseMockRecorder struct {
mock *MockHttpReponse
}
// NewMockHttpReponse creates a new mock instance.
func NewMockHttpReponse(ctrl *gomock.Controller) *MockHttpReponse {
mock := &MockHttpReponse{ctrl: ctrl}
mock.recorder = &MockHttpReponseMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHttpReponse) EXPECT() *MockHttpReponseMockRecorder {
return m.recorder
}
// Bytes mocks base method.
func (m *MockHttpReponse) Bytes() []byte {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Bytes")
ret0, _ := ret[0].([]byte)
return ret0
}
// Bytes indicates an expected call of Bytes.
func (mr *MockHttpReponseMockRecorder) Bytes() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bytes", reflect.TypeOf((*MockHttpReponse)(nil).Bytes))
}
// Request mocks base method.
func (m *MockHttpReponse) Request() *http.Request {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Request")
ret0, _ := ret[0].(*http.Request)
return ret0
}
// Request indicates an expected call of Request.
func (mr *MockHttpReponseMockRecorder) Request() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockHttpReponse)(nil).Request))
}
// Response mocks base method.
func (m *MockHttpReponse) Response() *http.Response {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Response")
ret0, _ := ret[0].(*http.Response)
return ret0
}
// Response indicates an expected call of Response.
func (mr *MockHttpReponseMockRecorder) Response() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Response", reflect.TypeOf((*MockHttpReponse)(nil).Response))
}
// ToBytes mocks base method.
func (m *MockHttpReponse) ToBytes() ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ToBytes")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ToBytes indicates an expected call of ToBytes.
func (mr *MockHttpReponseMockRecorder) ToBytes() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToBytes", reflect.TypeOf((*MockHttpReponse)(nil).ToBytes))
}
// ToJSON mocks base method.
func (m *MockHttpReponse) ToJSON(v interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ToJSON", v)
ret0, _ := ret[0].(error)
return ret0
}
// ToJSON indicates an expected call of ToJSON.
func (mr *MockHttpReponseMockRecorder) ToJSON(v interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToJSON", reflect.TypeOf((*MockHttpReponse)(nil).ToJSON), v)
}