main f2d166b

session_security_mock.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8	"github.com/bnema/neferwl/internal/ports"
9	mock "github.com/stretchr/testify/mock"
10)
11
12// NewMockSessionSecurity creates a new instance of MockSessionSecurity. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func NewMockSessionSecurity(t interface {
15	mock.TestingT
16	Cleanup(func())
17}) *MockSessionSecurity {
18	if helper, ok := t.(interface{ Helper() }); ok {
19		helper.Helper()
20	}
21
22	mock := &MockSessionSecurity{}
23	mock.Mock.Test(t)
24
25	t.Cleanup(func() {
26		if helper, ok := t.(interface{ Helper() }); ok {
27			helper.Helper()
28		}
29		mock.AssertExpectations(t)
30	})
31
32	return mock
33}
34
35// MockSessionSecurity is an autogenerated mock type for the SessionSecurity type
36type MockSessionSecurity struct {
37	mock.Mock
38}
39
40type MockSessionSecurity_Expecter struct {
41	mock *mock.Mock
42}
43
44func (_m *MockSessionSecurity) EXPECT() *MockSessionSecurity_Expecter {
45	return &MockSessionSecurity_Expecter{mock: &_m.Mock}
46}
47
48// Snapshot provides a mock function for the type MockSessionSecurity
49func (_mock *MockSessionSecurity) Snapshot() ports.SecurityState {
50	ret := _mock.Called()
51
52	if len(ret) == 0 {
53		panic("no return value specified for Snapshot")
54	}
55
56	var r0 ports.SecurityState
57	if returnFunc, ok := ret.Get(0).(func() ports.SecurityState); ok {
58		r0 = returnFunc()
59	} else {
60		r0 = ret.Get(0).(ports.SecurityState)
61	}
62	return r0
63}
64
65// MockSessionSecurity_Snapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Snapshot'
66type MockSessionSecurity_Snapshot_Call struct {
67	*mock.Call
68}
69
70// Snapshot is a helper method to define mock.On call
71func (_e *MockSessionSecurity_Expecter) Snapshot() *MockSessionSecurity_Snapshot_Call {
72	return &MockSessionSecurity_Snapshot_Call{Call: _e.mock.On("Snapshot")}
73}
74
75func (_c *MockSessionSecurity_Snapshot_Call) Run(run func()) *MockSessionSecurity_Snapshot_Call {
76	_c.Call.Run(func(args mock.Arguments) {
77		run()
78	})
79	return _c
80}
81
82func (_c *MockSessionSecurity_Snapshot_Call) Return(securityState ports.SecurityState) *MockSessionSecurity_Snapshot_Call {
83	_c.Call.Return(securityState)
84	return _c
85}
86
87func (_c *MockSessionSecurity_Snapshot_Call) RunAndReturn(run func() ports.SecurityState) *MockSessionSecurity_Snapshot_Call {
88	_c.Call.Return(run)
89	return _c
90}
91
92// NewMockSessionSecurityController creates a new instance of MockSessionSecurityController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
93// The first argument is typically a *testing.T value.
94func NewMockSessionSecurityController(t interface {
95	mock.TestingT
96	Cleanup(func())
97}) *MockSessionSecurityController {
98	if helper, ok := t.(interface{ Helper() }); ok {
99		helper.Helper()
100	}
101
102	mock := &MockSessionSecurityController{}
103	mock.Mock.Test(t)
104
105	t.Cleanup(func() {
106		if helper, ok := t.(interface{ Helper() }); ok {
107			helper.Helper()
108		}
109		mock.AssertExpectations(t)
110	})
111
112	return mock
113}
114
115// MockSessionSecurityController is an autogenerated mock type for the SessionSecurityController type
116type MockSessionSecurityController struct {
117	mock.Mock
118}
119
120type MockSessionSecurityController_Expecter struct {
121	mock *mock.Mock
122}
123
124func (_m *MockSessionSecurityController) EXPECT() *MockSessionSecurityController_Expecter {
125	return &MockSessionSecurityController_Expecter{mock: &_m.Mock}
126}
127
128// Engage provides a mock function for the type MockSessionSecurityController
129func (_mock *MockSessionSecurityController) Engage() (ports.SecurityState, error) {
130	ret := _mock.Called()
131
132	if len(ret) == 0 {
133		panic("no return value specified for Engage")
134	}
135
136	var r0 ports.SecurityState
137	var r1 error
138	if returnFunc, ok := ret.Get(0).(func() (ports.SecurityState, error)); ok {
139		return returnFunc()
140	}
141	if returnFunc, ok := ret.Get(0).(func() ports.SecurityState); ok {
142		r0 = returnFunc()
143	} else {
144		r0 = ret.Get(0).(ports.SecurityState)
145	}
146	if returnFunc, ok := ret.Get(1).(func() error); ok {
147		r1 = returnFunc()
148	} else {
149		r1 = ret.Error(1)
150	}
151	return r0, r1
152}
153
154// MockSessionSecurityController_Engage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Engage'
155type MockSessionSecurityController_Engage_Call struct {
156	*mock.Call
157}
158
159// Engage is a helper method to define mock.On call
160func (_e *MockSessionSecurityController_Expecter) Engage() *MockSessionSecurityController_Engage_Call {
161	return &MockSessionSecurityController_Engage_Call{Call: _e.mock.On("Engage")}
162}
163
164func (_c *MockSessionSecurityController_Engage_Call) Run(run func()) *MockSessionSecurityController_Engage_Call {
165	_c.Call.Run(func(args mock.Arguments) {
166		run()
167	})
168	return _c
169}
170
171func (_c *MockSessionSecurityController_Engage_Call) Return(securityState ports.SecurityState, err error) *MockSessionSecurityController_Engage_Call {
172	_c.Call.Return(securityState, err)
173	return _c
174}
175
176func (_c *MockSessionSecurityController_Engage_Call) RunAndReturn(run func() (ports.SecurityState, error)) *MockSessionSecurityController_Engage_Call {
177	_c.Call.Return(run)
178	return _c
179}
180
181// Release provides a mock function for the type MockSessionSecurityController
182func (_mock *MockSessionSecurityController) Release(expected ports.LockGeneration) (ports.SecurityState, error) {
183	ret := _mock.Called(expected)
184
185	if len(ret) == 0 {
186		panic("no return value specified for Release")
187	}
188
189	var r0 ports.SecurityState
190	var r1 error
191	if returnFunc, ok := ret.Get(0).(func(ports.LockGeneration) (ports.SecurityState, error)); ok {
192		return returnFunc(expected)
193	}
194	if returnFunc, ok := ret.Get(0).(func(ports.LockGeneration) ports.SecurityState); ok {
195		r0 = returnFunc(expected)
196	} else {
197		r0 = ret.Get(0).(ports.SecurityState)
198	}
199	if returnFunc, ok := ret.Get(1).(func(ports.LockGeneration) error); ok {
200		r1 = returnFunc(expected)
201	} else {
202		r1 = ret.Error(1)
203	}
204	return r0, r1
205}
206
207// MockSessionSecurityController_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'
208type MockSessionSecurityController_Release_Call struct {
209	*mock.Call
210}
211
212// Release is a helper method to define mock.On call
213//   - expected ports.LockGeneration
214func (_e *MockSessionSecurityController_Expecter) Release(expected any) *MockSessionSecurityController_Release_Call {
215	return &MockSessionSecurityController_Release_Call{Call: _e.mock.On("Release", expected)}
216}
217
218func (_c *MockSessionSecurityController_Release_Call) Run(run func(expected ports.LockGeneration)) *MockSessionSecurityController_Release_Call {
219	_c.Call.Run(func(args mock.Arguments) {
220		var arg0 ports.LockGeneration
221		if args[0] != nil {
222			arg0 = args[0].(ports.LockGeneration)
223		}
224		run(
225			arg0,
226		)
227	})
228	return _c
229}
230
231func (_c *MockSessionSecurityController_Release_Call) Return(securityState ports.SecurityState, err error) *MockSessionSecurityController_Release_Call {
232	_c.Call.Return(securityState, err)
233	return _c
234}
235
236func (_c *MockSessionSecurityController_Release_Call) RunAndReturn(run func(expected ports.LockGeneration) (ports.SecurityState, error)) *MockSessionSecurityController_Release_Call {
237	_c.Call.Return(run)
238	return _c
239}
240
241// Snapshot provides a mock function for the type MockSessionSecurityController
242func (_mock *MockSessionSecurityController) Snapshot() ports.SecurityState {
243	ret := _mock.Called()
244
245	if len(ret) == 0 {
246		panic("no return value specified for Snapshot")
247	}
248
249	var r0 ports.SecurityState
250	if returnFunc, ok := ret.Get(0).(func() ports.SecurityState); ok {
251		r0 = returnFunc()
252	} else {
253		r0 = ret.Get(0).(ports.SecurityState)
254	}
255	return r0
256}
257
258// MockSessionSecurityController_Snapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Snapshot'
259type MockSessionSecurityController_Snapshot_Call struct {
260	*mock.Call
261}
262
263// Snapshot is a helper method to define mock.On call
264func (_e *MockSessionSecurityController_Expecter) Snapshot() *MockSessionSecurityController_Snapshot_Call {
265	return &MockSessionSecurityController_Snapshot_Call{Call: _e.mock.On("Snapshot")}
266}
267
268func (_c *MockSessionSecurityController_Snapshot_Call) Run(run func()) *MockSessionSecurityController_Snapshot_Call {
269	_c.Call.Run(func(args mock.Arguments) {
270		run()
271	})
272	return _c
273}
274
275func (_c *MockSessionSecurityController_Snapshot_Call) Return(securityState ports.SecurityState) *MockSessionSecurityController_Snapshot_Call {
276	_c.Call.Return(securityState)
277	return _c
278}
279
280func (_c *MockSessionSecurityController_Snapshot_Call) RunAndReturn(run func() ports.SecurityState) *MockSessionSecurityController_Snapshot_Call {
281	_c.Call.Return(run)
282	return _c
283}

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 25

Tags 10

↑↓ moveenter openesc close