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