v3.3.1 31f1eec

mock_log_service.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
10	mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockLogService creates a new instance of MockLogService. 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 NewMockLogService(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *MockLogService {
19	if helper, ok := t.(interface{ Helper() }); ok {
20		helper.Helper()
21	}
22
23	mock := &MockLogService{}
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// MockLogService is an autogenerated mock type for the LogService type
37type MockLogService struct {
38	mock.Mock
39}
40
41type MockLogService_Expecter struct {
42	mock *mock.Mock
43}
44
45func (_m *MockLogService) EXPECT() *MockLogService_Expecter {
46	return &MockLogService_Expecter{mock: &_m.Mock}
47}
48
49// FollowContainerLogs provides a mock function for the type MockLogService
50func (_mock *MockLogService) FollowContainerLogs(ctx context.Context, domain string, initialLines int) (<-chan string, error) {
51	ret := _mock.Called(ctx, domain, initialLines)
52
53	if len(ret) == 0 {
54		panic("no return value specified for FollowContainerLogs")
55	}
56
57	var r0 <-chan string
58	var r1 error
59	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) (<-chan string, error)); ok {
60		return returnFunc(ctx, domain, initialLines)
61	}
62	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) <-chan string); ok {
63		r0 = returnFunc(ctx, domain, initialLines)
64	} else {
65		if ret.Get(0) != nil {
66			r0 = ret.Get(0).(<-chan string)
67		}
68	}
69	if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
70		r1 = returnFunc(ctx, domain, initialLines)
71	} else {
72		r1 = ret.Error(1)
73	}
74	return r0, r1
75}
76
77// MockLogService_FollowContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FollowContainerLogs'
78type MockLogService_FollowContainerLogs_Call struct {
79	*mock.Call
80}
81
82// FollowContainerLogs is a helper method to define mock.On call
83//   - ctx context.Context
84//   - domain string
85//   - initialLines int
86func (_e *MockLogService_Expecter) FollowContainerLogs(ctx any, domain any, initialLines any) *MockLogService_FollowContainerLogs_Call {
87	return &MockLogService_FollowContainerLogs_Call{Call: _e.mock.On("FollowContainerLogs", ctx, domain, initialLines)}
88}
89
90func (_c *MockLogService_FollowContainerLogs_Call) Run(run func(ctx context.Context, domain string, initialLines int)) *MockLogService_FollowContainerLogs_Call {
91	_c.Call.Run(func(args mock.Arguments) {
92		var arg0 context.Context
93		if args[0] != nil {
94			arg0 = args[0].(context.Context)
95		}
96		var arg1 string
97		if args[1] != nil {
98			arg1 = args[1].(string)
99		}
100		var arg2 int
101		if args[2] != nil {
102			arg2 = args[2].(int)
103		}
104		run(
105			arg0,
106			arg1,
107			arg2,
108		)
109	})
110	return _c
111}
112
113func (_c *MockLogService_FollowContainerLogs_Call) Return(stringCh <-chan string, err error) *MockLogService_FollowContainerLogs_Call {
114	_c.Call.Return(stringCh, err)
115	return _c
116}
117
118func (_c *MockLogService_FollowContainerLogs_Call) RunAndReturn(run func(ctx context.Context, domain string, initialLines int) (<-chan string, error)) *MockLogService_FollowContainerLogs_Call {
119	_c.Call.Return(run)
120	return _c
121}
122
123// FollowProcessLogs provides a mock function for the type MockLogService
124func (_mock *MockLogService) FollowProcessLogs(ctx context.Context, initialLines int) (<-chan string, error) {
125	ret := _mock.Called(ctx, initialLines)
126
127	if len(ret) == 0 {
128		panic("no return value specified for FollowProcessLogs")
129	}
130
131	var r0 <-chan string
132	var r1 error
133	if returnFunc, ok := ret.Get(0).(func(context.Context, int) (<-chan string, error)); ok {
134		return returnFunc(ctx, initialLines)
135	}
136	if returnFunc, ok := ret.Get(0).(func(context.Context, int) <-chan string); ok {
137		r0 = returnFunc(ctx, initialLines)
138	} else {
139		if ret.Get(0) != nil {
140			r0 = ret.Get(0).(<-chan string)
141		}
142	}
143	if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
144		r1 = returnFunc(ctx, initialLines)
145	} else {
146		r1 = ret.Error(1)
147	}
148	return r0, r1
149}
150
151// MockLogService_FollowProcessLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FollowProcessLogs'
152type MockLogService_FollowProcessLogs_Call struct {
153	*mock.Call
154}
155
156// FollowProcessLogs is a helper method to define mock.On call
157//   - ctx context.Context
158//   - initialLines int
159func (_e *MockLogService_Expecter) FollowProcessLogs(ctx any, initialLines any) *MockLogService_FollowProcessLogs_Call {
160	return &MockLogService_FollowProcessLogs_Call{Call: _e.mock.On("FollowProcessLogs", ctx, initialLines)}
161}
162
163func (_c *MockLogService_FollowProcessLogs_Call) Run(run func(ctx context.Context, initialLines int)) *MockLogService_FollowProcessLogs_Call {
164	_c.Call.Run(func(args mock.Arguments) {
165		var arg0 context.Context
166		if args[0] != nil {
167			arg0 = args[0].(context.Context)
168		}
169		var arg1 int
170		if args[1] != nil {
171			arg1 = args[1].(int)
172		}
173		run(
174			arg0,
175			arg1,
176		)
177	})
178	return _c
179}
180
181func (_c *MockLogService_FollowProcessLogs_Call) Return(stringCh <-chan string, err error) *MockLogService_FollowProcessLogs_Call {
182	_c.Call.Return(stringCh, err)
183	return _c
184}
185
186func (_c *MockLogService_FollowProcessLogs_Call) RunAndReturn(run func(ctx context.Context, initialLines int) (<-chan string, error)) *MockLogService_FollowProcessLogs_Call {
187	_c.Call.Return(run)
188	return _c
189}
190
191// GetContainerLogs provides a mock function for the type MockLogService
192func (_mock *MockLogService) GetContainerLogs(ctx context.Context, domain string, lines int) ([]string, error) {
193	ret := _mock.Called(ctx, domain, lines)
194
195	if len(ret) == 0 {
196		panic("no return value specified for GetContainerLogs")
197	}
198
199	var r0 []string
200	var r1 error
201	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]string, error)); ok {
202		return returnFunc(ctx, domain, lines)
203	}
204	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []string); ok {
205		r0 = returnFunc(ctx, domain, lines)
206	} else {
207		if ret.Get(0) != nil {
208			r0 = ret.Get(0).([]string)
209		}
210	}
211	if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
212		r1 = returnFunc(ctx, domain, lines)
213	} else {
214		r1 = ret.Error(1)
215	}
216	return r0, r1
217}
218
219// MockLogService_GetContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerLogs'
220type MockLogService_GetContainerLogs_Call struct {
221	*mock.Call
222}
223
224// GetContainerLogs is a helper method to define mock.On call
225//   - ctx context.Context
226//   - domain string
227//   - lines int
228func (_e *MockLogService_Expecter) GetContainerLogs(ctx any, domain any, lines any) *MockLogService_GetContainerLogs_Call {
229	return &MockLogService_GetContainerLogs_Call{Call: _e.mock.On("GetContainerLogs", ctx, domain, lines)}
230}
231
232func (_c *MockLogService_GetContainerLogs_Call) Run(run func(ctx context.Context, domain string, lines int)) *MockLogService_GetContainerLogs_Call {
233	_c.Call.Run(func(args mock.Arguments) {
234		var arg0 context.Context
235		if args[0] != nil {
236			arg0 = args[0].(context.Context)
237		}
238		var arg1 string
239		if args[1] != nil {
240			arg1 = args[1].(string)
241		}
242		var arg2 int
243		if args[2] != nil {
244			arg2 = args[2].(int)
245		}
246		run(
247			arg0,
248			arg1,
249			arg2,
250		)
251	})
252	return _c
253}
254
255func (_c *MockLogService_GetContainerLogs_Call) Return(strings []string, err error) *MockLogService_GetContainerLogs_Call {
256	_c.Call.Return(strings, err)
257	return _c
258}
259
260func (_c *MockLogService_GetContainerLogs_Call) RunAndReturn(run func(ctx context.Context, domain string, lines int) ([]string, error)) *MockLogService_GetContainerLogs_Call {
261	_c.Call.Return(run)
262	return _c
263}
264
265// GetProcessLogs provides a mock function for the type MockLogService
266func (_mock *MockLogService) GetProcessLogs(ctx context.Context, lines int) ([]string, error) {
267	ret := _mock.Called(ctx, lines)
268
269	if len(ret) == 0 {
270		panic("no return value specified for GetProcessLogs")
271	}
272
273	var r0 []string
274	var r1 error
275	if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]string, error)); ok {
276		return returnFunc(ctx, lines)
277	}
278	if returnFunc, ok := ret.Get(0).(func(context.Context, int) []string); ok {
279		r0 = returnFunc(ctx, lines)
280	} else {
281		if ret.Get(0) != nil {
282			r0 = ret.Get(0).([]string)
283		}
284	}
285	if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
286		r1 = returnFunc(ctx, lines)
287	} else {
288		r1 = ret.Error(1)
289	}
290	return r0, r1
291}
292
293// MockLogService_GetProcessLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProcessLogs'
294type MockLogService_GetProcessLogs_Call struct {
295	*mock.Call
296}
297
298// GetProcessLogs is a helper method to define mock.On call
299//   - ctx context.Context
300//   - lines int
301func (_e *MockLogService_Expecter) GetProcessLogs(ctx any, lines any) *MockLogService_GetProcessLogs_Call {
302	return &MockLogService_GetProcessLogs_Call{Call: _e.mock.On("GetProcessLogs", ctx, lines)}
303}
304
305func (_c *MockLogService_GetProcessLogs_Call) Run(run func(ctx context.Context, lines int)) *MockLogService_GetProcessLogs_Call {
306	_c.Call.Run(func(args mock.Arguments) {
307		var arg0 context.Context
308		if args[0] != nil {
309			arg0 = args[0].(context.Context)
310		}
311		var arg1 int
312		if args[1] != nil {
313			arg1 = args[1].(int)
314		}
315		run(
316			arg0,
317			arg1,
318		)
319	})
320	return _c
321}
322
323func (_c *MockLogService_GetProcessLogs_Call) Return(strings []string, err error) *MockLogService_GetProcessLogs_Call {
324	_c.Call.Return(strings, err)
325	return _c
326}
327
328func (_c *MockLogService_GetProcessLogs_Call) RunAndReturn(run func(ctx context.Context, lines int) ([]string, error)) *MockLogService_GetProcessLogs_Call {
329	_c.Call.Return(run)
330	return _c
331}

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 7

Tags 106

↑↓ moveenter openesc close