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

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