-
Notifications
You must be signed in to change notification settings - Fork 173
/
mockstorage.go
194 lines (165 loc) · 5.93 KB
/
mockstorage.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/lovoo/goka/storage (interfaces: Storage)
// Package goka is a generated GoMock package.
package goka
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
storage "github.com/lovoo/goka/storage"
)
// MockStorage is a mock of Storage interface.
type MockStorage struct {
ctrl *gomock.Controller
recorder *MockStorageMockRecorder
}
// MockStorageMockRecorder is the mock recorder for MockStorage.
type MockStorageMockRecorder struct {
mock *MockStorage
}
// NewMockStorage creates a new mock instance.
func NewMockStorage(ctrl *gomock.Controller) *MockStorage {
mock := &MockStorage{ctrl: ctrl}
mock.recorder = &MockStorageMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStorage) EXPECT() *MockStorageMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockStorage) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockStorageMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStorage)(nil).Close))
}
// Delete mocks base method.
func (m *MockStorage) Delete(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockStorageMockRecorder) Delete(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), arg0)
}
// Get mocks base method.
func (m *MockStorage) Get(arg0 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockStorageMockRecorder) Get(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), arg0)
}
// GetOffset mocks base method.
func (m *MockStorage) GetOffset(arg0 int64) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetOffset", arg0)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetOffset indicates an expected call of GetOffset.
func (mr *MockStorageMockRecorder) GetOffset(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockStorage)(nil).GetOffset), arg0)
}
// Has mocks base method.
func (m *MockStorage) Has(arg0 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Has", arg0)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Has indicates an expected call of Has.
func (mr *MockStorageMockRecorder) Has(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), arg0)
}
// Iterator mocks base method.
func (m *MockStorage) Iterator() (storage.Iterator, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Iterator")
ret0, _ := ret[0].(storage.Iterator)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Iterator indicates an expected call of Iterator.
func (mr *MockStorageMockRecorder) Iterator() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterator", reflect.TypeOf((*MockStorage)(nil).Iterator))
}
// IteratorWithRange mocks base method.
func (m *MockStorage) IteratorWithRange(arg0, arg1 []byte) (storage.Iterator, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IteratorWithRange", arg0, arg1)
ret0, _ := ret[0].(storage.Iterator)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IteratorWithRange indicates an expected call of IteratorWithRange.
func (mr *MockStorageMockRecorder) IteratorWithRange(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IteratorWithRange", reflect.TypeOf((*MockStorage)(nil).IteratorWithRange), arg0, arg1)
}
// MarkRecovered mocks base method.
func (m *MockStorage) MarkRecovered() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MarkRecovered")
ret0, _ := ret[0].(error)
return ret0
}
// MarkRecovered indicates an expected call of MarkRecovered.
func (mr *MockStorageMockRecorder) MarkRecovered() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkRecovered", reflect.TypeOf((*MockStorage)(nil).MarkRecovered))
}
// Open mocks base method.
func (m *MockStorage) Open() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Open")
ret0, _ := ret[0].(error)
return ret0
}
// Open indicates an expected call of Open.
func (mr *MockStorageMockRecorder) Open() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockStorage)(nil).Open))
}
// Set mocks base method.
func (m *MockStorage) Set(arg0 string, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Set", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Set indicates an expected call of Set.
func (mr *MockStorageMockRecorder) Set(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockStorage)(nil).Set), arg0, arg1)
}
// SetOffset mocks base method.
func (m *MockStorage) SetOffset(arg0 int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetOffset", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetOffset indicates an expected call of SetOffset.
func (mr *MockStorageMockRecorder) SetOffset(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOffset", reflect.TypeOf((*MockStorage)(nil).SetOffset), arg0)
}