v0.35.1 2aca1df

TrustedKeyStore.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	mock "github.com/stretchr/testify/mock"
12)
13
14// NewTrustedKeyStore creates a new instance of TrustedKeyStore. 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 NewTrustedKeyStore(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *TrustedKeyStore {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &TrustedKeyStore{}
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// TrustedKeyStore is an autogenerated mock type for the TrustedKeyStore type
38type TrustedKeyStore struct {
39	mock.Mock
40}
41
42type TrustedKeyStore_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *TrustedKeyStore) EXPECT() *TrustedKeyStore_Expecter {
47	return &TrustedKeyStore_Expecter{mock: &_m.Mock}
48}
49
50// CreateTrustedKey provides a mock function for the type TrustedKeyStore
51func (_mock *TrustedKeyStore) CreateTrustedKey(ctx context.Context, k domain.TrustedKey) error {
52	ret := _mock.Called(ctx, k)
53
54	if len(ret) == 0 {
55		panic("no return value specified for CreateTrustedKey")
56	}
57
58	var r0 error
59	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.TrustedKey) error); ok {
60		r0 = returnFunc(ctx, k)
61	} else {
62		r0 = ret.Error(0)
63	}
64	return r0
65}
66
67// TrustedKeyStore_CreateTrustedKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTrustedKey'
68type TrustedKeyStore_CreateTrustedKey_Call struct {
69	*mock.Call
70}
71
72// CreateTrustedKey is a helper method to define mock.On call
73//   - ctx context.Context
74//   - k domain.TrustedKey
75func (_e *TrustedKeyStore_Expecter) CreateTrustedKey(ctx any, k any) *TrustedKeyStore_CreateTrustedKey_Call {
76	return &TrustedKeyStore_CreateTrustedKey_Call{Call: _e.mock.On("CreateTrustedKey", ctx, k)}
77}
78
79func (_c *TrustedKeyStore_CreateTrustedKey_Call) Run(run func(ctx context.Context, k domain.TrustedKey)) *TrustedKeyStore_CreateTrustedKey_Call {
80	_c.Call.Run(func(args mock.Arguments) {
81		var arg0 context.Context
82		if args[0] != nil {
83			arg0 = args[0].(context.Context)
84		}
85		var arg1 domain.TrustedKey
86		if args[1] != nil {
87			arg1 = args[1].(domain.TrustedKey)
88		}
89		run(
90			arg0,
91			arg1,
92		)
93	})
94	return _c
95}
96
97func (_c *TrustedKeyStore_CreateTrustedKey_Call) Return(err error) *TrustedKeyStore_CreateTrustedKey_Call {
98	_c.Call.Return(err)
99	return _c
100}
101
102func (_c *TrustedKeyStore_CreateTrustedKey_Call) RunAndReturn(run func(ctx context.Context, k domain.TrustedKey) error) *TrustedKeyStore_CreateTrustedKey_Call {
103	_c.Call.Return(run)
104	return _c
105}
106
107// DeleteTrustedKey provides a mock function for the type TrustedKeyStore
108func (_mock *TrustedKeyStore) DeleteTrustedKey(ctx context.Context, id string) error {
109	ret := _mock.Called(ctx, id)
110
111	if len(ret) == 0 {
112		panic("no return value specified for DeleteTrustedKey")
113	}
114
115	var r0 error
116	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
117		r0 = returnFunc(ctx, id)
118	} else {
119		r0 = ret.Error(0)
120	}
121	return r0
122}
123
124// TrustedKeyStore_DeleteTrustedKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTrustedKey'
125type TrustedKeyStore_DeleteTrustedKey_Call struct {
126	*mock.Call
127}
128
129// DeleteTrustedKey is a helper method to define mock.On call
130//   - ctx context.Context
131//   - id string
132func (_e *TrustedKeyStore_Expecter) DeleteTrustedKey(ctx any, id any) *TrustedKeyStore_DeleteTrustedKey_Call {
133	return &TrustedKeyStore_DeleteTrustedKey_Call{Call: _e.mock.On("DeleteTrustedKey", ctx, id)}
134}
135
136func (_c *TrustedKeyStore_DeleteTrustedKey_Call) Run(run func(ctx context.Context, id string)) *TrustedKeyStore_DeleteTrustedKey_Call {
137	_c.Call.Run(func(args mock.Arguments) {
138		var arg0 context.Context
139		if args[0] != nil {
140			arg0 = args[0].(context.Context)
141		}
142		var arg1 string
143		if args[1] != nil {
144			arg1 = args[1].(string)
145		}
146		run(
147			arg0,
148			arg1,
149		)
150	})
151	return _c
152}
153
154func (_c *TrustedKeyStore_DeleteTrustedKey_Call) Return(err error) *TrustedKeyStore_DeleteTrustedKey_Call {
155	_c.Call.Return(err)
156	return _c
157}
158
159func (_c *TrustedKeyStore_DeleteTrustedKey_Call) RunAndReturn(run func(ctx context.Context, id string) error) *TrustedKeyStore_DeleteTrustedKey_Call {
160	_c.Call.Return(run)
161	return _c
162}
163
164// ListTrustedKeys provides a mock function for the type TrustedKeyStore
165func (_mock *TrustedKeyStore) ListTrustedKeys(ctx context.Context) ([]domain.TrustedKey, error) {
166	ret := _mock.Called(ctx)
167
168	if len(ret) == 0 {
169		panic("no return value specified for ListTrustedKeys")
170	}
171
172	var r0 []domain.TrustedKey
173	var r1 error
174	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.TrustedKey, error)); ok {
175		return returnFunc(ctx)
176	}
177	if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.TrustedKey); ok {
178		r0 = returnFunc(ctx)
179	} else {
180		if ret.Get(0) != nil {
181			r0 = ret.Get(0).([]domain.TrustedKey)
182		}
183	}
184	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
185		r1 = returnFunc(ctx)
186	} else {
187		r1 = ret.Error(1)
188	}
189	return r0, r1
190}
191
192// TrustedKeyStore_ListTrustedKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTrustedKeys'
193type TrustedKeyStore_ListTrustedKeys_Call struct {
194	*mock.Call
195}
196
197// ListTrustedKeys is a helper method to define mock.On call
198//   - ctx context.Context
199func (_e *TrustedKeyStore_Expecter) ListTrustedKeys(ctx any) *TrustedKeyStore_ListTrustedKeys_Call {
200	return &TrustedKeyStore_ListTrustedKeys_Call{Call: _e.mock.On("ListTrustedKeys", ctx)}
201}
202
203func (_c *TrustedKeyStore_ListTrustedKeys_Call) Run(run func(ctx context.Context)) *TrustedKeyStore_ListTrustedKeys_Call {
204	_c.Call.Run(func(args mock.Arguments) {
205		var arg0 context.Context
206		if args[0] != nil {
207			arg0 = args[0].(context.Context)
208		}
209		run(
210			arg0,
211		)
212	})
213	return _c
214}
215
216func (_c *TrustedKeyStore_ListTrustedKeys_Call) Return(trustedKeys []domain.TrustedKey, err error) *TrustedKeyStore_ListTrustedKeys_Call {
217	_c.Call.Return(trustedKeys, err)
218	return _c
219}
220
221func (_c *TrustedKeyStore_ListTrustedKeys_Call) RunAndReturn(run func(ctx context.Context) ([]domain.TrustedKey, error)) *TrustedKeyStore_ListTrustedKeys_Call {
222	_c.Call.Return(run)
223	return _c
224}

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