main 80d5067

MultipartUpload.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9	"io"
10
11	"bnema.dev/ermite/internal/ports"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewMultipartUpload creates a new instance of MultipartUpload. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMultipartUpload(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *MultipartUpload {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &MultipartUpload{}
26	mock.Mock.Test(t)
27
28	t.Cleanup(func() {
29		if helper, ok := t.(interface{ Helper() }); ok {
30			helper.Helper()
31		}
32		mock.AssertExpectations(t)
33	})
34
35	return mock
36}
37
38// MultipartUpload is an autogenerated mock type for the MultipartUpload type
39type MultipartUpload struct {
40	mock.Mock
41}
42
43type MultipartUpload_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *MultipartUpload) EXPECT() *MultipartUpload_Expecter {
48	return &MultipartUpload_Expecter{mock: &_m.Mock}
49}
50
51// Abort provides a mock function for the type MultipartUpload
52func (_mock *MultipartUpload) Abort(ctx context.Context) error {
53	ret := _mock.Called(ctx)
54
55	if len(ret) == 0 {
56		panic("no return value specified for Abort")
57	}
58
59	var r0 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
61		r0 = returnFunc(ctx)
62	} else {
63		r0 = ret.Error(0)
64	}
65	return r0
66}
67
68// MultipartUpload_Abort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abort'
69type MultipartUpload_Abort_Call struct {
70	*mock.Call
71}
72
73// Abort is a helper method to define mock.On call
74//   - ctx context.Context
75func (_e *MultipartUpload_Expecter) Abort(ctx any) *MultipartUpload_Abort_Call {
76	return &MultipartUpload_Abort_Call{Call: _e.mock.On("Abort", ctx)}
77}
78
79func (_c *MultipartUpload_Abort_Call) Run(run func(ctx context.Context)) *MultipartUpload_Abort_Call {
80	_c.Call.Run(func(args mock.Arguments) {
81		var arg0 context.Context
82		if args[0] != nil {
83			arg0 = args[0].(context.Context)
84		}
85		run(
86			arg0,
87		)
88	})
89	return _c
90}
91
92func (_c *MultipartUpload_Abort_Call) Return(err error) *MultipartUpload_Abort_Call {
93	_c.Call.Return(err)
94	return _c
95}
96
97func (_c *MultipartUpload_Abort_Call) RunAndReturn(run func(ctx context.Context) error) *MultipartUpload_Abort_Call {
98	_c.Call.Return(run)
99	return _c
100}
101
102// Complete provides a mock function for the type MultipartUpload
103func (_mock *MultipartUpload) Complete(ctx context.Context) (ports.BlobInfo, error) {
104	ret := _mock.Called(ctx)
105
106	if len(ret) == 0 {
107		panic("no return value specified for Complete")
108	}
109
110	var r0 ports.BlobInfo
111	var r1 error
112	if returnFunc, ok := ret.Get(0).(func(context.Context) (ports.BlobInfo, error)); ok {
113		return returnFunc(ctx)
114	}
115	if returnFunc, ok := ret.Get(0).(func(context.Context) ports.BlobInfo); ok {
116		r0 = returnFunc(ctx)
117	} else {
118		r0 = ret.Get(0).(ports.BlobInfo)
119	}
120	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
121		r1 = returnFunc(ctx)
122	} else {
123		r1 = ret.Error(1)
124	}
125	return r0, r1
126}
127
128// MultipartUpload_Complete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Complete'
129type MultipartUpload_Complete_Call struct {
130	*mock.Call
131}
132
133// Complete is a helper method to define mock.On call
134//   - ctx context.Context
135func (_e *MultipartUpload_Expecter) Complete(ctx any) *MultipartUpload_Complete_Call {
136	return &MultipartUpload_Complete_Call{Call: _e.mock.On("Complete", ctx)}
137}
138
139func (_c *MultipartUpload_Complete_Call) Run(run func(ctx context.Context)) *MultipartUpload_Complete_Call {
140	_c.Call.Run(func(args mock.Arguments) {
141		var arg0 context.Context
142		if args[0] != nil {
143			arg0 = args[0].(context.Context)
144		}
145		run(
146			arg0,
147		)
148	})
149	return _c
150}
151
152func (_c *MultipartUpload_Complete_Call) Return(blobInfo ports.BlobInfo, err error) *MultipartUpload_Complete_Call {
153	_c.Call.Return(blobInfo, err)
154	return _c
155}
156
157func (_c *MultipartUpload_Complete_Call) RunAndReturn(run func(ctx context.Context) (ports.BlobInfo, error)) *MultipartUpload_Complete_Call {
158	_c.Call.Return(run)
159	return _c
160}
161
162// ID provides a mock function for the type MultipartUpload
163func (_mock *MultipartUpload) ID() string {
164	ret := _mock.Called()
165
166	if len(ret) == 0 {
167		panic("no return value specified for ID")
168	}
169
170	var r0 string
171	if returnFunc, ok := ret.Get(0).(func() string); ok {
172		r0 = returnFunc()
173	} else {
174		r0 = ret.Get(0).(string)
175	}
176	return r0
177}
178
179// MultipartUpload_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID'
180type MultipartUpload_ID_Call struct {
181	*mock.Call
182}
183
184// ID is a helper method to define mock.On call
185func (_e *MultipartUpload_Expecter) ID() *MultipartUpload_ID_Call {
186	return &MultipartUpload_ID_Call{Call: _e.mock.On("ID")}
187}
188
189func (_c *MultipartUpload_ID_Call) Run(run func()) *MultipartUpload_ID_Call {
190	_c.Call.Run(func(args mock.Arguments) {
191		run()
192	})
193	return _c
194}
195
196func (_c *MultipartUpload_ID_Call) Return(s string) *MultipartUpload_ID_Call {
197	_c.Call.Return(s)
198	return _c
199}
200
201func (_c *MultipartUpload_ID_Call) RunAndReturn(run func() string) *MultipartUpload_ID_Call {
202	_c.Call.Return(run)
203	return _c
204}
205
206// UploadPart provides a mock function for the type MultipartUpload
207func (_mock *MultipartUpload) UploadPart(ctx context.Context, n int, r io.Reader, size int64) error {
208	ret := _mock.Called(ctx, n, r, size)
209
210	if len(ret) == 0 {
211		panic("no return value specified for UploadPart")
212	}
213
214	var r0 error
215	if returnFunc, ok := ret.Get(0).(func(context.Context, int, io.Reader, int64) error); ok {
216		r0 = returnFunc(ctx, n, r, size)
217	} else {
218		r0 = ret.Error(0)
219	}
220	return r0
221}
222
223// MultipartUpload_UploadPart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadPart'
224type MultipartUpload_UploadPart_Call struct {
225	*mock.Call
226}
227
228// UploadPart is a helper method to define mock.On call
229//   - ctx context.Context
230//   - n int
231//   - r io.Reader
232//   - size int64
233func (_e *MultipartUpload_Expecter) UploadPart(ctx any, n any, r any, size any) *MultipartUpload_UploadPart_Call {
234	return &MultipartUpload_UploadPart_Call{Call: _e.mock.On("UploadPart", ctx, n, r, size)}
235}
236
237func (_c *MultipartUpload_UploadPart_Call) Run(run func(ctx context.Context, n int, r io.Reader, size int64)) *MultipartUpload_UploadPart_Call {
238	_c.Call.Run(func(args mock.Arguments) {
239		var arg0 context.Context
240		if args[0] != nil {
241			arg0 = args[0].(context.Context)
242		}
243		var arg1 int
244		if args[1] != nil {
245			arg1 = args[1].(int)
246		}
247		var arg2 io.Reader
248		if args[2] != nil {
249			arg2 = args[2].(io.Reader)
250		}
251		var arg3 int64
252		if args[3] != nil {
253			arg3 = args[3].(int64)
254		}
255		run(
256			arg0,
257			arg1,
258			arg2,
259			arg3,
260		)
261	})
262	return _c
263}
264
265func (_c *MultipartUpload_UploadPart_Call) Return(err error) *MultipartUpload_UploadPart_Call {
266	_c.Call.Return(err)
267	return _c
268}
269
270func (_c *MultipartUpload_UploadPart_Call) RunAndReturn(run func(ctx context.Context, n int, r io.Reader, size int64) error) *MultipartUpload_UploadPart_Call {
271	_c.Call.Return(run)
272	return _c
273}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 3

Tags 44

↑↓ moveenter openesc close