-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcache_mock.go
165 lines (140 loc) · 5.48 KB
/
cache_mock.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
// Code generated by MockGen. DO NOT EDIT.
// Source: repository.go
// Package cache is a generated GoMock package.
package cache
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
kind "github.com/thiagozs/go-cache/kind"
)
// MockCacheRepo is a mock of CacheRepo interface.
type MockCacheRepo struct {
ctrl *gomock.Controller
recorder *MockCacheRepoMockRecorder
}
// MockCacheRepoMockRecorder is the mock recorder for MockCacheRepo.
type MockCacheRepoMockRecorder struct {
mock *MockCacheRepo
}
// NewMockCacheRepo creates a new mock instance.
func NewMockCacheRepo(ctrl *gomock.Controller) *MockCacheRepo {
mock := &MockCacheRepo{ctrl: ctrl}
mock.recorder = &MockCacheRepoMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCacheRepo) EXPECT() *MockCacheRepoMockRecorder {
return m.recorder
}
// Decr mocks base method.
func (m *MockCacheRepo) Decr(key string) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Decr", key)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Decr indicates an expected call of Decr.
func (mr *MockCacheRepoMockRecorder) Decr(key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decr", reflect.TypeOf((*MockCacheRepo)(nil).Decr), key)
}
// DeleteKey mocks base method.
func (m *MockCacheRepo) DeleteKey(key string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteKey", key)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteKey indicates an expected call of DeleteKey.
func (mr *MockCacheRepoMockRecorder) DeleteKey(key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteKey", reflect.TypeOf((*MockCacheRepo)(nil).DeleteKey), key)
}
// GetDriver mocks base method.
func (m *MockCacheRepo) GetDriver() kind.Driver {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetDriver")
ret0, _ := ret[0].(kind.Driver)
return ret0
}
// GetDriver indicates an expected call of GetDriver.
func (mr *MockCacheRepoMockRecorder) GetDriver() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDriver", reflect.TypeOf((*MockCacheRepo)(nil).GetDriver))
}
// GetVal mocks base method.
func (m *MockCacheRepo) GetVal(key string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetVal", key)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetVal indicates an expected call of GetVal.
func (mr *MockCacheRepoMockRecorder) GetVal(key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVal", reflect.TypeOf((*MockCacheRepo)(nil).GetVal), key)
}
// Incr mocks base method.
func (m *MockCacheRepo) Incr(key string) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Incr", key)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Incr indicates an expected call of Incr.
func (mr *MockCacheRepoMockRecorder) Incr(key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Incr", reflect.TypeOf((*MockCacheRepo)(nil).Incr), key)
}
// WriteKeyVal mocks base method.
func (m *MockCacheRepo) WriteKeyVal(key, val string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteKeyVal", key, val)
ret0, _ := ret[0].(error)
return ret0
}
// WriteKeyVal indicates an expected call of WriteKeyVal.
func (mr *MockCacheRepoMockRecorder) WriteKeyVal(key, val interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteKeyVal", reflect.TypeOf((*MockCacheRepo)(nil).WriteKeyVal), key, val)
}
// WriteKeyValAsJSON mocks base method.
func (m *MockCacheRepo) WriteKeyValAsJSON(key string, val interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteKeyValAsJSON", key, val)
ret0, _ := ret[0].(error)
return ret0
}
// WriteKeyValAsJSON indicates an expected call of WriteKeyValAsJSON.
func (mr *MockCacheRepoMockRecorder) WriteKeyValAsJSON(key, val interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteKeyValAsJSON", reflect.TypeOf((*MockCacheRepo)(nil).WriteKeyValAsJSON), key, val)
}
// WriteKeyValAsJSONTTL mocks base method.
func (m *MockCacheRepo) WriteKeyValAsJSONTTL(key string, val interface{}, ttlSeconds int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteKeyValAsJSONTTL", key, val, ttlSeconds)
ret0, _ := ret[0].(error)
return ret0
}
// WriteKeyValAsJSONTTL indicates an expected call of WriteKeyValAsJSONTTL.
func (mr *MockCacheRepoMockRecorder) WriteKeyValAsJSONTTL(key, val, ttlSeconds interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteKeyValAsJSONTTL", reflect.TypeOf((*MockCacheRepo)(nil).WriteKeyValAsJSONTTL), key, val, ttlSeconds)
}
// WriteKeyValTTL mocks base method.
func (m *MockCacheRepo) WriteKeyValTTL(key, val string, ttlSeconds int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteKeyValTTL", key, val, ttlSeconds)
ret0, _ := ret[0].(error)
return ret0
}
// WriteKeyValTTL indicates an expected call of WriteKeyValTTL.
func (mr *MockCacheRepoMockRecorder) WriteKeyValTTL(key, val, ttlSeconds interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteKeyValTTL", reflect.TypeOf((*MockCacheRepo)(nil).WriteKeyValTTL), key, val, ttlSeconds)
}