-
Notifications
You must be signed in to change notification settings - Fork 42
/
mock_service_api.go
366 lines (303 loc) · 12 KB
/
mock_service_api.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
// Code generated by mockery v2.37.1. DO NOT EDIT.
package inventory
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockServiceAPI is an autogenerated mock type for the ServiceAPI type
type MockServiceAPI struct {
mock.Mock
}
type MockServiceAPI_Expecter struct {
mock *mock.Mock
}
func (_m *MockServiceAPI) EXPECT() *MockServiceAPI_Expecter {
return &MockServiceAPI_Expecter{mock: &_m.Mock}
}
// Close provides a mock function with given fields:
func (_m *MockServiceAPI) Close() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// MockServiceAPI_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
type MockServiceAPI_Close_Call struct {
*mock.Call
}
// Close is a helper method to define mock.On call
func (_e *MockServiceAPI_Expecter) Close() *MockServiceAPI_Close_Call {
return &MockServiceAPI_Close_Call{Call: _e.mock.On("Close")}
}
func (_c *MockServiceAPI_Close_Call) Run(run func()) *MockServiceAPI_Close_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockServiceAPI_Close_Call) Return(_a0 error) *MockServiceAPI_Close_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockServiceAPI_Close_Call) RunAndReturn(run func() error) *MockServiceAPI_Close_Call {
_c.Call.Return(run)
return _c
}
// ListAllAssetTypesByName provides a mock function with given fields: ctx, assets
func (_m *MockServiceAPI) ListAllAssetTypesByName(ctx context.Context, assets []string) ([]*ExtendedGcpAsset, error) {
ret := _m.Called(ctx, assets)
var r0 []*ExtendedGcpAsset
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*ExtendedGcpAsset, error)); ok {
return rf(ctx, assets)
}
if rf, ok := ret.Get(0).(func(context.Context, []string) []*ExtendedGcpAsset); ok {
r0 = rf(ctx, assets)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*ExtendedGcpAsset)
}
}
if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
r1 = rf(ctx, assets)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockServiceAPI_ListAllAssetTypesByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAllAssetTypesByName'
type MockServiceAPI_ListAllAssetTypesByName_Call struct {
*mock.Call
}
// ListAllAssetTypesByName is a helper method to define mock.On call
// - ctx context.Context
// - assets []string
func (_e *MockServiceAPI_Expecter) ListAllAssetTypesByName(ctx interface{}, assets interface{}) *MockServiceAPI_ListAllAssetTypesByName_Call {
return &MockServiceAPI_ListAllAssetTypesByName_Call{Call: _e.mock.On("ListAllAssetTypesByName", ctx, assets)}
}
func (_c *MockServiceAPI_ListAllAssetTypesByName_Call) Run(run func(ctx context.Context, assets []string)) *MockServiceAPI_ListAllAssetTypesByName_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].([]string))
})
return _c
}
func (_c *MockServiceAPI_ListAllAssetTypesByName_Call) Return(_a0 []*ExtendedGcpAsset, _a1 error) *MockServiceAPI_ListAllAssetTypesByName_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockServiceAPI_ListAllAssetTypesByName_Call) RunAndReturn(run func(context.Context, []string) ([]*ExtendedGcpAsset, error)) *MockServiceAPI_ListAllAssetTypesByName_Call {
_c.Call.Return(run)
return _c
}
// ListLoggingAssets provides a mock function with given fields: ctx
func (_m *MockServiceAPI) ListLoggingAssets(ctx context.Context) ([]*LoggingAsset, error) {
ret := _m.Called(ctx)
var r0 []*LoggingAsset
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*LoggingAsset, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*LoggingAsset); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*LoggingAsset)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockServiceAPI_ListLoggingAssets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLoggingAssets'
type MockServiceAPI_ListLoggingAssets_Call struct {
*mock.Call
}
// ListLoggingAssets is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockServiceAPI_Expecter) ListLoggingAssets(ctx interface{}) *MockServiceAPI_ListLoggingAssets_Call {
return &MockServiceAPI_ListLoggingAssets_Call{Call: _e.mock.On("ListLoggingAssets", ctx)}
}
func (_c *MockServiceAPI_ListLoggingAssets_Call) Run(run func(ctx context.Context)) *MockServiceAPI_ListLoggingAssets_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockServiceAPI_ListLoggingAssets_Call) Return(_a0 []*LoggingAsset, _a1 error) *MockServiceAPI_ListLoggingAssets_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockServiceAPI_ListLoggingAssets_Call) RunAndReturn(run func(context.Context) ([]*LoggingAsset, error)) *MockServiceAPI_ListLoggingAssets_Call {
_c.Call.Return(run)
return _c
}
// ListMonitoringAssets provides a mock function with given fields: ctx, monitoringAssetTypes
func (_m *MockServiceAPI) ListMonitoringAssets(ctx context.Context, monitoringAssetTypes map[string][]string) ([]*MonitoringAsset, error) {
ret := _m.Called(ctx, monitoringAssetTypes)
var r0 []*MonitoringAsset
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, map[string][]string) ([]*MonitoringAsset, error)); ok {
return rf(ctx, monitoringAssetTypes)
}
if rf, ok := ret.Get(0).(func(context.Context, map[string][]string) []*MonitoringAsset); ok {
r0 = rf(ctx, monitoringAssetTypes)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*MonitoringAsset)
}
}
if rf, ok := ret.Get(1).(func(context.Context, map[string][]string) error); ok {
r1 = rf(ctx, monitoringAssetTypes)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockServiceAPI_ListMonitoringAssets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMonitoringAssets'
type MockServiceAPI_ListMonitoringAssets_Call struct {
*mock.Call
}
// ListMonitoringAssets is a helper method to define mock.On call
// - ctx context.Context
// - monitoringAssetTypes map[string][]string
func (_e *MockServiceAPI_Expecter) ListMonitoringAssets(ctx interface{}, monitoringAssetTypes interface{}) *MockServiceAPI_ListMonitoringAssets_Call {
return &MockServiceAPI_ListMonitoringAssets_Call{Call: _e.mock.On("ListMonitoringAssets", ctx, monitoringAssetTypes)}
}
func (_c *MockServiceAPI_ListMonitoringAssets_Call) Run(run func(ctx context.Context, monitoringAssetTypes map[string][]string)) *MockServiceAPI_ListMonitoringAssets_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(map[string][]string))
})
return _c
}
func (_c *MockServiceAPI_ListMonitoringAssets_Call) Return(_a0 []*MonitoringAsset, _a1 error) *MockServiceAPI_ListMonitoringAssets_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockServiceAPI_ListMonitoringAssets_Call) RunAndReturn(run func(context.Context, map[string][]string) ([]*MonitoringAsset, error)) *MockServiceAPI_ListMonitoringAssets_Call {
_c.Call.Return(run)
return _c
}
// ListProjectsAncestorsPolicies provides a mock function with given fields: ctx
func (_m *MockServiceAPI) ListProjectsAncestorsPolicies(ctx context.Context) ([]*ProjectPoliciesAsset, error) {
ret := _m.Called(ctx)
var r0 []*ProjectPoliciesAsset
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*ProjectPoliciesAsset, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*ProjectPoliciesAsset); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*ProjectPoliciesAsset)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockServiceAPI_ListProjectsAncestorsPolicies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListProjectsAncestorsPolicies'
type MockServiceAPI_ListProjectsAncestorsPolicies_Call struct {
*mock.Call
}
// ListProjectsAncestorsPolicies is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockServiceAPI_Expecter) ListProjectsAncestorsPolicies(ctx interface{}) *MockServiceAPI_ListProjectsAncestorsPolicies_Call {
return &MockServiceAPI_ListProjectsAncestorsPolicies_Call{Call: _e.mock.On("ListProjectsAncestorsPolicies", ctx)}
}
func (_c *MockServiceAPI_ListProjectsAncestorsPolicies_Call) Run(run func(ctx context.Context)) *MockServiceAPI_ListProjectsAncestorsPolicies_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockServiceAPI_ListProjectsAncestorsPolicies_Call) Return(_a0 []*ProjectPoliciesAsset, _a1 error) *MockServiceAPI_ListProjectsAncestorsPolicies_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockServiceAPI_ListProjectsAncestorsPolicies_Call) RunAndReturn(run func(context.Context) ([]*ProjectPoliciesAsset, error)) *MockServiceAPI_ListProjectsAncestorsPolicies_Call {
_c.Call.Return(run)
return _c
}
// ListServiceUsageAssets provides a mock function with given fields: ctx
func (_m *MockServiceAPI) ListServiceUsageAssets(ctx context.Context) ([]*ServiceUsageAsset, error) {
ret := _m.Called(ctx)
var r0 []*ServiceUsageAsset
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]*ServiceUsageAsset, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []*ServiceUsageAsset); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*ServiceUsageAsset)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockServiceAPI_ListServiceUsageAssets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListServiceUsageAssets'
type MockServiceAPI_ListServiceUsageAssets_Call struct {
*mock.Call
}
// ListServiceUsageAssets is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockServiceAPI_Expecter) ListServiceUsageAssets(ctx interface{}) *MockServiceAPI_ListServiceUsageAssets_Call {
return &MockServiceAPI_ListServiceUsageAssets_Call{Call: _e.mock.On("ListServiceUsageAssets", ctx)}
}
func (_c *MockServiceAPI_ListServiceUsageAssets_Call) Run(run func(ctx context.Context)) *MockServiceAPI_ListServiceUsageAssets_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockServiceAPI_ListServiceUsageAssets_Call) Return(_a0 []*ServiceUsageAsset, _a1 error) *MockServiceAPI_ListServiceUsageAssets_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockServiceAPI_ListServiceUsageAssets_Call) RunAndReturn(run func(context.Context) ([]*ServiceUsageAsset, error)) *MockServiceAPI_ListServiceUsageAssets_Call {
_c.Call.Return(run)
return _c
}
// NewMockServiceAPI creates a new instance of MockServiceAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockServiceAPI(t interface {
mock.TestingT
Cleanup(func())
}) *MockServiceAPI {
mock := &MockServiceAPI{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}