-
Notifications
You must be signed in to change notification settings - Fork 15
/
interface.go
196 lines (167 loc) · 6.92 KB
/
interface.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// Code generated by MockGen. DO NOT EDIT.
// Source: interface.go
// Package mock_provider is a generated GoMock package.
package mock_provider
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
cid "github.com/ipfs/go-cid"
schema "github.com/ipni/go-libipni/ingest/schema"
metadata "github.com/ipni/go-libipni/metadata"
provider "github.com/ipni/index-provider"
peer "github.com/libp2p/go-libp2p/core/peer"
multihash "github.com/multiformats/go-multihash"
)
// MockInterface is a mock of Interface interface.
type MockInterface struct {
ctrl *gomock.Controller
recorder *MockInterfaceMockRecorder
}
// MockInterfaceMockRecorder is the mock recorder for MockInterface.
type MockInterfaceMockRecorder struct {
mock *MockInterface
}
// NewMockInterface creates a new mock instance.
func NewMockInterface(ctrl *gomock.Controller) *MockInterface {
mock := &MockInterface{ctrl: ctrl}
mock.recorder = &MockInterfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
// GetAdv mocks base method.
func (m *MockInterface) GetAdv(arg0 context.Context, arg1 cid.Cid) (*schema.Advertisement, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAdv", arg0, arg1)
ret0, _ := ret[0].(*schema.Advertisement)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAdv indicates an expected call of GetAdv.
func (mr *MockInterfaceMockRecorder) GetAdv(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdv", reflect.TypeOf((*MockInterface)(nil).GetAdv), arg0, arg1)
}
// GetLatestAdv mocks base method.
func (m *MockInterface) GetLatestAdv(arg0 context.Context) (cid.Cid, *schema.Advertisement, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLatestAdv", arg0)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(*schema.Advertisement)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetLatestAdv indicates an expected call of GetLatestAdv.
func (mr *MockInterfaceMockRecorder) GetLatestAdv(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestAdv", reflect.TypeOf((*MockInterface)(nil).GetLatestAdv), arg0)
}
// NotifyPut mocks base method.
func (m *MockInterface) NotifyPut(ctx context.Context, provider *peer.AddrInfo, contextID []byte, md metadata.Metadata) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NotifyPut", ctx, provider, contextID, md)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NotifyPut indicates an expected call of NotifyPut.
func (mr *MockInterfaceMockRecorder) NotifyPut(ctx, provider, contextID, md interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyPut", reflect.TypeOf((*MockInterface)(nil).NotifyPut), ctx, provider, contextID, md)
}
// NotifyRemove mocks base method.
func (m *MockInterface) NotifyRemove(ctx context.Context, providerID peer.ID, contextID []byte) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NotifyRemove", ctx, providerID, contextID)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NotifyRemove indicates an expected call of NotifyRemove.
func (mr *MockInterfaceMockRecorder) NotifyRemove(ctx, providerID, contextID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyRemove", reflect.TypeOf((*MockInterface)(nil).NotifyRemove), ctx, providerID, contextID)
}
// Publish mocks base method.
func (m *MockInterface) Publish(arg0 context.Context, arg1 schema.Advertisement) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Publish", arg0, arg1)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Publish indicates an expected call of Publish.
func (mr *MockInterfaceMockRecorder) Publish(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockInterface)(nil).Publish), arg0, arg1)
}
// PublishLocal mocks base method.
func (m *MockInterface) PublishLocal(arg0 context.Context, arg1 schema.Advertisement) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PublishLocal", arg0, arg1)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PublishLocal indicates an expected call of PublishLocal.
func (mr *MockInterfaceMockRecorder) PublishLocal(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishLocal", reflect.TypeOf((*MockInterface)(nil).PublishLocal), arg0, arg1)
}
// RegisterMultihashLister mocks base method.
func (m *MockInterface) RegisterMultihashLister(arg0 provider.MultihashLister) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RegisterMultihashLister", arg0)
}
// RegisterMultihashLister indicates an expected call of RegisterMultihashLister.
func (mr *MockInterfaceMockRecorder) RegisterMultihashLister(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterMultihashLister", reflect.TypeOf((*MockInterface)(nil).RegisterMultihashLister), arg0)
}
// Shutdown mocks base method.
func (m *MockInterface) Shutdown() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Shutdown")
ret0, _ := ret[0].(error)
return ret0
}
// Shutdown indicates an expected call of Shutdown.
func (mr *MockInterfaceMockRecorder) Shutdown() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockInterface)(nil).Shutdown))
}
// MockMultihashIterator is a mock of MultihashIterator interface.
type MockMultihashIterator struct {
ctrl *gomock.Controller
recorder *MockMultihashIteratorMockRecorder
}
// MockMultihashIteratorMockRecorder is the mock recorder for MockMultihashIterator.
type MockMultihashIteratorMockRecorder struct {
mock *MockMultihashIterator
}
// NewMockMultihashIterator creates a new mock instance.
func NewMockMultihashIterator(ctrl *gomock.Controller) *MockMultihashIterator {
mock := &MockMultihashIterator{ctrl: ctrl}
mock.recorder = &MockMultihashIteratorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMultihashIterator) EXPECT() *MockMultihashIteratorMockRecorder {
return m.recorder
}
// Next mocks base method.
func (m *MockMultihashIterator) Next() (multihash.Multihash, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next")
ret0, _ := ret[0].(multihash.Multihash)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Next indicates an expected call of Next.
func (mr *MockMultihashIteratorMockRecorder) Next() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockMultihashIterator)(nil).Next))
}