-
Notifications
You must be signed in to change notification settings - Fork 12
/
mock_store.go
171 lines (146 loc) · 5.3 KB
/
mock_store.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/anyproto/any-sync-filenode/store (interfaces: Store)
//
// Generated by this command:
//
// mockgen -destination mock_store/mock_store.go github.com/anyproto/any-sync-filenode/store Store
//
// Package mock_store is a generated GoMock package.
package mock_store
import (
context "context"
reflect "reflect"
app "github.com/anyproto/any-sync/app"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
gomock "go.uber.org/mock/gomock"
)
// MockStore is a mock of Store interface.
type MockStore struct {
ctrl *gomock.Controller
recorder *MockStoreMockRecorder
}
// MockStoreMockRecorder is the mock recorder for MockStore.
type MockStoreMockRecorder struct {
mock *MockStore
}
// NewMockStore creates a new mock instance.
func NewMockStore(ctrl *gomock.Controller) *MockStore {
mock := &MockStore{ctrl: ctrl}
mock.recorder = &MockStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStore) EXPECT() *MockStoreMockRecorder {
return m.recorder
}
// Add mocks base method.
func (m *MockStore) Add(arg0 context.Context, arg1 []blocks.Block) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Add", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Add indicates an expected call of Add.
func (mr *MockStoreMockRecorder) Add(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockStore)(nil).Add), arg0, arg1)
}
// Delete mocks base method.
func (m *MockStore) Delete(arg0 context.Context, arg1 cid.Cid) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStore)(nil).Delete), arg0, arg1)
}
// DeleteMany mocks base method.
func (m *MockStore) DeleteMany(arg0 context.Context, arg1 []cid.Cid) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteMany", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteMany indicates an expected call of DeleteMany.
func (mr *MockStoreMockRecorder) DeleteMany(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMany", reflect.TypeOf((*MockStore)(nil).DeleteMany), arg0, arg1)
}
// Get mocks base method.
func (m *MockStore) Get(arg0 context.Context, arg1 cid.Cid) (blocks.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1)
ret0, _ := ret[0].(blocks.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStore)(nil).Get), arg0, arg1)
}
// GetMany mocks base method.
func (m *MockStore) GetMany(arg0 context.Context, arg1 []cid.Cid) <-chan blocks.Block {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMany", arg0, arg1)
ret0, _ := ret[0].(<-chan blocks.Block)
return ret0
}
// GetMany indicates an expected call of GetMany.
func (mr *MockStoreMockRecorder) GetMany(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMany", reflect.TypeOf((*MockStore)(nil).GetMany), arg0, arg1)
}
// IndexGet mocks base method.
func (m *MockStore) IndexGet(arg0 context.Context, arg1 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IndexGet", arg0, arg1)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IndexGet indicates an expected call of IndexGet.
func (mr *MockStoreMockRecorder) IndexGet(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexGet", reflect.TypeOf((*MockStore)(nil).IndexGet), arg0, arg1)
}
// IndexPut mocks base method.
func (m *MockStore) IndexPut(arg0 context.Context, arg1 string, arg2 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IndexPut", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// IndexPut indicates an expected call of IndexPut.
func (mr *MockStoreMockRecorder) IndexPut(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexPut", reflect.TypeOf((*MockStore)(nil).IndexPut), arg0, arg1, arg2)
}
// Init mocks base method.
func (m *MockStore) Init(arg0 *app.App) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Init", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Init indicates an expected call of Init.
func (mr *MockStoreMockRecorder) Init(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockStore)(nil).Init), arg0)
}
// Name mocks base method.
func (m *MockStore) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockStoreMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockStore)(nil).Name))
}