1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "time"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockManifestStorage creates a new instance of MockManifestStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func NewMockManifestStorage(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *MockManifestStorage {
19 mock := &MockManifestStorage{}
20 mock.Mock.Test(t)
21
22 t.Cleanup(func() { mock.AssertExpectations(t) })
23
24 return mock
25}
26
27// MockManifestStorage is an autogenerated mock type for the ManifestStorage type
28type MockManifestStorage struct {
29 mock.Mock
30}
31
32type MockManifestStorage_Expecter struct {
33 mock *mock.Mock
34}
35
36func (_m *MockManifestStorage) EXPECT() *MockManifestStorage_Expecter {
37 return &MockManifestStorage_Expecter{mock: &_m.Mock}
38}
39
40// DeleteManifest provides a mock function for the type MockManifestStorage
41func (_mock *MockManifestStorage) DeleteManifest(name string, reference string) error {
42 ret := _mock.Called(name, reference)
43
44 if len(ret) == 0 {
45 panic("no return value specified for DeleteManifest")
46 }
47
48 var r0 error
49 if returnFunc, ok := ret.Get(0).(func(string, string) error); ok {
50 r0 = returnFunc(name, reference)
51 } else {
52 r0 = ret.Error(0)
53 }
54 return r0
55}
56
57// MockManifestStorage_DeleteManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteManifest'
58type MockManifestStorage_DeleteManifest_Call struct {
59 *mock.Call
60}
61
62// DeleteManifest is a helper method to define mock.On call
63// - name string
64// - reference string
65func (_e *MockManifestStorage_Expecter) DeleteManifest(name interface{}, reference interface{}) *MockManifestStorage_DeleteManifest_Call {
66 return &MockManifestStorage_DeleteManifest_Call{Call: _e.mock.On("DeleteManifest", name, reference)}
67}
68
69func (_c *MockManifestStorage_DeleteManifest_Call) Run(run func(name string, reference string)) *MockManifestStorage_DeleteManifest_Call {
70 _c.Call.Run(func(args mock.Arguments) {
71 var arg0 string
72 if args[0] != nil {
73 arg0 = args[0].(string)
74 }
75 var arg1 string
76 if args[1] != nil {
77 arg1 = args[1].(string)
78 }
79 run(
80 arg0,
81 arg1,
82 )
83 })
84 return _c
85}
86
87func (_c *MockManifestStorage_DeleteManifest_Call) Return(err error) *MockManifestStorage_DeleteManifest_Call {
88 _c.Call.Return(err)
89 return _c
90}
91
92func (_c *MockManifestStorage_DeleteManifest_Call) RunAndReturn(run func(name string, reference string) error) *MockManifestStorage_DeleteManifest_Call {
93 _c.Call.Return(run)
94 return _c
95}
96
97// GetManifest provides a mock function for the type MockManifestStorage
98func (_mock *MockManifestStorage) GetManifest(name string, reference string) ([]byte, string, error) {
99 ret := _mock.Called(name, reference)
100
101 if len(ret) == 0 {
102 panic("no return value specified for GetManifest")
103 }
104
105 var r0 []byte
106 var r1 string
107 var r2 error
108 if returnFunc, ok := ret.Get(0).(func(string, string) ([]byte, string, error)); ok {
109 return returnFunc(name, reference)
110 }
111 if returnFunc, ok := ret.Get(0).(func(string, string) []byte); ok {
112 r0 = returnFunc(name, reference)
113 } else {
114 if ret.Get(0) != nil {
115 r0 = ret.Get(0).([]byte)
116 }
117 }
118 if returnFunc, ok := ret.Get(1).(func(string, string) string); ok {
119 r1 = returnFunc(name, reference)
120 } else {
121 r1 = ret.Get(1).(string)
122 }
123 if returnFunc, ok := ret.Get(2).(func(string, string) error); ok {
124 r2 = returnFunc(name, reference)
125 } else {
126 r2 = ret.Error(2)
127 }
128 return r0, r1, r2
129}
130
131// MockManifestStorage_GetManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManifest'
132type MockManifestStorage_GetManifest_Call struct {
133 *mock.Call
134}
135
136// GetManifest is a helper method to define mock.On call
137// - name string
138// - reference string
139func (_e *MockManifestStorage_Expecter) GetManifest(name interface{}, reference interface{}) *MockManifestStorage_GetManifest_Call {
140 return &MockManifestStorage_GetManifest_Call{Call: _e.mock.On("GetManifest", name, reference)}
141}
142
143func (_c *MockManifestStorage_GetManifest_Call) Run(run func(name string, reference string)) *MockManifestStorage_GetManifest_Call {
144 _c.Call.Run(func(args mock.Arguments) {
145 var arg0 string
146 if args[0] != nil {
147 arg0 = args[0].(string)
148 }
149 var arg1 string
150 if args[1] != nil {
151 arg1 = args[1].(string)
152 }
153 run(
154 arg0,
155 arg1,
156 )
157 })
158 return _c
159}
160
161func (_c *MockManifestStorage_GetManifest_Call) Return(bytes []byte, s string, err error) *MockManifestStorage_GetManifest_Call {
162 _c.Call.Return(bytes, s, err)
163 return _c
164}
165
166func (_c *MockManifestStorage_GetManifest_Call) RunAndReturn(run func(name string, reference string) ([]byte, string, error)) *MockManifestStorage_GetManifest_Call {
167 _c.Call.Return(run)
168 return _c
169}
170
171// GetManifestModTime provides a mock function for the type MockManifestStorage
172func (_mock *MockManifestStorage) GetManifestModTime(name string, reference string) (time.Time, error) {
173 ret := _mock.Called(name, reference)
174
175 if len(ret) == 0 {
176 panic("no return value specified for GetManifestModTime")
177 }
178
179 var r0 time.Time
180 var r1 error
181 if returnFunc, ok := ret.Get(0).(func(string, string) (time.Time, error)); ok {
182 return returnFunc(name, reference)
183 }
184 if returnFunc, ok := ret.Get(0).(func(string, string) time.Time); ok {
185 r0 = returnFunc(name, reference)
186 } else {
187 r0 = ret.Get(0).(time.Time)
188 }
189 if returnFunc, ok := ret.Get(1).(func(string, string) error); ok {
190 r1 = returnFunc(name, reference)
191 } else {
192 r1 = ret.Error(1)
193 }
194 return r0, r1
195}
196
197// MockManifestStorage_GetManifestModTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManifestModTime'
198type MockManifestStorage_GetManifestModTime_Call struct {
199 *mock.Call
200}
201
202// GetManifestModTime is a helper method to define mock.On call
203// - name string
204// - reference string
205func (_e *MockManifestStorage_Expecter) GetManifestModTime(name interface{}, reference interface{}) *MockManifestStorage_GetManifestModTime_Call {
206 return &MockManifestStorage_GetManifestModTime_Call{Call: _e.mock.On("GetManifestModTime", name, reference)}
207}
208
209func (_c *MockManifestStorage_GetManifestModTime_Call) Run(run func(name string, reference string)) *MockManifestStorage_GetManifestModTime_Call {
210 _c.Call.Run(func(args mock.Arguments) {
211 var arg0 string
212 if args[0] != nil {
213 arg0 = args[0].(string)
214 }
215 var arg1 string
216 if args[1] != nil {
217 arg1 = args[1].(string)
218 }
219 run(
220 arg0,
221 arg1,
222 )
223 })
224 return _c
225}
226
227func (_c *MockManifestStorage_GetManifestModTime_Call) Return(time1 time.Time, err error) *MockManifestStorage_GetManifestModTime_Call {
228 _c.Call.Return(time1, err)
229 return _c
230}
231
232func (_c *MockManifestStorage_GetManifestModTime_Call) RunAndReturn(run func(name string, reference string) (time.Time, error)) *MockManifestStorage_GetManifestModTime_Call {
233 _c.Call.Return(run)
234 return _c
235}
236
237// ListRepositories provides a mock function for the type MockManifestStorage
238func (_mock *MockManifestStorage) ListRepositories() ([]string, error) {
239 ret := _mock.Called()
240
241 if len(ret) == 0 {
242 panic("no return value specified for ListRepositories")
243 }
244
245 var r0 []string
246 var r1 error
247 if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok {
248 return returnFunc()
249 }
250 if returnFunc, ok := ret.Get(0).(func() []string); ok {
251 r0 = returnFunc()
252 } else {
253 if ret.Get(0) != nil {
254 r0 = ret.Get(0).([]string)
255 }
256 }
257 if returnFunc, ok := ret.Get(1).(func() error); ok {
258 r1 = returnFunc()
259 } else {
260 r1 = ret.Error(1)
261 }
262 return r0, r1
263}
264
265// MockManifestStorage_ListRepositories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRepositories'
266type MockManifestStorage_ListRepositories_Call struct {
267 *mock.Call
268}
269
270// ListRepositories is a helper method to define mock.On call
271func (_e *MockManifestStorage_Expecter) ListRepositories() *MockManifestStorage_ListRepositories_Call {
272 return &MockManifestStorage_ListRepositories_Call{Call: _e.mock.On("ListRepositories")}
273}
274
275func (_c *MockManifestStorage_ListRepositories_Call) Run(run func()) *MockManifestStorage_ListRepositories_Call {
276 _c.Call.Run(func(args mock.Arguments) {
277 run()
278 })
279 return _c
280}
281
282func (_c *MockManifestStorage_ListRepositories_Call) Return(strings []string, err error) *MockManifestStorage_ListRepositories_Call {
283 _c.Call.Return(strings, err)
284 return _c
285}
286
287func (_c *MockManifestStorage_ListRepositories_Call) RunAndReturn(run func() ([]string, error)) *MockManifestStorage_ListRepositories_Call {
288 _c.Call.Return(run)
289 return _c
290}
291
292// ListTags provides a mock function for the type MockManifestStorage
293func (_mock *MockManifestStorage) ListTags(name string) ([]string, error) {
294 ret := _mock.Called(name)
295
296 if len(ret) == 0 {
297 panic("no return value specified for ListTags")
298 }
299
300 var r0 []string
301 var r1 error
302 if returnFunc, ok := ret.Get(0).(func(string) ([]string, error)); ok {
303 return returnFunc(name)
304 }
305 if returnFunc, ok := ret.Get(0).(func(string) []string); ok {
306 r0 = returnFunc(name)
307 } else {
308 if ret.Get(0) != nil {
309 r0 = ret.Get(0).([]string)
310 }
311 }
312 if returnFunc, ok := ret.Get(1).(func(string) error); ok {
313 r1 = returnFunc(name)
314 } else {
315 r1 = ret.Error(1)
316 }
317 return r0, r1
318}
319
320// MockManifestStorage_ListTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTags'
321type MockManifestStorage_ListTags_Call struct {
322 *mock.Call
323}
324
325// ListTags is a helper method to define mock.On call
326// - name string
327func (_e *MockManifestStorage_Expecter) ListTags(name interface{}) *MockManifestStorage_ListTags_Call {
328 return &MockManifestStorage_ListTags_Call{Call: _e.mock.On("ListTags", name)}
329}
330
331func (_c *MockManifestStorage_ListTags_Call) Run(run func(name string)) *MockManifestStorage_ListTags_Call {
332 _c.Call.Run(func(args mock.Arguments) {
333 var arg0 string
334 if args[0] != nil {
335 arg0 = args[0].(string)
336 }
337 run(
338 arg0,
339 )
340 })
341 return _c
342}
343
344func (_c *MockManifestStorage_ListTags_Call) Return(strings []string, err error) *MockManifestStorage_ListTags_Call {
345 _c.Call.Return(strings, err)
346 return _c
347}
348
349func (_c *MockManifestStorage_ListTags_Call) RunAndReturn(run func(name string) ([]string, error)) *MockManifestStorage_ListTags_Call {
350 _c.Call.Return(run)
351 return _c
352}
353
354// PutManifest provides a mock function for the type MockManifestStorage
355func (_mock *MockManifestStorage) PutManifest(name string, reference string, contentType string, data []byte) error {
356 ret := _mock.Called(name, reference, contentType, data)
357
358 if len(ret) == 0 {
359 panic("no return value specified for PutManifest")
360 }
361
362 var r0 error
363 if returnFunc, ok := ret.Get(0).(func(string, string, string, []byte) error); ok {
364 r0 = returnFunc(name, reference, contentType, data)
365 } else {
366 r0 = ret.Error(0)
367 }
368 return r0
369}
370
371// MockManifestStorage_PutManifest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutManifest'
372type MockManifestStorage_PutManifest_Call struct {
373 *mock.Call
374}
375
376// PutManifest is a helper method to define mock.On call
377// - name string
378// - reference string
379// - contentType string
380// - data []byte
381func (_e *MockManifestStorage_Expecter) PutManifest(name interface{}, reference interface{}, contentType interface{}, data interface{}) *MockManifestStorage_PutManifest_Call {
382 return &MockManifestStorage_PutManifest_Call{Call: _e.mock.On("PutManifest", name, reference, contentType, data)}
383}
384
385func (_c *MockManifestStorage_PutManifest_Call) Run(run func(name string, reference string, contentType string, data []byte)) *MockManifestStorage_PutManifest_Call {
386 _c.Call.Run(func(args mock.Arguments) {
387 var arg0 string
388 if args[0] != nil {
389 arg0 = args[0].(string)
390 }
391 var arg1 string
392 if args[1] != nil {
393 arg1 = args[1].(string)
394 }
395 var arg2 string
396 if args[2] != nil {
397 arg2 = args[2].(string)
398 }
399 var arg3 []byte
400 if args[3] != nil {
401 arg3 = args[3].([]byte)
402 }
403 run(
404 arg0,
405 arg1,
406 arg2,
407 arg3,
408 )
409 })
410 return _c
411}
412
413func (_c *MockManifestStorage_PutManifest_Call) Return(err error) *MockManifestStorage_PutManifest_Call {
414 _c.Call.Return(err)
415 return _c
416}
417
418func (_c *MockManifestStorage_PutManifest_Call) RunAndReturn(run func(name string, reference string, contentType string, data []byte) error) *MockManifestStorage_PutManifest_Call {
419 _c.Call.Return(run)
420 return _c
421}