-
Notifications
You must be signed in to change notification settings - Fork 0
/
library_manager_grpc.pb.go
250 lines (228 loc) · 10.2 KB
/
library_manager_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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v4.23.4
// source: library_manager.proto
package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
// LibraryManagementClient is the client API for LibraryManagement 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 LibraryManagementClient interface {
ListLibraryManagers(ctx context.Context, in *ResourceKey, opts ...grpc.CallOption) (*LibraryManagersReply, error)
GetLibraryManager(ctx context.Context, in *ResourceKey, opts ...grpc.CallOption) (*LibraryManagerObject, error)
CreateLibraryManager(ctx context.Context, in *CreateLibraryManagerParams, opts ...grpc.CallOption) (*LibraryManagerObject, error)
UpdateLibraryManager(ctx context.Context, in *UpdateLibraryManagerParams, opts ...grpc.CallOption) (*LibraryManagerObject, error)
DeleteLibraryManager(ctx context.Context, in *ResourceKey, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type libraryManagementClient struct {
cc grpc.ClientConnInterface
}
func NewLibraryManagementClient(cc grpc.ClientConnInterface) LibraryManagementClient {
return &libraryManagementClient{cc}
}
func (c *libraryManagementClient) ListLibraryManagers(ctx context.Context, in *ResourceKey, opts ...grpc.CallOption) (*LibraryManagersReply, error) {
out := new(LibraryManagersReply)
err := c.cc.Invoke(ctx, "/v1.LibraryManagement/ListLibraryManagers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryManagementClient) GetLibraryManager(ctx context.Context, in *ResourceKey, opts ...grpc.CallOption) (*LibraryManagerObject, error) {
out := new(LibraryManagerObject)
err := c.cc.Invoke(ctx, "/v1.LibraryManagement/GetLibraryManager", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryManagementClient) CreateLibraryManager(ctx context.Context, in *CreateLibraryManagerParams, opts ...grpc.CallOption) (*LibraryManagerObject, error) {
out := new(LibraryManagerObject)
err := c.cc.Invoke(ctx, "/v1.LibraryManagement/CreateLibraryManager", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryManagementClient) UpdateLibraryManager(ctx context.Context, in *UpdateLibraryManagerParams, opts ...grpc.CallOption) (*LibraryManagerObject, error) {
out := new(LibraryManagerObject)
err := c.cc.Invoke(ctx, "/v1.LibraryManagement/UpdateLibraryManager", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryManagementClient) DeleteLibraryManager(ctx context.Context, in *ResourceKey, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/v1.LibraryManagement/DeleteLibraryManager", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LibraryManagementServer is the server API for LibraryManagement service.
// All implementations must embed UnimplementedLibraryManagementServer
// for forward compatibility
type LibraryManagementServer interface {
ListLibraryManagers(context.Context, *ResourceKey) (*LibraryManagersReply, error)
GetLibraryManager(context.Context, *ResourceKey) (*LibraryManagerObject, error)
CreateLibraryManager(context.Context, *CreateLibraryManagerParams) (*LibraryManagerObject, error)
UpdateLibraryManager(context.Context, *UpdateLibraryManagerParams) (*LibraryManagerObject, error)
DeleteLibraryManager(context.Context, *ResourceKey) (*emptypb.Empty, error)
mustEmbedUnimplementedLibraryManagementServer()
}
// UnimplementedLibraryManagementServer must be embedded to have forward compatible implementations.
type UnimplementedLibraryManagementServer struct {
}
func (UnimplementedLibraryManagementServer) ListLibraryManagers(context.Context, *ResourceKey) (*LibraryManagersReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListLibraryManagers not implemented")
}
func (UnimplementedLibraryManagementServer) GetLibraryManager(context.Context, *ResourceKey) (*LibraryManagerObject, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLibraryManager not implemented")
}
func (UnimplementedLibraryManagementServer) CreateLibraryManager(context.Context, *CreateLibraryManagerParams) (*LibraryManagerObject, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateLibraryManager not implemented")
}
func (UnimplementedLibraryManagementServer) UpdateLibraryManager(context.Context, *UpdateLibraryManagerParams) (*LibraryManagerObject, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateLibraryManager not implemented")
}
func (UnimplementedLibraryManagementServer) DeleteLibraryManager(context.Context, *ResourceKey) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteLibraryManager not implemented")
}
func (UnimplementedLibraryManagementServer) mustEmbedUnimplementedLibraryManagementServer() {}
// UnsafeLibraryManagementServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LibraryManagementServer will
// result in compilation errors.
type UnsafeLibraryManagementServer interface {
mustEmbedUnimplementedLibraryManagementServer()
}
func RegisterLibraryManagementServer(s grpc.ServiceRegistrar, srv LibraryManagementServer) {
s.RegisterService(&LibraryManagement_ServiceDesc, srv)
}
func _LibraryManagement_ListLibraryManagers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResourceKey)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryManagementServer).ListLibraryManagers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.LibraryManagement/ListLibraryManagers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryManagementServer).ListLibraryManagers(ctx, req.(*ResourceKey))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryManagement_GetLibraryManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResourceKey)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryManagementServer).GetLibraryManager(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.LibraryManagement/GetLibraryManager",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryManagementServer).GetLibraryManager(ctx, req.(*ResourceKey))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryManagement_CreateLibraryManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateLibraryManagerParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryManagementServer).CreateLibraryManager(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.LibraryManagement/CreateLibraryManager",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryManagementServer).CreateLibraryManager(ctx, req.(*CreateLibraryManagerParams))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryManagement_UpdateLibraryManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateLibraryManagerParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryManagementServer).UpdateLibraryManager(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.LibraryManagement/UpdateLibraryManager",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryManagementServer).UpdateLibraryManager(ctx, req.(*UpdateLibraryManagerParams))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryManagement_DeleteLibraryManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResourceKey)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryManagementServer).DeleteLibraryManager(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.LibraryManagement/DeleteLibraryManager",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryManagementServer).DeleteLibraryManager(ctx, req.(*ResourceKey))
}
return interceptor(ctx, in, info, handler)
}
// LibraryManagement_ServiceDesc is the grpc.ServiceDesc for LibraryManagement service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LibraryManagement_ServiceDesc = grpc.ServiceDesc{
ServiceName: "v1.LibraryManagement",
HandlerType: (*LibraryManagementServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListLibraryManagers",
Handler: _LibraryManagement_ListLibraryManagers_Handler,
},
{
MethodName: "GetLibraryManager",
Handler: _LibraryManagement_GetLibraryManager_Handler,
},
{
MethodName: "CreateLibraryManager",
Handler: _LibraryManagement_CreateLibraryManager_Handler,
},
{
MethodName: "UpdateLibraryManager",
Handler: _LibraryManagement_UpdateLibraryManager_Handler,
},
{
MethodName: "DeleteLibraryManager",
Handler: _LibraryManagement_DeleteLibraryManager_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "library_manager.proto",
}