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