forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmock.go
183 lines (155 loc) · 6.76 KB
/
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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/grafana/grafana/pkg/services/rendering (interfaces: Service)
package rendering
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
models "github.com/grafana/grafana/pkg/models"
)
// MockService is a mock of Service interface.
type MockService struct {
ctrl *gomock.Controller
recorder *MockServiceMockRecorder
}
// MockServiceMockRecorder is the mock recorder for MockService.
type MockServiceMockRecorder struct {
mock *MockService
}
// NewMockService creates a new mock instance.
func NewMockService(ctrl *gomock.Controller) *MockService {
mock := &MockService{ctrl: ctrl}
mock.recorder = &MockServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockService) EXPECT() *MockServiceMockRecorder {
return m.recorder
}
// CreateRenderingSession mocks base method.
func (m *MockService) CreateRenderingSession(ctx context.Context, authOpts AuthOpts, sessionOpts SessionOpts) (Session, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateRenderingSession", ctx, authOpts, sessionOpts)
ret0, _ := ret[0].(Session)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateRenderingSession indicates an expected call of CreateRenderingSession.
func (mr *MockServiceMockRecorder) CreateRenderingSession(ctx, authOpts, sessionOpts interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRenderingSession", reflect.TypeOf((*MockService)(nil).CreateRenderingSession), ctx, authOpts, sessionOpts)
}
// GetRenderUser mocks base method.
func (m *MockService) GetRenderUser(ctx context.Context, key string) (*RenderUser, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRenderUser", ctx, key)
ret0, _ := ret[0].(*RenderUser)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// GetRenderUser indicates an expected call of GetRenderUser.
func (mr *MockServiceMockRecorder) GetRenderUser(ctx, key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRenderUser", reflect.TypeOf((*MockService)(nil).GetRenderUser), ctx, key)
}
// HasCapability mocks base method.
func (m *MockService) HasCapability(ctx context.Context, capability CapabilityName) (CapabilitySupportRequestResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasCapability", ctx, capability)
ret0, _ := ret[0].(CapabilitySupportRequestResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HasCapability indicates an expected call of HasCapability.
func (mr *MockServiceMockRecorder) HasCapability(ctx, capability interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasCapability", reflect.TypeOf((*MockService)(nil).HasCapability), ctx, capability)
}
// IsCapabilitySupported mocks base method.
func (m *MockService) IsCapabilitySupported(ctx context.Context, capability CapabilityName) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsCapabilitySupported", ctx, capability)
ret0, _ := ret[0].(error)
return ret0
}
// IsCapabilitySupported indicates an expected call of IsCapabilitySupported.
func (mr *MockServiceMockRecorder) IsCapabilitySupported(ctx, capability interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsCapabilitySupported", reflect.TypeOf((*MockService)(nil).IsCapabilitySupported), ctx, capability)
}
// IsAvailable mocks base method.
func (m *MockService) IsAvailable(ctx context.Context) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsAvailable", ctx)
ret0, _ := ret[0].(bool)
return ret0
}
// IsAvailable indicates an expected call of IsAvailable.
func (mr *MockServiceMockRecorder) IsAvailable(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAvailable", reflect.TypeOf((*MockService)(nil).IsAvailable), ctx)
}
// Render mocks base method.
func (m *MockService) Render(ctx context.Context, renderType RenderType, opts Opts, session Session) (*RenderResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Render", ctx, renderType, opts, session)
ret0, _ := ret[0].(*RenderResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Render indicates an expected call of Render.
func (mr *MockServiceMockRecorder) Render(ctx, renderType, opts, session interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Render", reflect.TypeOf((*MockService)(nil).Render), ctx, renderType, opts, session)
}
// RenderCSV mocks base method.
func (m *MockService) RenderCSV(ctx context.Context, opts CSVOpts, session Session) (*RenderCSVResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RenderCSV", ctx, opts, session)
ret0, _ := ret[0].(*RenderCSVResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RenderCSV indicates an expected call of RenderCSV.
func (mr *MockServiceMockRecorder) RenderCSV(ctx, opts, session interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenderCSV", reflect.TypeOf((*MockService)(nil).RenderCSV), ctx, opts, session)
}
// RenderErrorImage mocks base method.
func (m *MockService) RenderErrorImage(theme models.Theme, err error) (*RenderResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RenderErrorImage", theme, err)
ret0, _ := ret[0].(*RenderResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RenderErrorImage indicates an expected call of RenderErrorImage.
func (mr *MockServiceMockRecorder) RenderErrorImage(theme, error interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenderErrorImage", reflect.TypeOf((*MockService)(nil).RenderErrorImage), theme, error)
}
// SanitizeSVG mocks base method.
func (m *MockService) SanitizeSVG(ctx context.Context, req *SanitizeSVGRequest) (*SanitizeSVGResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SanitizeSVG", ctx, req)
ret0, _ := ret[0].(*SanitizeSVGResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SanitizeSVG indicates an expected call of SanitizeSVG.
func (mr *MockServiceMockRecorder) SanitizeSVG(ctx, req interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SanitizeSVG", reflect.TypeOf((*MockService)(nil).SanitizeSVG), ctx, req)
}
// Version mocks base method.
func (m *MockService) Version() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Version")
ret0, _ := ret[0].(string)
return ret0
}
// Version indicates an expected call of Version.
func (mr *MockServiceMockRecorder) Version() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockService)(nil).Version))
}