-
Notifications
You must be signed in to change notification settings - Fork 211
/
beacons.go
139 lines (116 loc) · 4.69 KB
/
beacons.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Code generated by MockGen. DO NOT EDIT.
// Source: ./beacons.go
//
// Generated by this command:
//
// mockgen -typed -package=mocks -destination=./mocks/beacons.go -source=./beacons.go
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
fixed "github.com/spacemeshos/fixed"
types "github.com/spacemeshos/go-spacemesh/common/types"
gomock "go.uber.org/mock/gomock"
)
// MockBeaconCollector is a mock of BeaconCollector interface.
type MockBeaconCollector struct {
ctrl *gomock.Controller
recorder *MockBeaconCollectorMockRecorder
}
// MockBeaconCollectorMockRecorder is the mock recorder for MockBeaconCollector.
type MockBeaconCollectorMockRecorder struct {
mock *MockBeaconCollector
}
// NewMockBeaconCollector creates a new mock instance.
func NewMockBeaconCollector(ctrl *gomock.Controller) *MockBeaconCollector {
mock := &MockBeaconCollector{ctrl: ctrl}
mock.recorder = &MockBeaconCollectorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBeaconCollector) EXPECT() *MockBeaconCollectorMockRecorder {
return m.recorder
}
// ReportBeaconFromBallot mocks base method.
func (m *MockBeaconCollector) ReportBeaconFromBallot(arg0 types.EpochID, arg1 *types.Ballot, arg2 types.Beacon, arg3 fixed.Fixed) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReportBeaconFromBallot", arg0, arg1, arg2, arg3)
}
// ReportBeaconFromBallot indicates an expected call of ReportBeaconFromBallot.
func (mr *MockBeaconCollectorMockRecorder) ReportBeaconFromBallot(arg0, arg1, arg2, arg3 any) *MockBeaconCollectorReportBeaconFromBallotCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportBeaconFromBallot", reflect.TypeOf((*MockBeaconCollector)(nil).ReportBeaconFromBallot), arg0, arg1, arg2, arg3)
return &MockBeaconCollectorReportBeaconFromBallotCall{Call: call}
}
// MockBeaconCollectorReportBeaconFromBallotCall wrap *gomock.Call
type MockBeaconCollectorReportBeaconFromBallotCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockBeaconCollectorReportBeaconFromBallotCall) Return() *MockBeaconCollectorReportBeaconFromBallotCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockBeaconCollectorReportBeaconFromBallotCall) Do(f func(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)) *MockBeaconCollectorReportBeaconFromBallotCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockBeaconCollectorReportBeaconFromBallotCall) DoAndReturn(f func(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)) *MockBeaconCollectorReportBeaconFromBallotCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockBeaconGetter is a mock of BeaconGetter interface.
type MockBeaconGetter struct {
ctrl *gomock.Controller
recorder *MockBeaconGetterMockRecorder
}
// MockBeaconGetterMockRecorder is the mock recorder for MockBeaconGetter.
type MockBeaconGetterMockRecorder struct {
mock *MockBeaconGetter
}
// NewMockBeaconGetter creates a new mock instance.
func NewMockBeaconGetter(ctrl *gomock.Controller) *MockBeaconGetter {
mock := &MockBeaconGetter{ctrl: ctrl}
mock.recorder = &MockBeaconGetterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBeaconGetter) EXPECT() *MockBeaconGetterMockRecorder {
return m.recorder
}
// GetBeacon mocks base method.
func (m *MockBeaconGetter) GetBeacon(arg0 types.EpochID) (types.Beacon, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBeacon", arg0)
ret0, _ := ret[0].(types.Beacon)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBeacon indicates an expected call of GetBeacon.
func (mr *MockBeaconGetterMockRecorder) GetBeacon(arg0 any) *MockBeaconGetterGetBeaconCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBeacon", reflect.TypeOf((*MockBeaconGetter)(nil).GetBeacon), arg0)
return &MockBeaconGetterGetBeaconCall{Call: call}
}
// MockBeaconGetterGetBeaconCall wrap *gomock.Call
type MockBeaconGetterGetBeaconCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockBeaconGetterGetBeaconCall) Return(arg0 types.Beacon, arg1 error) *MockBeaconGetterGetBeaconCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockBeaconGetterGetBeaconCall) Do(f func(types.EpochID) (types.Beacon, error)) *MockBeaconGetterGetBeaconCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockBeaconGetterGetBeaconCall) DoAndReturn(f func(types.EpochID) (types.Beacon, error)) *MockBeaconGetterGetBeaconCall {
c.Call = c.Call.DoAndReturn(f)
return c
}