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