detached 5278df2

MirrorWarner.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// NewMirrorWarner creates a new instance of MirrorWarner. 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 NewMirrorWarner(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MirrorWarner {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MirrorWarner{}
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// MirrorWarner is an autogenerated mock type for the MirrorWarner type
38type MirrorWarner struct {
39	mock.Mock
40}
41
42type MirrorWarner_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MirrorWarner) EXPECT() *MirrorWarner_Expecter {
47	return &MirrorWarner_Expecter{mock: &_m.Mock}
48}
49
50// Badge provides a mock function for the type MirrorWarner
51func (_mock *MirrorWarner) Badge(ctx context.Context, p domain.Principal, repo domain.RepoName) (domain.MirrorState, string) {
52	ret := _mock.Called(ctx, p, repo)
53
54	if len(ret) == 0 {
55		panic("no return value specified for Badge")
56	}
57
58	var r0 domain.MirrorState
59	var r1 string
60	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) (domain.MirrorState, string)); ok {
61		return returnFunc(ctx, p, repo)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) domain.MirrorState); ok {
64		r0 = returnFunc(ctx, p, repo)
65	} else {
66		r0 = ret.Get(0).(domain.MirrorState)
67	}
68	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName) string); ok {
69		r1 = returnFunc(ctx, p, repo)
70	} else {
71		r1 = ret.Get(1).(string)
72	}
73	return r0, r1
74}
75
76// MirrorWarner_Badge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Badge'
77type MirrorWarner_Badge_Call struct {
78	*mock.Call
79}
80
81// Badge is a helper method to define mock.On call
82//   - ctx context.Context
83//   - p domain.Principal
84//   - repo domain.RepoName
85func (_e *MirrorWarner_Expecter) Badge(ctx any, p any, repo any) *MirrorWarner_Badge_Call {
86	return &MirrorWarner_Badge_Call{Call: _e.mock.On("Badge", ctx, p, repo)}
87}
88
89func (_c *MirrorWarner_Badge_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *MirrorWarner_Badge_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		var arg1 domain.Principal
96		if args[1] != nil {
97			arg1 = args[1].(domain.Principal)
98		}
99		var arg2 domain.RepoName
100		if args[2] != nil {
101			arg2 = args[2].(domain.RepoName)
102		}
103		run(
104			arg0,
105			arg1,
106			arg2,
107		)
108	})
109	return _c
110}
111
112func (_c *MirrorWarner_Badge_Call) Return(mirrorState domain.MirrorState, s string) *MirrorWarner_Badge_Call {
113	_c.Call.Return(mirrorState, s)
114	return _c
115}
116
117func (_c *MirrorWarner_Badge_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) (domain.MirrorState, string)) *MirrorWarner_Badge_Call {
118	_c.Call.Return(run)
119	return _c
120}
121
122// Warning provides a mock function for the type MirrorWarner
123func (_mock *MirrorWarner) Warning(ctx context.Context, p domain.Principal, repo domain.RepoName) string {
124	ret := _mock.Called(ctx, p, repo)
125
126	if len(ret) == 0 {
127		panic("no return value specified for Warning")
128	}
129
130	var r0 string
131	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) string); ok {
132		r0 = returnFunc(ctx, p, repo)
133	} else {
134		r0 = ret.Get(0).(string)
135	}
136	return r0
137}
138
139// MirrorWarner_Warning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Warning'
140type MirrorWarner_Warning_Call struct {
141	*mock.Call
142}
143
144// Warning is a helper method to define mock.On call
145//   - ctx context.Context
146//   - p domain.Principal
147//   - repo domain.RepoName
148func (_e *MirrorWarner_Expecter) Warning(ctx any, p any, repo any) *MirrorWarner_Warning_Call {
149	return &MirrorWarner_Warning_Call{Call: _e.mock.On("Warning", ctx, p, repo)}
150}
151
152func (_c *MirrorWarner_Warning_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *MirrorWarner_Warning_Call {
153	_c.Call.Run(func(args mock.Arguments) {
154		var arg0 context.Context
155		if args[0] != nil {
156			arg0 = args[0].(context.Context)
157		}
158		var arg1 domain.Principal
159		if args[1] != nil {
160			arg1 = args[1].(domain.Principal)
161		}
162		var arg2 domain.RepoName
163		if args[2] != nil {
164			arg2 = args[2].(domain.RepoName)
165		}
166		run(
167			arg0,
168			arg1,
169			arg2,
170		)
171	})
172	return _c
173}
174
175func (_c *MirrorWarner_Warning_Call) Return(s string) *MirrorWarner_Warning_Call {
176	_c.Call.Return(s)
177	return _c
178}
179
180func (_c *MirrorWarner_Warning_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) string) *MirrorWarner_Warning_Call {
181	_c.Call.Return(run)
182	return _c
183}

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