-
Notifications
You must be signed in to change notification settings - Fork 2
/
role_grants_grpc.pb.go
261 lines (241 loc) · 9.05 KB
/
role_grants_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
// Copyright 2020 StrongDM Inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package v1
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.
const _ = grpc.SupportPackageIsVersion7
// RoleGrantsClient is the client API for RoleGrants 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.
//
// Deprecated: Do not use.
type RoleGrantsClient interface {
// Deprecated: Do not use.
// Create registers a new RoleGrant.
//
// Deprecated: use Role access rules instead.
Create(ctx context.Context, in *RoleGrantCreateRequest, opts ...grpc.CallOption) (*RoleGrantCreateResponse, error)
// Deprecated: Do not use.
// Get reads one RoleGrant by ID.
//
// Deprecated: use Role access rules instead.
Get(ctx context.Context, in *RoleGrantGetRequest, opts ...grpc.CallOption) (*RoleGrantGetResponse, error)
// Deprecated: Do not use.
// Delete removes a RoleGrant by ID.
//
// Deprecated: use Role access rules instead.
Delete(ctx context.Context, in *RoleGrantDeleteRequest, opts ...grpc.CallOption) (*RoleGrantDeleteResponse, error)
// Deprecated: Do not use.
// List gets a list of RoleGrants matching a given set of criteria.
//
// Deprecated: use Role access rules instead.
List(ctx context.Context, in *RoleGrantListRequest, opts ...grpc.CallOption) (*RoleGrantListResponse, error)
}
type roleGrantsClient struct {
cc grpc.ClientConnInterface
}
// Deprecated: Do not use.
func NewRoleGrantsClient(cc grpc.ClientConnInterface) RoleGrantsClient {
return &roleGrantsClient{cc}
}
// Deprecated: Do not use.
func (c *roleGrantsClient) Create(ctx context.Context, in *RoleGrantCreateRequest, opts ...grpc.CallOption) (*RoleGrantCreateResponse, error) {
out := new(RoleGrantCreateResponse)
err := c.cc.Invoke(ctx, "/v1.RoleGrants/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Deprecated: Do not use.
func (c *roleGrantsClient) Get(ctx context.Context, in *RoleGrantGetRequest, opts ...grpc.CallOption) (*RoleGrantGetResponse, error) {
out := new(RoleGrantGetResponse)
err := c.cc.Invoke(ctx, "/v1.RoleGrants/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Deprecated: Do not use.
func (c *roleGrantsClient) Delete(ctx context.Context, in *RoleGrantDeleteRequest, opts ...grpc.CallOption) (*RoleGrantDeleteResponse, error) {
out := new(RoleGrantDeleteResponse)
err := c.cc.Invoke(ctx, "/v1.RoleGrants/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Deprecated: Do not use.
func (c *roleGrantsClient) List(ctx context.Context, in *RoleGrantListRequest, opts ...grpc.CallOption) (*RoleGrantListResponse, error) {
out := new(RoleGrantListResponse)
err := c.cc.Invoke(ctx, "/v1.RoleGrants/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RoleGrantsServer is the server API for RoleGrants service.
// All implementations must embed UnimplementedRoleGrantsServer
// for forward compatibility
//
// Deprecated: Do not use.
type RoleGrantsServer interface {
// Deprecated: Do not use.
// Create registers a new RoleGrant.
//
// Deprecated: use Role access rules instead.
Create(context.Context, *RoleGrantCreateRequest) (*RoleGrantCreateResponse, error)
// Deprecated: Do not use.
// Get reads one RoleGrant by ID.
//
// Deprecated: use Role access rules instead.
Get(context.Context, *RoleGrantGetRequest) (*RoleGrantGetResponse, error)
// Deprecated: Do not use.
// Delete removes a RoleGrant by ID.
//
// Deprecated: use Role access rules instead.
Delete(context.Context, *RoleGrantDeleteRequest) (*RoleGrantDeleteResponse, error)
// Deprecated: Do not use.
// List gets a list of RoleGrants matching a given set of criteria.
//
// Deprecated: use Role access rules instead.
List(context.Context, *RoleGrantListRequest) (*RoleGrantListResponse, error)
mustEmbedUnimplementedRoleGrantsServer()
}
// UnimplementedRoleGrantsServer must be embedded to have forward compatible implementations.
type UnimplementedRoleGrantsServer struct {
}
func (UnimplementedRoleGrantsServer) Create(context.Context, *RoleGrantCreateRequest) (*RoleGrantCreateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedRoleGrantsServer) Get(context.Context, *RoleGrantGetRequest) (*RoleGrantGetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedRoleGrantsServer) Delete(context.Context, *RoleGrantDeleteRequest) (*RoleGrantDeleteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedRoleGrantsServer) List(context.Context, *RoleGrantListRequest) (*RoleGrantListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedRoleGrantsServer) mustEmbedUnimplementedRoleGrantsServer() {}
// UnsafeRoleGrantsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RoleGrantsServer will
// result in compilation errors.
type UnsafeRoleGrantsServer interface {
mustEmbedUnimplementedRoleGrantsServer()
}
// Deprecated: Do not use.
func RegisterRoleGrantsServer(s grpc.ServiceRegistrar, srv RoleGrantsServer) {
s.RegisterService(&_RoleGrants_serviceDesc, srv)
}
func _RoleGrants_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RoleGrantCreateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleGrantsServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.RoleGrants/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleGrantsServer).Create(ctx, req.(*RoleGrantCreateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleGrants_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RoleGrantGetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleGrantsServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.RoleGrants/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleGrantsServer).Get(ctx, req.(*RoleGrantGetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleGrants_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RoleGrantDeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleGrantsServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.RoleGrants/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleGrantsServer).Delete(ctx, req.(*RoleGrantDeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleGrants_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RoleGrantListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleGrantsServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1.RoleGrants/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleGrantsServer).List(ctx, req.(*RoleGrantListRequest))
}
return interceptor(ctx, in, info, handler)
}
var _RoleGrants_serviceDesc = grpc.ServiceDesc{
ServiceName: "v1.RoleGrants",
HandlerType: (*RoleGrantsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _RoleGrants_Create_Handler,
},
{
MethodName: "Get",
Handler: _RoleGrants_Get_Handler,
},
{
MethodName: "Delete",
Handler: _RoleGrants_Delete_Handler,
},
{
MethodName: "List",
Handler: _RoleGrants_List_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "role_grants.proto",
}