main 5041353

session_logger.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	"github.com/bnema/dumber/internal/application/port"
11	"github.com/bnema/dumber/internal/domain/entity"
12	"github.com/rs/zerolog"
13	mock "github.com/stretchr/testify/mock"
14)
15
16// NewMockSessionLogger creates a new instance of MockSessionLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
17// The first argument is typically a *testing.T value.
18func NewMockSessionLogger(t interface {
19	mock.TestingT
20	Cleanup(func())
21}) *MockSessionLogger {
22	mock := &MockSessionLogger{}
23	mock.Mock.Test(t)
24
25	t.Cleanup(func() { mock.AssertExpectations(t) })
26
27	return mock
28}
29
30// MockSessionLogger is an autogenerated mock type for the SessionLogger type
31type MockSessionLogger struct {
32	mock.Mock
33}
34
35type MockSessionLogger_Expecter struct {
36	mock *mock.Mock
37}
38
39func (_m *MockSessionLogger) EXPECT() *MockSessionLogger_Expecter {
40	return &MockSessionLogger_Expecter{mock: &_m.Mock}
41}
42
43// CreateLogger provides a mock function for the type MockSessionLogger
44func (_mock *MockSessionLogger) CreateLogger(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error) {
45	ret := _mock.Called(ctx, sessionID, cfg)
46
47	if len(ret) == 0 {
48		panic("no return value specified for CreateLogger")
49	}
50
51	var r0 zerolog.Logger
52	var r1 func()
53	var r2 error
54	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) (zerolog.Logger, func(), error)); ok {
55		return returnFunc(ctx, sessionID, cfg)
56	}
57	if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) zerolog.Logger); ok {
58		r0 = returnFunc(ctx, sessionID, cfg)
59	} else {
60		r0 = ret.Get(0).(zerolog.Logger)
61	}
62	if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID, port.SessionLogConfig) func()); ok {
63		r1 = returnFunc(ctx, sessionID, cfg)
64	} else {
65		if ret.Get(1) != nil {
66			r1 = ret.Get(1).(func())
67		}
68	}
69	if returnFunc, ok := ret.Get(2).(func(context.Context, entity.SessionID, port.SessionLogConfig) error); ok {
70		r2 = returnFunc(ctx, sessionID, cfg)
71	} else {
72		r2 = ret.Error(2)
73	}
74	return r0, r1, r2
75}
76
77// MockSessionLogger_CreateLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLogger'
78type MockSessionLogger_CreateLogger_Call struct {
79	*mock.Call
80}
81
82// CreateLogger is a helper method to define mock.On call
83//   - ctx context.Context
84//   - sessionID entity.SessionID
85//   - cfg port.SessionLogConfig
86func (_e *MockSessionLogger_Expecter) CreateLogger(ctx any, sessionID any, cfg any) *MockSessionLogger_CreateLogger_Call {
87	return &MockSessionLogger_CreateLogger_Call{Call: _e.mock.On("CreateLogger", ctx, sessionID, cfg)}
88}
89
90func (_c *MockSessionLogger_CreateLogger_Call) Run(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig)) *MockSessionLogger_CreateLogger_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 entity.SessionID
97		if args[1] != nil {
98			arg1 = args[1].(entity.SessionID)
99		}
100		var arg2 port.SessionLogConfig
101		if args[2] != nil {
102			arg2 = args[2].(port.SessionLogConfig)
103		}
104		run(
105			arg0,
106			arg1,
107			arg2,
108		)
109	})
110	return _c
111}
112
113func (_c *MockSessionLogger_CreateLogger_Call) Return(logger zerolog.Logger, fn func(), err error) *MockSessionLogger_CreateLogger_Call {
114	_c.Call.Return(logger, fn, err)
115	return _c
116}
117
118func (_c *MockSessionLogger_CreateLogger_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error)) *MockSessionLogger_CreateLogger_Call {
119	_c.Call.Return(run)
120	return _c
121}

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 8

Tags 42

↑↓ moveenter openesc close