v0.36.0 1fb2421

OIDCKeyService.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	"bnema.dev/ermite/internal/domain"
11	"bnema.dev/ermite/internal/ports"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewOIDCKeyService creates a new instance of OIDCKeyService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewOIDCKeyService(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *OIDCKeyService {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &OIDCKeyService{}
26	mock.Mock.Test(t)
27
28	t.Cleanup(func() {
29		if helper, ok := t.(interface{ Helper() }); ok {
30			helper.Helper()
31		}
32		mock.AssertExpectations(t)
33	})
34
35	return mock
36}
37
38// OIDCKeyService is an autogenerated mock type for the OIDCKeyService type
39type OIDCKeyService struct {
40	mock.Mock
41}
42
43type OIDCKeyService_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *OIDCKeyService) EXPECT() *OIDCKeyService_Expecter {
48	return &OIDCKeyService_Expecter{mock: &_m.Mock}
49}
50
51// Enabled provides a mock function for the type OIDCKeyService
52func (_mock *OIDCKeyService) Enabled() bool {
53	ret := _mock.Called()
54
55	if len(ret) == 0 {
56		panic("no return value specified for Enabled")
57	}
58
59	var r0 bool
60	if returnFunc, ok := ret.Get(0).(func() bool); ok {
61		r0 = returnFunc()
62	} else {
63		r0 = ret.Get(0).(bool)
64	}
65	return r0
66}
67
68// OIDCKeyService_Enabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enabled'
69type OIDCKeyService_Enabled_Call struct {
70	*mock.Call
71}
72
73// Enabled is a helper method to define mock.On call
74func (_e *OIDCKeyService_Expecter) Enabled() *OIDCKeyService_Enabled_Call {
75	return &OIDCKeyService_Enabled_Call{Call: _e.mock.On("Enabled")}
76}
77
78func (_c *OIDCKeyService_Enabled_Call) Run(run func()) *OIDCKeyService_Enabled_Call {
79	_c.Call.Run(func(args mock.Arguments) {
80		run()
81	})
82	return _c
83}
84
85func (_c *OIDCKeyService_Enabled_Call) Return(b bool) *OIDCKeyService_Enabled_Call {
86	_c.Call.Return(b)
87	return _c
88}
89
90func (_c *OIDCKeyService_Enabled_Call) RunAndReturn(run func() bool) *OIDCKeyService_Enabled_Call {
91	_c.Call.Return(run)
92	return _c
93}
94
95// RotateKey provides a mock function for the type OIDCKeyService
96func (_mock *OIDCKeyService) RotateKey(ctx context.Context, p domain.Principal) (ports.OIDCRotation, error) {
97	ret := _mock.Called(ctx, p)
98
99	if len(ret) == 0 {
100		panic("no return value specified for RotateKey")
101	}
102
103	var r0 ports.OIDCRotation
104	var r1 error
105	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (ports.OIDCRotation, error)); ok {
106		return returnFunc(ctx, p)
107	}
108	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) ports.OIDCRotation); ok {
109		r0 = returnFunc(ctx, p)
110	} else {
111		r0 = ret.Get(0).(ports.OIDCRotation)
112	}
113	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok {
114		r1 = returnFunc(ctx, p)
115	} else {
116		r1 = ret.Error(1)
117	}
118	return r0, r1
119}
120
121// OIDCKeyService_RotateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateKey'
122type OIDCKeyService_RotateKey_Call struct {
123	*mock.Call
124}
125
126// RotateKey is a helper method to define mock.On call
127//   - ctx context.Context
128//   - p domain.Principal
129func (_e *OIDCKeyService_Expecter) RotateKey(ctx any, p any) *OIDCKeyService_RotateKey_Call {
130	return &OIDCKeyService_RotateKey_Call{Call: _e.mock.On("RotateKey", ctx, p)}
131}
132
133func (_c *OIDCKeyService_RotateKey_Call) Run(run func(ctx context.Context, p domain.Principal)) *OIDCKeyService_RotateKey_Call {
134	_c.Call.Run(func(args mock.Arguments) {
135		var arg0 context.Context
136		if args[0] != nil {
137			arg0 = args[0].(context.Context)
138		}
139		var arg1 domain.Principal
140		if args[1] != nil {
141			arg1 = args[1].(domain.Principal)
142		}
143		run(
144			arg0,
145			arg1,
146		)
147	})
148	return _c
149}
150
151func (_c *OIDCKeyService_RotateKey_Call) Return(oIDCRotation ports.OIDCRotation, err error) *OIDCKeyService_RotateKey_Call {
152	_c.Call.Return(oIDCRotation, err)
153	return _c
154}
155
156func (_c *OIDCKeyService_RotateKey_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (ports.OIDCRotation, error)) *OIDCKeyService_RotateKey_Call {
157	_c.Call.Return(run)
158	return _c
159}

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 4

Tags 45

↑↓ moveenter openesc close