-
Notifications
You must be signed in to change notification settings - Fork 0
/
editorial_service_grpc.pb.go
339 lines (312 loc) · 14.2 KB
/
editorial_service_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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.21.12
// source: eolymp/atlas/editorial_service.proto
package atlas
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 (
EditorialService_CreateEditorial_FullMethodName = "/eolymp.atlas.EditorialService/CreateEditorial"
EditorialService_UpdateEditorial_FullMethodName = "/eolymp.atlas.EditorialService/UpdateEditorial"
EditorialService_DeleteEditorial_FullMethodName = "/eolymp.atlas.EditorialService/DeleteEditorial"
EditorialService_DescribeEditorial_FullMethodName = "/eolymp.atlas.EditorialService/DescribeEditorial"
EditorialService_LookupEditorial_FullMethodName = "/eolymp.atlas.EditorialService/LookupEditorial"
EditorialService_PreviewEditorial_FullMethodName = "/eolymp.atlas.EditorialService/PreviewEditorial"
EditorialService_ListEditorials_FullMethodName = "/eolymp.atlas.EditorialService/ListEditorials"
)
// EditorialServiceClient is the client API for EditorialService 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 EditorialServiceClient interface {
CreateEditorial(ctx context.Context, in *CreateEditorialInput, opts ...grpc.CallOption) (*CreateEditorialOutput, error)
UpdateEditorial(ctx context.Context, in *UpdateEditorialInput, opts ...grpc.CallOption) (*UpdateEditorialOutput, error)
DeleteEditorial(ctx context.Context, in *DeleteEditorialInput, opts ...grpc.CallOption) (*DeleteEditorialOutput, error)
// DescribeEditorial returns editorial.
DescribeEditorial(ctx context.Context, in *DescribeEditorialInput, opts ...grpc.CallOption) (*DescribeEditorialOutput, error)
// LookupEditorial finds an editorial for the requested locale.
LookupEditorial(ctx context.Context, in *LookupEditorialInput, opts ...grpc.CallOption) (*LookupEditorialOutput, error)
// PreviewEditorial renders unsaved editorial.
//
// This method can be used to render editorial before it has been saved.
PreviewEditorial(ctx context.Context, in *PreviewEditorialInput, opts ...grpc.CallOption) (*PreviewEditorialOutput, error)
ListEditorials(ctx context.Context, in *ListEditorialsInput, opts ...grpc.CallOption) (*ListEditorialsOutput, error)
}
type editorialServiceClient struct {
cc grpc.ClientConnInterface
}
func NewEditorialServiceClient(cc grpc.ClientConnInterface) EditorialServiceClient {
return &editorialServiceClient{cc}
}
func (c *editorialServiceClient) CreateEditorial(ctx context.Context, in *CreateEditorialInput, opts ...grpc.CallOption) (*CreateEditorialOutput, error) {
out := new(CreateEditorialOutput)
err := c.cc.Invoke(ctx, EditorialService_CreateEditorial_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *editorialServiceClient) UpdateEditorial(ctx context.Context, in *UpdateEditorialInput, opts ...grpc.CallOption) (*UpdateEditorialOutput, error) {
out := new(UpdateEditorialOutput)
err := c.cc.Invoke(ctx, EditorialService_UpdateEditorial_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *editorialServiceClient) DeleteEditorial(ctx context.Context, in *DeleteEditorialInput, opts ...grpc.CallOption) (*DeleteEditorialOutput, error) {
out := new(DeleteEditorialOutput)
err := c.cc.Invoke(ctx, EditorialService_DeleteEditorial_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *editorialServiceClient) DescribeEditorial(ctx context.Context, in *DescribeEditorialInput, opts ...grpc.CallOption) (*DescribeEditorialOutput, error) {
out := new(DescribeEditorialOutput)
err := c.cc.Invoke(ctx, EditorialService_DescribeEditorial_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *editorialServiceClient) LookupEditorial(ctx context.Context, in *LookupEditorialInput, opts ...grpc.CallOption) (*LookupEditorialOutput, error) {
out := new(LookupEditorialOutput)
err := c.cc.Invoke(ctx, EditorialService_LookupEditorial_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *editorialServiceClient) PreviewEditorial(ctx context.Context, in *PreviewEditorialInput, opts ...grpc.CallOption) (*PreviewEditorialOutput, error) {
out := new(PreviewEditorialOutput)
err := c.cc.Invoke(ctx, EditorialService_PreviewEditorial_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *editorialServiceClient) ListEditorials(ctx context.Context, in *ListEditorialsInput, opts ...grpc.CallOption) (*ListEditorialsOutput, error) {
out := new(ListEditorialsOutput)
err := c.cc.Invoke(ctx, EditorialService_ListEditorials_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EditorialServiceServer is the server API for EditorialService service.
// All implementations should embed UnimplementedEditorialServiceServer
// for forward compatibility
type EditorialServiceServer interface {
CreateEditorial(context.Context, *CreateEditorialInput) (*CreateEditorialOutput, error)
UpdateEditorial(context.Context, *UpdateEditorialInput) (*UpdateEditorialOutput, error)
DeleteEditorial(context.Context, *DeleteEditorialInput) (*DeleteEditorialOutput, error)
// DescribeEditorial returns editorial.
DescribeEditorial(context.Context, *DescribeEditorialInput) (*DescribeEditorialOutput, error)
// LookupEditorial finds an editorial for the requested locale.
LookupEditorial(context.Context, *LookupEditorialInput) (*LookupEditorialOutput, error)
// PreviewEditorial renders unsaved editorial.
//
// This method can be used to render editorial before it has been saved.
PreviewEditorial(context.Context, *PreviewEditorialInput) (*PreviewEditorialOutput, error)
ListEditorials(context.Context, *ListEditorialsInput) (*ListEditorialsOutput, error)
}
// UnimplementedEditorialServiceServer should be embedded to have forward compatible implementations.
type UnimplementedEditorialServiceServer struct {
}
func (UnimplementedEditorialServiceServer) CreateEditorial(context.Context, *CreateEditorialInput) (*CreateEditorialOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateEditorial not implemented")
}
func (UnimplementedEditorialServiceServer) UpdateEditorial(context.Context, *UpdateEditorialInput) (*UpdateEditorialOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateEditorial not implemented")
}
func (UnimplementedEditorialServiceServer) DeleteEditorial(context.Context, *DeleteEditorialInput) (*DeleteEditorialOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteEditorial not implemented")
}
func (UnimplementedEditorialServiceServer) DescribeEditorial(context.Context, *DescribeEditorialInput) (*DescribeEditorialOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method DescribeEditorial not implemented")
}
func (UnimplementedEditorialServiceServer) LookupEditorial(context.Context, *LookupEditorialInput) (*LookupEditorialOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method LookupEditorial not implemented")
}
func (UnimplementedEditorialServiceServer) PreviewEditorial(context.Context, *PreviewEditorialInput) (*PreviewEditorialOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method PreviewEditorial not implemented")
}
func (UnimplementedEditorialServiceServer) ListEditorials(context.Context, *ListEditorialsInput) (*ListEditorialsOutput, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEditorials not implemented")
}
// UnsafeEditorialServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EditorialServiceServer will
// result in compilation errors.
type UnsafeEditorialServiceServer interface {
mustEmbedUnimplementedEditorialServiceServer()
}
func RegisterEditorialServiceServer(s grpc.ServiceRegistrar, srv EditorialServiceServer) {
s.RegisterService(&EditorialService_ServiceDesc, srv)
}
func _EditorialService_CreateEditorial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateEditorialInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).CreateEditorial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_CreateEditorial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).CreateEditorial(ctx, req.(*CreateEditorialInput))
}
return interceptor(ctx, in, info, handler)
}
func _EditorialService_UpdateEditorial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateEditorialInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).UpdateEditorial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_UpdateEditorial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).UpdateEditorial(ctx, req.(*UpdateEditorialInput))
}
return interceptor(ctx, in, info, handler)
}
func _EditorialService_DeleteEditorial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteEditorialInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).DeleteEditorial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_DeleteEditorial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).DeleteEditorial(ctx, req.(*DeleteEditorialInput))
}
return interceptor(ctx, in, info, handler)
}
func _EditorialService_DescribeEditorial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DescribeEditorialInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).DescribeEditorial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_DescribeEditorial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).DescribeEditorial(ctx, req.(*DescribeEditorialInput))
}
return interceptor(ctx, in, info, handler)
}
func _EditorialService_LookupEditorial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LookupEditorialInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).LookupEditorial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_LookupEditorial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).LookupEditorial(ctx, req.(*LookupEditorialInput))
}
return interceptor(ctx, in, info, handler)
}
func _EditorialService_PreviewEditorial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PreviewEditorialInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).PreviewEditorial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_PreviewEditorial_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).PreviewEditorial(ctx, req.(*PreviewEditorialInput))
}
return interceptor(ctx, in, info, handler)
}
func _EditorialService_ListEditorials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListEditorialsInput)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EditorialServiceServer).ListEditorials(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EditorialService_ListEditorials_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EditorialServiceServer).ListEditorials(ctx, req.(*ListEditorialsInput))
}
return interceptor(ctx, in, info, handler)
}
// EditorialService_ServiceDesc is the grpc.ServiceDesc for EditorialService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var EditorialService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "eolymp.atlas.EditorialService",
HandlerType: (*EditorialServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateEditorial",
Handler: _EditorialService_CreateEditorial_Handler,
},
{
MethodName: "UpdateEditorial",
Handler: _EditorialService_UpdateEditorial_Handler,
},
{
MethodName: "DeleteEditorial",
Handler: _EditorialService_DeleteEditorial_Handler,
},
{
MethodName: "DescribeEditorial",
Handler: _EditorialService_DescribeEditorial_Handler,
},
{
MethodName: "LookupEditorial",
Handler: _EditorialService_LookupEditorial_Handler,
},
{
MethodName: "PreviewEditorial",
Handler: _EditorialService_PreviewEditorial_Handler,
},
{
MethodName: "ListEditorials",
Handler: _EditorialService_ListEditorials_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "eolymp/atlas/editorial_service.proto",
}