v2.4.1 7c3b292

mock_container_log_writer.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	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockContainerLogWriter creates a new instance of MockContainerLogWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockContainerLogWriter(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockContainerLogWriter {
20	mock := &MockContainerLogWriter{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockContainerLogWriter is an autogenerated mock type for the ContainerLogWriter type
29type MockContainerLogWriter struct {
30	mock.Mock
31}
32
33type MockContainerLogWriter_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockContainerLogWriter) EXPECT() *MockContainerLogWriter_Expecter {
38	return &MockContainerLogWriter_Expecter{mock: &_m.Mock}
39}
40
41// Close provides a mock function for the type MockContainerLogWriter
42func (_mock *MockContainerLogWriter) Close() error {
43	ret := _mock.Called()
44
45	if len(ret) == 0 {
46		panic("no return value specified for Close")
47	}
48
49	var r0 error
50	if returnFunc, ok := ret.Get(0).(func() error); ok {
51		r0 = returnFunc()
52	} else {
53		r0 = ret.Error(0)
54	}
55	return r0
56}
57
58// MockContainerLogWriter_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
59type MockContainerLogWriter_Close_Call struct {
60	*mock.Call
61}
62
63// Close is a helper method to define mock.On call
64func (_e *MockContainerLogWriter_Expecter) Close() *MockContainerLogWriter_Close_Call {
65	return &MockContainerLogWriter_Close_Call{Call: _e.mock.On("Close")}
66}
67
68func (_c *MockContainerLogWriter_Close_Call) Run(run func()) *MockContainerLogWriter_Close_Call {
69	_c.Call.Run(func(args mock.Arguments) {
70		run()
71	})
72	return _c
73}
74
75func (_c *MockContainerLogWriter_Close_Call) Return(err error) *MockContainerLogWriter_Close_Call {
76	_c.Call.Return(err)
77	return _c
78}
79
80func (_c *MockContainerLogWriter_Close_Call) RunAndReturn(run func() error) *MockContainerLogWriter_Close_Call {
81	_c.Call.Return(run)
82	return _c
83}
84
85// StartLogging provides a mock function for the type MockContainerLogWriter
86func (_mock *MockContainerLogWriter) StartLogging(ctx context.Context, containerID string, domain string, logStream io.ReadCloser) error {
87	ret := _mock.Called(ctx, containerID, domain, logStream)
88
89	if len(ret) == 0 {
90		panic("no return value specified for StartLogging")
91	}
92
93	var r0 error
94	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, io.ReadCloser) error); ok {
95		r0 = returnFunc(ctx, containerID, domain, logStream)
96	} else {
97		r0 = ret.Error(0)
98	}
99	return r0
100}
101
102// MockContainerLogWriter_StartLogging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartLogging'
103type MockContainerLogWriter_StartLogging_Call struct {
104	*mock.Call
105}
106
107// StartLogging is a helper method to define mock.On call
108//   - ctx context.Context
109//   - containerID string
110//   - domain string
111//   - logStream io.ReadCloser
112func (_e *MockContainerLogWriter_Expecter) StartLogging(ctx interface{}, containerID interface{}, domain interface{}, logStream interface{}) *MockContainerLogWriter_StartLogging_Call {
113	return &MockContainerLogWriter_StartLogging_Call{Call: _e.mock.On("StartLogging", ctx, containerID, domain, logStream)}
114}
115
116func (_c *MockContainerLogWriter_StartLogging_Call) Run(run func(ctx context.Context, containerID string, domain string, logStream io.ReadCloser)) *MockContainerLogWriter_StartLogging_Call {
117	_c.Call.Run(func(args mock.Arguments) {
118		var arg0 context.Context
119		if args[0] != nil {
120			arg0 = args[0].(context.Context)
121		}
122		var arg1 string
123		if args[1] != nil {
124			arg1 = args[1].(string)
125		}
126		var arg2 string
127		if args[2] != nil {
128			arg2 = args[2].(string)
129		}
130		var arg3 io.ReadCloser
131		if args[3] != nil {
132			arg3 = args[3].(io.ReadCloser)
133		}
134		run(
135			arg0,
136			arg1,
137			arg2,
138			arg3,
139		)
140	})
141	return _c
142}
143
144func (_c *MockContainerLogWriter_StartLogging_Call) Return(err error) *MockContainerLogWriter_StartLogging_Call {
145	_c.Call.Return(err)
146	return _c
147}
148
149func (_c *MockContainerLogWriter_StartLogging_Call) RunAndReturn(run func(ctx context.Context, containerID string, domain string, logStream io.ReadCloser) error) *MockContainerLogWriter_StartLogging_Call {
150	_c.Call.Return(run)
151	return _c
152}
153
154// StopLogging provides a mock function for the type MockContainerLogWriter
155func (_mock *MockContainerLogWriter) StopLogging(containerID string) error {
156	ret := _mock.Called(containerID)
157
158	if len(ret) == 0 {
159		panic("no return value specified for StopLogging")
160	}
161
162	var r0 error
163	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
164		r0 = returnFunc(containerID)
165	} else {
166		r0 = ret.Error(0)
167	}
168	return r0
169}
170
171// MockContainerLogWriter_StopLogging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopLogging'
172type MockContainerLogWriter_StopLogging_Call struct {
173	*mock.Call
174}
175
176// StopLogging is a helper method to define mock.On call
177//   - containerID string
178func (_e *MockContainerLogWriter_Expecter) StopLogging(containerID interface{}) *MockContainerLogWriter_StopLogging_Call {
179	return &MockContainerLogWriter_StopLogging_Call{Call: _e.mock.On("StopLogging", containerID)}
180}
181
182func (_c *MockContainerLogWriter_StopLogging_Call) Run(run func(containerID string)) *MockContainerLogWriter_StopLogging_Call {
183	_c.Call.Run(func(args mock.Arguments) {
184		var arg0 string
185		if args[0] != nil {
186			arg0 = args[0].(string)
187		}
188		run(
189			arg0,
190		)
191	})
192	return _c
193}
194
195func (_c *MockContainerLogWriter_StopLogging_Call) Return(err error) *MockContainerLogWriter_StopLogging_Call {
196	_c.Call.Return(err)
197	return _c
198}
199
200func (_c *MockContainerLogWriter_StopLogging_Call) RunAndReturn(run func(containerID string) error) *MockContainerLogWriter_StopLogging_Call {
201	_c.Call.Return(run)
202	return _c
203}

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