-
Notifications
You must be signed in to change notification settings - Fork 3
/
service_metric_chart_grpc.pb.go
304 lines (279 loc) · 13 KB
/
service_metric_chart_grpc.pb.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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.19.4
// source: service_metric_chart.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
MetricChartService_CreateMetricChart_FullMethodName = "/pb.MetricChartService/createMetricChart"
MetricChartService_UpdateMetricChart_FullMethodName = "/pb.MetricChartService/updateMetricChart"
MetricChartService_FindEnabledMetricChart_FullMethodName = "/pb.MetricChartService/findEnabledMetricChart"
MetricChartService_CountEnabledMetricCharts_FullMethodName = "/pb.MetricChartService/countEnabledMetricCharts"
MetricChartService_ListEnabledMetricCharts_FullMethodName = "/pb.MetricChartService/listEnabledMetricCharts"
MetricChartService_DeleteMetricChart_FullMethodName = "/pb.MetricChartService/deleteMetricChart"
)
// MetricChartServiceClient is the client API for MetricChartService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MetricChartServiceClient interface {
// 创建图表
CreateMetricChart(ctx context.Context, in *CreateMetricChartRequest, opts ...grpc.CallOption) (*CreateMetricChartResponse, error)
// 修改图表
UpdateMetricChart(ctx context.Context, in *UpdateMetricChartRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找单个图表
FindEnabledMetricChart(ctx context.Context, in *FindEnabledMetricChartRequest, opts ...grpc.CallOption) (*FindEnabledMetricChartResponse, error)
// 计算图表数量
CountEnabledMetricCharts(ctx context.Context, in *CountEnabledMetricChartsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页图表
ListEnabledMetricCharts(ctx context.Context, in *ListEnabledMetricChartsRequest, opts ...grpc.CallOption) (*ListEnabledMetricChartsResponse, error)
// 删除图表
DeleteMetricChart(ctx context.Context, in *DeleteMetricChartRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type metricChartServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMetricChartServiceClient(cc grpc.ClientConnInterface) MetricChartServiceClient {
return &metricChartServiceClient{cc}
}
func (c *metricChartServiceClient) CreateMetricChart(ctx context.Context, in *CreateMetricChartRequest, opts ...grpc.CallOption) (*CreateMetricChartResponse, error) {
out := new(CreateMetricChartResponse)
err := c.cc.Invoke(ctx, MetricChartService_CreateMetricChart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *metricChartServiceClient) UpdateMetricChart(ctx context.Context, in *UpdateMetricChartRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, MetricChartService_UpdateMetricChart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *metricChartServiceClient) FindEnabledMetricChart(ctx context.Context, in *FindEnabledMetricChartRequest, opts ...grpc.CallOption) (*FindEnabledMetricChartResponse, error) {
out := new(FindEnabledMetricChartResponse)
err := c.cc.Invoke(ctx, MetricChartService_FindEnabledMetricChart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *metricChartServiceClient) CountEnabledMetricCharts(ctx context.Context, in *CountEnabledMetricChartsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, MetricChartService_CountEnabledMetricCharts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *metricChartServiceClient) ListEnabledMetricCharts(ctx context.Context, in *ListEnabledMetricChartsRequest, opts ...grpc.CallOption) (*ListEnabledMetricChartsResponse, error) {
out := new(ListEnabledMetricChartsResponse)
err := c.cc.Invoke(ctx, MetricChartService_ListEnabledMetricCharts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *metricChartServiceClient) DeleteMetricChart(ctx context.Context, in *DeleteMetricChartRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, MetricChartService_DeleteMetricChart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MetricChartServiceServer is the server API for MetricChartService service.
// All implementations should embed UnimplementedMetricChartServiceServer
// for forward compatibility
type MetricChartServiceServer interface {
// 创建图表
CreateMetricChart(context.Context, *CreateMetricChartRequest) (*CreateMetricChartResponse, error)
// 修改图表
UpdateMetricChart(context.Context, *UpdateMetricChartRequest) (*RPCSuccess, error)
// 查找单个图表
FindEnabledMetricChart(context.Context, *FindEnabledMetricChartRequest) (*FindEnabledMetricChartResponse, error)
// 计算图表数量
CountEnabledMetricCharts(context.Context, *CountEnabledMetricChartsRequest) (*RPCCountResponse, error)
// 列出单页图表
ListEnabledMetricCharts(context.Context, *ListEnabledMetricChartsRequest) (*ListEnabledMetricChartsResponse, error)
// 删除图表
DeleteMetricChart(context.Context, *DeleteMetricChartRequest) (*RPCSuccess, error)
}
// UnimplementedMetricChartServiceServer should be embedded to have forward compatible implementations.
type UnimplementedMetricChartServiceServer struct {
}
func (UnimplementedMetricChartServiceServer) CreateMetricChart(context.Context, *CreateMetricChartRequest) (*CreateMetricChartResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateMetricChart not implemented")
}
func (UnimplementedMetricChartServiceServer) UpdateMetricChart(context.Context, *UpdateMetricChartRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateMetricChart not implemented")
}
func (UnimplementedMetricChartServiceServer) FindEnabledMetricChart(context.Context, *FindEnabledMetricChartRequest) (*FindEnabledMetricChartResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledMetricChart not implemented")
}
func (UnimplementedMetricChartServiceServer) CountEnabledMetricCharts(context.Context, *CountEnabledMetricChartsRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountEnabledMetricCharts not implemented")
}
func (UnimplementedMetricChartServiceServer) ListEnabledMetricCharts(context.Context, *ListEnabledMetricChartsRequest) (*ListEnabledMetricChartsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledMetricCharts not implemented")
}
func (UnimplementedMetricChartServiceServer) DeleteMetricChart(context.Context, *DeleteMetricChartRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteMetricChart not implemented")
}
// UnsafeMetricChartServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MetricChartServiceServer will
// result in compilation errors.
type UnsafeMetricChartServiceServer interface {
mustEmbedUnimplementedMetricChartServiceServer()
}
func RegisterMetricChartServiceServer(s grpc.ServiceRegistrar, srv MetricChartServiceServer) {
s.RegisterService(&MetricChartService_ServiceDesc, srv)
}
func _MetricChartService_CreateMetricChart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateMetricChartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricChartServiceServer).CreateMetricChart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricChartService_CreateMetricChart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricChartServiceServer).CreateMetricChart(ctx, req.(*CreateMetricChartRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MetricChartService_UpdateMetricChart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateMetricChartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricChartServiceServer).UpdateMetricChart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricChartService_UpdateMetricChart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricChartServiceServer).UpdateMetricChart(ctx, req.(*UpdateMetricChartRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MetricChartService_FindEnabledMetricChart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindEnabledMetricChartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricChartServiceServer).FindEnabledMetricChart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricChartService_FindEnabledMetricChart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricChartServiceServer).FindEnabledMetricChart(ctx, req.(*FindEnabledMetricChartRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MetricChartService_CountEnabledMetricCharts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountEnabledMetricChartsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricChartServiceServer).CountEnabledMetricCharts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricChartService_CountEnabledMetricCharts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricChartServiceServer).CountEnabledMetricCharts(ctx, req.(*CountEnabledMetricChartsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MetricChartService_ListEnabledMetricCharts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListEnabledMetricChartsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricChartServiceServer).ListEnabledMetricCharts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricChartService_ListEnabledMetricCharts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricChartServiceServer).ListEnabledMetricCharts(ctx, req.(*ListEnabledMetricChartsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MetricChartService_DeleteMetricChart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteMetricChartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricChartServiceServer).DeleteMetricChart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricChartService_DeleteMetricChart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricChartServiceServer).DeleteMetricChart(ctx, req.(*DeleteMetricChartRequest))
}
return interceptor(ctx, in, info, handler)
}
// MetricChartService_ServiceDesc is the grpc.ServiceDesc for MetricChartService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MetricChartService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.MetricChartService",
HandlerType: (*MetricChartServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createMetricChart",
Handler: _MetricChartService_CreateMetricChart_Handler,
},
{
MethodName: "updateMetricChart",
Handler: _MetricChartService_UpdateMetricChart_Handler,
},
{
MethodName: "findEnabledMetricChart",
Handler: _MetricChartService_FindEnabledMetricChart_Handler,
},
{
MethodName: "countEnabledMetricCharts",
Handler: _MetricChartService_CountEnabledMetricCharts_Handler,
},
{
MethodName: "listEnabledMetricCharts",
Handler: _MetricChartService_ListEnabledMetricCharts_Handler,
},
{
MethodName: "deleteMetricChart",
Handler: _MetricChartService_DeleteMetricChart_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_metric_chart.proto",
}