mock_backup_metrics.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	"time"
10
11	"github.com/bnema/gordon/internal/domain"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockBackupMetrics creates a new instance of MockBackupMetrics. 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 NewMockBackupMetrics(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *MockBackupMetrics {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &MockBackupMetrics{}
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// MockBackupMetrics is an autogenerated mock type for the BackupMetrics type
39type MockBackupMetrics struct {
40	mock.Mock
41}
42
43type MockBackupMetrics_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *MockBackupMetrics) EXPECT() *MockBackupMetrics_Expecter {
48	return &MockBackupMetrics_Expecter{mock: &_m.Mock}
49}
50
51// ObserveStoredBackup provides a mock function for the type MockBackupMetrics
52func (_mock *MockBackupMetrics) ObserveStoredBackup(run domain.BackupRunRecord) {
53	_mock.Called(run)
54	return
55}
56
57// MockBackupMetrics_ObserveStoredBackup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ObserveStoredBackup'
58type MockBackupMetrics_ObserveStoredBackup_Call struct {
59	*mock.Call
60}
61
62// ObserveStoredBackup is a helper method to define mock.On call
63//   - run domain.BackupRunRecord
64func (_e *MockBackupMetrics_Expecter) ObserveStoredBackup(run any) *MockBackupMetrics_ObserveStoredBackup_Call {
65	return &MockBackupMetrics_ObserveStoredBackup_Call{Call: _e.mock.On("ObserveStoredBackup", run)}
66}
67
68func (_c *MockBackupMetrics_ObserveStoredBackup_Call) Run(run func(run domain.BackupRunRecord)) *MockBackupMetrics_ObserveStoredBackup_Call {
69	_c.Call.Run(func(args mock.Arguments) {
70		var arg0 domain.BackupRunRecord
71		if args[0] != nil {
72			arg0 = args[0].(domain.BackupRunRecord)
73		}
74		run(
75			arg0,
76		)
77	})
78	return _c
79}
80
81func (_c *MockBackupMetrics_ObserveStoredBackup_Call) Return() *MockBackupMetrics_ObserveStoredBackup_Call {
82	_c.Call.Return()
83	return _c
84}
85
86func (_c *MockBackupMetrics_ObserveStoredBackup_Call) RunAndReturn(run func(run domain.BackupRunRecord)) *MockBackupMetrics_ObserveStoredBackup_Call {
87	_c.Run(run)
88	return _c
89}
90
91// RecordBackupRun provides a mock function for the type MockBackupMetrics
92func (_mock *MockBackupMetrics) RecordBackupRun(ctx context.Context, run domain.BackupRunRecord) {
93	_mock.Called(ctx, run)
94	return
95}
96
97// MockBackupMetrics_RecordBackupRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordBackupRun'
98type MockBackupMetrics_RecordBackupRun_Call struct {
99	*mock.Call
100}
101
102// RecordBackupRun is a helper method to define mock.On call
103//   - ctx context.Context
104//   - run domain.BackupRunRecord
105func (_e *MockBackupMetrics_Expecter) RecordBackupRun(ctx any, run any) *MockBackupMetrics_RecordBackupRun_Call {
106	return &MockBackupMetrics_RecordBackupRun_Call{Call: _e.mock.On("RecordBackupRun", ctx, run)}
107}
108
109func (_c *MockBackupMetrics_RecordBackupRun_Call) Run(run func(ctx context.Context, run domain.BackupRunRecord)) *MockBackupMetrics_RecordBackupRun_Call {
110	_c.Call.Run(func(args mock.Arguments) {
111		var arg0 context.Context
112		if args[0] != nil {
113			arg0 = args[0].(context.Context)
114		}
115		var arg1 domain.BackupRunRecord
116		if args[1] != nil {
117			arg1 = args[1].(domain.BackupRunRecord)
118		}
119		run(
120			arg0,
121			arg1,
122		)
123	})
124	return _c
125}
126
127func (_c *MockBackupMetrics_RecordBackupRun_Call) Return() *MockBackupMetrics_RecordBackupRun_Call {
128	_c.Call.Return()
129	return _c
130}
131
132func (_c *MockBackupMetrics_RecordBackupRun_Call) RunAndReturn(run func(ctx context.Context, run domain.BackupRunRecord)) *MockBackupMetrics_RecordBackupRun_Call {
133	_c.Run(run)
134	return _c
135}
136
137// RetainBackupTargets provides a mock function for the type MockBackupMetrics
138func (_mock *MockBackupMetrics) RetainBackupTargets(kind domain.BackupKind, targets []domain.BackupTargetRef, asOf time.Time) {
139	_mock.Called(kind, targets, asOf)
140	return
141}
142
143// MockBackupMetrics_RetainBackupTargets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetainBackupTargets'
144type MockBackupMetrics_RetainBackupTargets_Call struct {
145	*mock.Call
146}
147
148// RetainBackupTargets is a helper method to define mock.On call
149//   - kind domain.BackupKind
150//   - targets []domain.BackupTargetRef
151//   - asOf time.Time
152func (_e *MockBackupMetrics_Expecter) RetainBackupTargets(kind any, targets any, asOf any) *MockBackupMetrics_RetainBackupTargets_Call {
153	return &MockBackupMetrics_RetainBackupTargets_Call{Call: _e.mock.On("RetainBackupTargets", kind, targets, asOf)}
154}
155
156func (_c *MockBackupMetrics_RetainBackupTargets_Call) Run(run func(kind domain.BackupKind, targets []domain.BackupTargetRef, asOf time.Time)) *MockBackupMetrics_RetainBackupTargets_Call {
157	_c.Call.Run(func(args mock.Arguments) {
158		var arg0 domain.BackupKind
159		if args[0] != nil {
160			arg0 = args[0].(domain.BackupKind)
161		}
162		var arg1 []domain.BackupTargetRef
163		if args[1] != nil {
164			arg1 = args[1].([]domain.BackupTargetRef)
165		}
166		var arg2 time.Time
167		if args[2] != nil {
168			arg2 = args[2].(time.Time)
169		}
170		run(
171			arg0,
172			arg1,
173			arg2,
174		)
175	})
176	return _c
177}
178
179func (_c *MockBackupMetrics_RetainBackupTargets_Call) Return() *MockBackupMetrics_RetainBackupTargets_Call {
180	_c.Call.Return()
181	return _c
182}
183
184func (_c *MockBackupMetrics_RetainBackupTargets_Call) RunAndReturn(run func(kind domain.BackupKind, targets []domain.BackupTargetRef, asOf time.Time)) *MockBackupMetrics_RetainBackupTargets_Call {
185	_c.Run(run)
186	return _c
187}

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 7

Tags 106

↑↓ moveenter openesc close