v0.33.0 62a09f5

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

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