/
cache.go
135 lines (114 loc) · 4.17 KB
/
cache.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/baetyl/baetyl-cloud/v2/plugin (interfaces: DataCache)
// Package plugin is a generated GoMock package.
package plugin
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockDataCache is a mock of DataCache interface.
type MockDataCache struct {
ctrl *gomock.Controller
recorder *MockDataCacheMockRecorder
}
// MockDataCacheMockRecorder is the mock recorder for MockDataCache.
type MockDataCacheMockRecorder struct {
mock *MockDataCache
}
// NewMockDataCache creates a new mock instance.
func NewMockDataCache(ctrl *gomock.Controller) *MockDataCache {
mock := &MockDataCache{ctrl: ctrl}
mock.recorder = &MockDataCacheMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDataCache) EXPECT() *MockDataCacheMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockDataCache) 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 *MockDataCacheMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDataCache)(nil).Close))
}
// Delete mocks base method.
func (m *MockDataCache) 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 *MockDataCacheMockRecorder) Delete(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDataCache)(nil).Delete), arg0)
}
// Exist mocks base method.
func (m *MockDataCache) Exist(arg0 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Exist", arg0)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Exist indicates an expected call of Exist.
func (mr *MockDataCacheMockRecorder) Exist(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exist", reflect.TypeOf((*MockDataCache)(nil).Exist), arg0)
}
// GetByte mocks base method.
func (m *MockDataCache) GetByte(arg0 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByte", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetByte indicates an expected call of GetByte.
func (mr *MockDataCacheMockRecorder) GetByte(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByte", reflect.TypeOf((*MockDataCache)(nil).GetByte), arg0)
}
// GetString mocks base method.
func (m *MockDataCache) GetString(arg0 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetString", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetString indicates an expected call of GetString.
func (mr *MockDataCacheMockRecorder) GetString(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetString", reflect.TypeOf((*MockDataCache)(nil).GetString), arg0)
}
// SetByte mocks base method.
func (m *MockDataCache) SetByte(arg0 string, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetByte", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetByte indicates an expected call of SetByte.
func (mr *MockDataCacheMockRecorder) SetByte(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetByte", reflect.TypeOf((*MockDataCache)(nil).SetByte), arg0, arg1)
}
// SetString mocks base method.
func (m *MockDataCache) SetString(arg0, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetString", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetString indicates an expected call of SetString.
func (mr *MockDataCacheMockRecorder) SetString(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetString", reflect.TypeOf((*MockDataCache)(nil).SetString), arg0, arg1)
}