-
Notifications
You must be signed in to change notification settings - Fork 453
/
cost_mock.go
236 lines (199 loc) · 8.18 KB
/
cost_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
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/m3db/m3/src/query/cost/go
// Copyright (c) 2019 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package cost is a generated GoMock package.
package cost
import (
"reflect"
cost0 "github.com/m3db/m3/src/x/cost"
"github.com/golang/mock/gomock"
)
// MockChainedEnforcer is a mock of ChainedEnforcer interface
type MockChainedEnforcer struct {
ctrl *gomock.Controller
recorder *MockChainedEnforcerMockRecorder
}
// MockChainedEnforcerMockRecorder is the mock recorder for MockChainedEnforcer
type MockChainedEnforcerMockRecorder struct {
mock *MockChainedEnforcer
}
// NewMockChainedEnforcer creates a new mock instance
func NewMockChainedEnforcer(ctrl *gomock.Controller) *MockChainedEnforcer {
mock := &MockChainedEnforcer{ctrl: ctrl}
mock.recorder = &MockChainedEnforcerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockChainedEnforcer) EXPECT() *MockChainedEnforcerMockRecorder {
return m.recorder
}
// Add mocks base method
func (m *MockChainedEnforcer) Add(op cost0.Cost) cost0.Report {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Add", op)
ret0, _ := ret[0].(cost0.Report)
return ret0
}
// Add indicates an expected call of Add
func (mr *MockChainedEnforcerMockRecorder) Add(op interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockChainedEnforcer)(nil).Add), op)
}
// State mocks base method
func (m *MockChainedEnforcer) State() (cost0.Report, cost0.Limit) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "State")
ret0, _ := ret[0].(cost0.Report)
ret1, _ := ret[1].(cost0.Limit)
return ret0, ret1
}
// State indicates an expected call of State
func (mr *MockChainedEnforcerMockRecorder) State() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockChainedEnforcer)(nil).State))
}
// Limit mocks base method
func (m *MockChainedEnforcer) Limit() cost0.Limit {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Limit")
ret0, _ := ret[0].(cost0.Limit)
return ret0
}
// Limit indicates an expected call of Limit
func (mr *MockChainedEnforcerMockRecorder) Limit() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Limit", reflect.TypeOf((*MockChainedEnforcer)(nil).Limit))
}
// Clone mocks base method
func (m *MockChainedEnforcer) Clone() cost0.Enforcer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Clone")
ret0, _ := ret[0].(cost0.Enforcer)
return ret0
}
// Clone indicates an expected call of Clone
func (mr *MockChainedEnforcerMockRecorder) Clone() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockChainedEnforcer)(nil).Clone))
}
// Reporter mocks base method
func (m *MockChainedEnforcer) Reporter() cost0.EnforcerReporter {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Reporter")
ret0, _ := ret[0].(cost0.EnforcerReporter)
return ret0
}
// Reporter indicates an expected call of Reporter
func (mr *MockChainedEnforcerMockRecorder) Reporter() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reporter", reflect.TypeOf((*MockChainedEnforcer)(nil).Reporter))
}
// Child mocks base method
func (m *MockChainedEnforcer) Child(resourceName string) ChainedEnforcer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Child", resourceName)
ret0, _ := ret[0].(ChainedEnforcer)
return ret0
}
// Child indicates an expected call of Child
func (mr *MockChainedEnforcerMockRecorder) Child(resourceName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Child", reflect.TypeOf((*MockChainedEnforcer)(nil).Child), resourceName)
}
// Close mocks base method
func (m *MockChainedEnforcer) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockChainedEnforcerMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockChainedEnforcer)(nil).Close))
}
// MockChainedReporter is a mock of ChainedReporter interface
type MockChainedReporter struct {
ctrl *gomock.Controller
recorder *MockChainedReporterMockRecorder
}
// MockChainedReporterMockRecorder is the mock recorder for MockChainedReporter
type MockChainedReporterMockRecorder struct {
mock *MockChainedReporter
}
// NewMockChainedReporter creates a new mock instance
func NewMockChainedReporter(ctrl *gomock.Controller) *MockChainedReporter {
mock := &MockChainedReporter{ctrl: ctrl}
mock.recorder = &MockChainedReporterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockChainedReporter) EXPECT() *MockChainedReporterMockRecorder {
return m.recorder
}
// ReportCost mocks base method
func (m *MockChainedReporter) ReportCost(c cost0.Cost) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReportCost", c)
}
// ReportCost indicates an expected call of ReportCost
func (mr *MockChainedReporterMockRecorder) ReportCost(c interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportCost", reflect.TypeOf((*MockChainedReporter)(nil).ReportCost), c)
}
// ReportCurrent mocks base method
func (m *MockChainedReporter) ReportCurrent(c cost0.Cost) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReportCurrent", c)
}
// ReportCurrent indicates an expected call of ReportCurrent
func (mr *MockChainedReporterMockRecorder) ReportCurrent(c interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportCurrent", reflect.TypeOf((*MockChainedReporter)(nil).ReportCurrent), c)
}
// ReportOverLimit mocks base method
func (m *MockChainedReporter) ReportOverLimit(enabled bool) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReportOverLimit", enabled)
}
// ReportOverLimit indicates an expected call of ReportOverLimit
func (mr *MockChainedReporterMockRecorder) ReportOverLimit(enabled interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportOverLimit", reflect.TypeOf((*MockChainedReporter)(nil).ReportOverLimit), enabled)
}
// OnChildClose mocks base method
func (m *MockChainedReporter) OnChildClose(currentCost cost0.Cost) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnChildClose", currentCost)
}
// OnChildClose indicates an expected call of OnChildClose
func (mr *MockChainedReporterMockRecorder) OnChildClose(currentCost interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnChildClose", reflect.TypeOf((*MockChainedReporter)(nil).OnChildClose), currentCost)
}
// OnClose mocks base method
func (m *MockChainedReporter) OnClose(currentCost cost0.Cost) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnClose", currentCost)
}
// OnClose indicates an expected call of OnClose
func (mr *MockChainedReporterMockRecorder) OnClose(currentCost interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnClose", reflect.TypeOf((*MockChainedReporter)(nil).OnClose), currentCost)
}