| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// - protoc-gen-go-grpc v1.3.0 |
| 18 |
// - protoc v4.25.7 |
| 19 |
// source: google/cloud/functions/v2beta/functions.proto |
| 20 |
|
| 21 |
package functionspb |
| 22 |
|
| 23 |
import ( |
| 24 |
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" |
| 25 |
context "context" |
| 26 |
grpc "google.golang.org/grpc" |
| 27 |
codes "google.golang.org/grpc/codes" |
| 28 |
status "google.golang.org/grpc/status" |
| 29 |
) |
| 30 |
|
| 31 |
// This is a compile-time assertion to ensure that this generated file |
| 32 |
// is compatible with the grpc package it is being compiled against. |
| 33 |
// Requires gRPC-Go v1.32.0 or later. |
| 34 |
const _ = grpc.SupportPackageIsVersion7 |
| 35 |
|
| 36 |
const ( |
| 37 |
FunctionService_GetFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/GetFunction" |
| 38 |
FunctionService_ListFunctions_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/ListFunctions" |
| 39 |
FunctionService_CreateFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/CreateFunction" |
| 40 |
FunctionService_UpdateFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/UpdateFunction" |
| 41 |
FunctionService_DeleteFunction_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/DeleteFunction" |
| 42 |
FunctionService_GenerateUploadUrl_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/GenerateUploadUrl" |
| 43 |
FunctionService_GenerateDownloadUrl_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/GenerateDownloadUrl" |
| 44 |
FunctionService_ListRuntimes_FullMethodName = "/google.cloud.functions.v2beta.FunctionService/ListRuntimes" |
| 45 |
) |
| 46 |
|
| 47 |
// FunctionServiceClient is the client API for FunctionService service. |
| 48 |
// |
| 49 |
// 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. |
| 50 |
type FunctionServiceClient interface { |
| 51 |
// Returns a function with the given name from the requested project. |
| 52 |
GetFunction(ctx context.Context, in *GetFunctionRequest, opts ...grpc.CallOption) (*Function, error) |
| 53 |
// Returns a list of functions that belong to the requested project. |
| 54 |
ListFunctions(ctx context.Context, in *ListFunctionsRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error) |
| 55 |
// Creates a new function. If a function with the given name already exists in |
| 56 |
// the specified project, the long running operation will return |
| 57 |
// `ALREADY_EXISTS` error. |
| 58 |
CreateFunction(ctx context.Context, in *CreateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 59 |
// Updates existing function. |
| 60 |
UpdateFunction(ctx context.Context, in *UpdateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 61 |
// Deletes a function with the given name from the specified project. If the |
| 62 |
// given function is used by some trigger, the trigger will be updated to |
| 63 |
// remove this function. |
| 64 |
DeleteFunction(ctx context.Context, in *DeleteFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 65 |
// Returns a signed URL for uploading a function source code. |
| 66 |
// For more information about the signed URL usage see: |
| 67 |
// https://cloud.google.com/storage/docs/access-control/signed-urls. |
| 68 |
// Once the function source code upload is complete, the used signed |
| 69 |
// URL should be provided in CreateFunction or UpdateFunction request |
| 70 |
// as a reference to the function source code. |
| 71 |
// |
| 72 |
// When uploading source code to the generated signed URL, please follow |
| 73 |
// these restrictions: |
| 74 |
// |
| 75 |
// - Source file type should be a zip file. |
| 76 |
// - No credentials should be attached - the signed URLs provide access to the |
| 77 |
// target bucket using internal service identity; if credentials were |
| 78 |
// attached, the identity from the credentials would be used, but that |
| 79 |
// identity does not have permissions to upload files to the URL. |
| 80 |
// |
| 81 |
// When making a HTTP PUT request, specify this header: |
| 82 |
// |
| 83 |
// * `content-type: application/zip` |
| 84 |
// |
| 85 |
// Do not specify this header: |
| 86 |
// |
| 87 |
// * `Authorization: Bearer YOUR_TOKEN` |
| 88 |
GenerateUploadUrl(ctx context.Context, in *GenerateUploadUrlRequest, opts ...grpc.CallOption) (*GenerateUploadUrlResponse, error) |
| 89 |
// Returns a signed URL for downloading deployed function source code. |
| 90 |
// The URL is only valid for a limited period and should be used within |
| 91 |
// 30 minutes of generation. |
| 92 |
// For more information about the signed URL usage see: |
| 93 |
// https://cloud.google.com/storage/docs/access-control/signed-urls |
| 94 |
GenerateDownloadUrl(ctx context.Context, in *GenerateDownloadUrlRequest, opts ...grpc.CallOption) (*GenerateDownloadUrlResponse, error) |
| 95 |
// Returns a list of runtimes that are supported for the requested project. |
| 96 |
ListRuntimes(ctx context.Context, in *ListRuntimesRequest, opts ...grpc.CallOption) (*ListRuntimesResponse, error) |
| 97 |
} |
| 98 |
|
| 99 |
type functionServiceClient struct { |
| 100 |
cc grpc.ClientConnInterface |
| 101 |
} |
| 102 |
|
| 103 |
func NewFunctionServiceClient(cc grpc.ClientConnInterface) FunctionServiceClient { |
| 104 |
return &functionServiceClient{cc} |
| 105 |
} |
| 106 |
|
| 107 |
func (c *functionServiceClient) GetFunction(ctx context.Context, in *GetFunctionRequest, opts ...grpc.CallOption) (*Function, error) { |
| 108 |
out := new(Function) |
| 109 |
err := c.cc.Invoke(ctx, FunctionService_GetFunction_FullMethodName, in, out, opts...) |
| 110 |
if err != nil { |
| 111 |
return nil, err |
| 112 |
} |
| 113 |
return out, nil |
| 114 |
} |
| 115 |
|
| 116 |
func (c *functionServiceClient) ListFunctions(ctx context.Context, in *ListFunctionsRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error) { |
| 117 |
out := new(ListFunctionsResponse) |
| 118 |
err := c.cc.Invoke(ctx, FunctionService_ListFunctions_FullMethodName, in, out, opts...) |
| 119 |
if err != nil { |
| 120 |
return nil, err |
| 121 |
} |
| 122 |
return out, nil |
| 123 |
} |
| 124 |
|
| 125 |
func (c *functionServiceClient) CreateFunction(ctx context.Context, in *CreateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 126 |
out := new(longrunningpb.Operation) |
| 127 |
err := c.cc.Invoke(ctx, FunctionService_CreateFunction_FullMethodName, in, out, opts...) |
| 128 |
if err != nil { |
| 129 |
return nil, err |
| 130 |
} |
| 131 |
return out, nil |
| 132 |
} |
| 133 |
|
| 134 |
func (c *functionServiceClient) UpdateFunction(ctx context.Context, in *UpdateFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 135 |
out := new(longrunningpb.Operation) |
| 136 |
err := c.cc.Invoke(ctx, FunctionService_UpdateFunction_FullMethodName, in, out, opts...) |
| 137 |
if err != nil { |
| 138 |
return nil, err |
| 139 |
} |
| 140 |
return out, nil |
| 141 |
} |
| 142 |
|
| 143 |
func (c *functionServiceClient) DeleteFunction(ctx context.Context, in *DeleteFunctionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 144 |
out := new(longrunningpb.Operation) |
| 145 |
err := c.cc.Invoke(ctx, FunctionService_DeleteFunction_FullMethodName, in, out, opts...) |
| 146 |
if err != nil { |
| 147 |
return nil, err |
| 148 |
} |
| 149 |
return out, nil |
| 150 |
} |
| 151 |
|
| 152 |
func (c *functionServiceClient) GenerateUploadUrl(ctx context.Context, in *GenerateUploadUrlRequest, opts ...grpc.CallOption) (*GenerateUploadUrlResponse, error) { |
| 153 |
out := new(GenerateUploadUrlResponse) |
| 154 |
err := c.cc.Invoke(ctx, FunctionService_GenerateUploadUrl_FullMethodName, in, out, opts...) |
| 155 |
if err != nil { |
| 156 |
return nil, err |
| 157 |
} |
| 158 |
return out, nil |
| 159 |
} |
| 160 |
|
| 161 |
func (c *functionServiceClient) GenerateDownloadUrl(ctx context.Context, in *GenerateDownloadUrlRequest, opts ...grpc.CallOption) (*GenerateDownloadUrlResponse, error) { |
| 162 |
out := new(GenerateDownloadUrlResponse) |
| 163 |
err := c.cc.Invoke(ctx, FunctionService_GenerateDownloadUrl_FullMethodName, in, out, opts...) |
| 164 |
if err != nil { |
| 165 |
return nil, err |
| 166 |
} |
| 167 |
return out, nil |
| 168 |
} |
| 169 |
|
| 170 |
func (c *functionServiceClient) ListRuntimes(ctx context.Context, in *ListRuntimesRequest, opts ...grpc.CallOption) (*ListRuntimesResponse, error) { |
| 171 |
out := new(ListRuntimesResponse) |
| 172 |
err := c.cc.Invoke(ctx, FunctionService_ListRuntimes_FullMethodName, in, out, opts...) |
| 173 |
if err != nil { |
| 174 |
return nil, err |
| 175 |
} |
| 176 |
return out, nil |
| 177 |
} |
| 178 |
|
| 179 |
// FunctionServiceServer is the server API for FunctionService service. |
| 180 |
// All implementations should embed UnimplementedFunctionServiceServer |
| 181 |
// for forward compatibility |
| 182 |
type FunctionServiceServer interface { |
| 183 |
// Returns a function with the given name from the requested project. |
| 184 |
GetFunction(context.Context, *GetFunctionRequest) (*Function, error) |
| 185 |
// Returns a list of functions that belong to the requested project. |
| 186 |
ListFunctions(context.Context, *ListFunctionsRequest) (*ListFunctionsResponse, error) |
| 187 |
// Creates a new function. If a function with the given name already exists in |
| 188 |
// the specified project, the long running operation will return |
| 189 |
// `ALREADY_EXISTS` error. |
| 190 |
CreateFunction(context.Context, *CreateFunctionRequest) (*longrunningpb.Operation, error) |
| 191 |
// Updates existing function. |
| 192 |
UpdateFunction(context.Context, *UpdateFunctionRequest) (*longrunningpb.Operation, error) |
| 193 |
// Deletes a function with the given name from the specified project. If the |
| 194 |
// given function is used by some trigger, the trigger will be updated to |
| 195 |
// remove this function. |
| 196 |
DeleteFunction(context.Context, *DeleteFunctionRequest) (*longrunningpb.Operation, error) |
| 197 |
// Returns a signed URL for uploading a function source code. |
| 198 |
// For more information about the signed URL usage see: |
| 199 |
// https://cloud.google.com/storage/docs/access-control/signed-urls. |
| 200 |
// Once the function source code upload is complete, the used signed |
| 201 |
// URL should be provided in CreateFunction or UpdateFunction request |
| 202 |
// as a reference to the function source code. |
| 203 |
// |
| 204 |
// When uploading source code to the generated signed URL, please follow |
| 205 |
// these restrictions: |
| 206 |
// |
| 207 |
// - Source file type should be a zip file. |
| 208 |
// - No credentials should be attached - the signed URLs provide access to the |
| 209 |
// target bucket using internal service identity; if credentials were |
| 210 |
// attached, the identity from the credentials would be used, but that |
| 211 |
// identity does not have permissions to upload files to the URL. |
| 212 |
// |
| 213 |
// When making a HTTP PUT request, specify this header: |
| 214 |
// |
| 215 |
// * `content-type: application/zip` |
| 216 |
// |
| 217 |
// Do not specify this header: |
| 218 |
// |
| 219 |
// * `Authorization: Bearer YOUR_TOKEN` |
| 220 |
GenerateUploadUrl(context.Context, *GenerateUploadUrlRequest) (*GenerateUploadUrlResponse, error) |
| 221 |
// Returns a signed URL for downloading deployed function source code. |
| 222 |
// The URL is only valid for a limited period and should be used within |
| 223 |
// 30 minutes of generation. |
| 224 |
// For more information about the signed URL usage see: |
| 225 |
// https://cloud.google.com/storage/docs/access-control/signed-urls |
| 226 |
GenerateDownloadUrl(context.Context, *GenerateDownloadUrlRequest) (*GenerateDownloadUrlResponse, error) |
| 227 |
// Returns a list of runtimes that are supported for the requested project. |
| 228 |
ListRuntimes(context.Context, *ListRuntimesRequest) (*ListRuntimesResponse, error) |
| 229 |
} |
| 230 |
|
| 231 |
// UnimplementedFunctionServiceServer should be embedded to have forward compatible implementations. |
| 232 |
type UnimplementedFunctionServiceServer struct { |
| 233 |
} |
| 234 |
|
| 235 |
func (UnimplementedFunctionServiceServer) GetFunction(context.Context, *GetFunctionRequest) (*Function, error) { |
| 236 |
return nil, status.Errorf(codes.Unimplemented, "method GetFunction not implemented") |
| 237 |
} |
| 238 |
func (UnimplementedFunctionServiceServer) ListFunctions(context.Context, *ListFunctionsRequest) (*ListFunctionsResponse, error) { |
| 239 |
return nil, status.Errorf(codes.Unimplemented, "method ListFunctions not implemented") |
| 240 |
} |
| 241 |
func (UnimplementedFunctionServiceServer) CreateFunction(context.Context, *CreateFunctionRequest) (*longrunningpb.Operation, error) { |
| 242 |
return nil, status.Errorf(codes.Unimplemented, "method CreateFunction not implemented") |
| 243 |
} |
| 244 |
func (UnimplementedFunctionServiceServer) UpdateFunction(context.Context, *UpdateFunctionRequest) (*longrunningpb.Operation, error) { |
| 245 |
return nil, status.Errorf(codes.Unimplemented, "method UpdateFunction not implemented") |
| 246 |
} |
| 247 |
func (UnimplementedFunctionServiceServer) DeleteFunction(context.Context, *DeleteFunctionRequest) (*longrunningpb.Operation, error) { |
| 248 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteFunction not implemented") |
| 249 |
} |
| 250 |
func (UnimplementedFunctionServiceServer) GenerateUploadUrl(context.Context, *GenerateUploadUrlRequest) (*GenerateUploadUrlResponse, error) { |
| 251 |
return nil, status.Errorf(codes.Unimplemented, "method GenerateUploadUrl not implemented") |
| 252 |
} |
| 253 |
func (UnimplementedFunctionServiceServer) GenerateDownloadUrl(context.Context, *GenerateDownloadUrlRequest) (*GenerateDownloadUrlResponse, error) { |
| 254 |
return nil, status.Errorf(codes.Unimplemented, "method GenerateDownloadUrl not implemented") |
| 255 |
} |
| 256 |
func (UnimplementedFunctionServiceServer) ListRuntimes(context.Context, *ListRuntimesRequest) (*ListRuntimesResponse, error) { |
| 257 |
return nil, status.Errorf(codes.Unimplemented, "method ListRuntimes not implemented") |
| 258 |
} |
| 259 |
|
| 260 |
// UnsafeFunctionServiceServer may be embedded to opt out of forward compatibility for this service. |
| 261 |
// Use of this interface is not recommended, as added methods to FunctionServiceServer will |
| 262 |
// result in compilation errors. |
| 263 |
type UnsafeFunctionServiceServer interface { |
| 264 |
mustEmbedUnimplementedFunctionServiceServer() |
| 265 |
} |
| 266 |
|
| 267 |
func RegisterFunctionServiceServer(s grpc.ServiceRegistrar, srv FunctionServiceServer) { |
| 268 |
s.RegisterService(&FunctionService_ServiceDesc, srv) |
| 269 |
} |
| 270 |
|
| 271 |
func _FunctionService_GetFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 272 |
in := new(GetFunctionRequest) |
| 273 |
if err := dec(in); err != nil { |
| 274 |
return nil, err |
| 275 |
} |
| 276 |
if interceptor == nil { |
| 277 |
return srv.(FunctionServiceServer).GetFunction(ctx, in) |
| 278 |
} |
| 279 |
info := &grpc.UnaryServerInfo{ |
| 280 |
Server: srv, |
| 281 |
FullMethod: FunctionService_GetFunction_FullMethodName, |
| 282 |
} |
| 283 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 284 |
return srv.(FunctionServiceServer).GetFunction(ctx, req.(*GetFunctionRequest)) |
| 285 |
} |
| 286 |
return interceptor(ctx, in, info, handler) |
| 287 |
} |
| 288 |
|
| 289 |
func _FunctionService_ListFunctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 290 |
in := new(ListFunctionsRequest) |
| 291 |
if err := dec(in); err != nil { |
| 292 |
return nil, err |
| 293 |
} |
| 294 |
if interceptor == nil { |
| 295 |
return srv.(FunctionServiceServer).ListFunctions(ctx, in) |
| 296 |
} |
| 297 |
info := &grpc.UnaryServerInfo{ |
| 298 |
Server: srv, |
| 299 |
FullMethod: FunctionService_ListFunctions_FullMethodName, |
| 300 |
} |
| 301 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 302 |
return srv.(FunctionServiceServer).ListFunctions(ctx, req.(*ListFunctionsRequest)) |
| 303 |
} |
| 304 |
return interceptor(ctx, in, info, handler) |
| 305 |
} |
| 306 |
|
| 307 |
func _FunctionService_CreateFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 308 |
in := new(CreateFunctionRequest) |
| 309 |
if err := dec(in); err != nil { |
| 310 |
return nil, err |
| 311 |
} |
| 312 |
if interceptor == nil { |
| 313 |
return srv.(FunctionServiceServer).CreateFunction(ctx, in) |
| 314 |
} |
| 315 |
info := &grpc.UnaryServerInfo{ |
| 316 |
Server: srv, |
| 317 |
FullMethod: FunctionService_CreateFunction_FullMethodName, |
| 318 |
} |
| 319 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 320 |
return srv.(FunctionServiceServer).CreateFunction(ctx, req.(*CreateFunctionRequest)) |
| 321 |
} |
| 322 |
return interceptor(ctx, in, info, handler) |
| 323 |
} |
| 324 |
|
| 325 |
func _FunctionService_UpdateFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 326 |
in := new(UpdateFunctionRequest) |
| 327 |
if err := dec(in); err != nil { |
| 328 |
return nil, err |
| 329 |
} |
| 330 |
if interceptor == nil { |
| 331 |
return srv.(FunctionServiceServer).UpdateFunction(ctx, in) |
| 332 |
} |
| 333 |
info := &grpc.UnaryServerInfo{ |
| 334 |
Server: srv, |
| 335 |
FullMethod: FunctionService_UpdateFunction_FullMethodName, |
| 336 |
} |
| 337 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 338 |
return srv.(FunctionServiceServer).UpdateFunction(ctx, req.(*UpdateFunctionRequest)) |
| 339 |
} |
| 340 |
return interceptor(ctx, in, info, handler) |
| 341 |
} |
| 342 |
|
| 343 |
func _FunctionService_DeleteFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 344 |
in := new(DeleteFunctionRequest) |
| 345 |
if err := dec(in); err != nil { |
| 346 |
return nil, err |
| 347 |
} |
| 348 |
if interceptor == nil { |
| 349 |
return srv.(FunctionServiceServer).DeleteFunction(ctx, in) |
| 350 |
} |
| 351 |
info := &grpc.UnaryServerInfo{ |
| 352 |
Server: srv, |
| 353 |
FullMethod: FunctionService_DeleteFunction_FullMethodName, |
| 354 |
} |
| 355 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 356 |
return srv.(FunctionServiceServer).DeleteFunction(ctx, req.(*DeleteFunctionRequest)) |
| 357 |
} |
| 358 |
return interceptor(ctx, in, info, handler) |
| 359 |
} |
| 360 |
|
| 361 |
func _FunctionService_GenerateUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 362 |
in := new(GenerateUploadUrlRequest) |
| 363 |
if err := dec(in); err != nil { |
| 364 |
return nil, err |
| 365 |
} |
| 366 |
if interceptor == nil { |
| 367 |
return srv.(FunctionServiceServer).GenerateUploadUrl(ctx, in) |
| 368 |
} |
| 369 |
info := &grpc.UnaryServerInfo{ |
| 370 |
Server: srv, |
| 371 |
FullMethod: FunctionService_GenerateUploadUrl_FullMethodName, |
| 372 |
} |
| 373 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 374 |
return srv.(FunctionServiceServer).GenerateUploadUrl(ctx, req.(*GenerateUploadUrlRequest)) |
| 375 |
} |
| 376 |
return interceptor(ctx, in, info, handler) |
| 377 |
} |
| 378 |
|
| 379 |
func _FunctionService_GenerateDownloadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 380 |
in := new(GenerateDownloadUrlRequest) |
| 381 |
if err := dec(in); err != nil { |
| 382 |
return nil, err |
| 383 |
} |
| 384 |
if interceptor == nil { |
| 385 |
return srv.(FunctionServiceServer).GenerateDownloadUrl(ctx, in) |
| 386 |
} |
| 387 |
info := &grpc.UnaryServerInfo{ |
| 388 |
Server: srv, |
| 389 |
FullMethod: FunctionService_GenerateDownloadUrl_FullMethodName, |
| 390 |
} |
| 391 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 392 |
return srv.(FunctionServiceServer).GenerateDownloadUrl(ctx, req.(*GenerateDownloadUrlRequest)) |
| 393 |
} |
| 394 |
return interceptor(ctx, in, info, handler) |
| 395 |
} |
| 396 |
|
| 397 |
func _FunctionService_ListRuntimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 398 |
in := new(ListRuntimesRequest) |
| 399 |
if err := dec(in); err != nil { |
| 400 |
return nil, err |
| 401 |
} |
| 402 |
if interceptor == nil { |
| 403 |
return srv.(FunctionServiceServer).ListRuntimes(ctx, in) |
| 404 |
} |
| 405 |
info := &grpc.UnaryServerInfo{ |
| 406 |
Server: srv, |
| 407 |
FullMethod: FunctionService_ListRuntimes_FullMethodName, |
| 408 |
} |
| 409 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 410 |
return srv.(FunctionServiceServer).ListRuntimes(ctx, req.(*ListRuntimesRequest)) |
| 411 |
} |
| 412 |
return interceptor(ctx, in, info, handler) |
| 413 |
} |
| 414 |
|
| 415 |
// FunctionService_ServiceDesc is the grpc.ServiceDesc for FunctionService service. |
| 416 |
// It's only intended for direct use with grpc.RegisterService, |
| 417 |
// and not to be introspected or modified (even as a copy) |
| 418 |
var FunctionService_ServiceDesc = grpc.ServiceDesc{ |
| 419 |
ServiceName: "google.cloud.functions.v2beta.FunctionService", |
| 420 |
HandlerType: (*FunctionServiceServer)(nil), |
| 421 |
Methods: []grpc.MethodDesc{ |
| 422 |
{ |
| 423 |
MethodName: "GetFunction", |
| 424 |
Handler: _FunctionService_GetFunction_Handler, |
| 425 |
}, |
| 426 |
{ |
| 427 |
MethodName: "ListFunctions", |
| 428 |
Handler: _FunctionService_ListFunctions_Handler, |
| 429 |
}, |
| 430 |
{ |
| 431 |
MethodName: "CreateFunction", |
| 432 |
Handler: _FunctionService_CreateFunction_Handler, |
| 433 |
}, |
| 434 |
{ |
| 435 |
MethodName: "UpdateFunction", |
| 436 |
Handler: _FunctionService_UpdateFunction_Handler, |
| 437 |
}, |
| 438 |
{ |
| 439 |
MethodName: "DeleteFunction", |
| 440 |
Handler: _FunctionService_DeleteFunction_Handler, |
| 441 |
}, |
| 442 |
{ |
| 443 |
MethodName: "GenerateUploadUrl", |
| 444 |
Handler: _FunctionService_GenerateUploadUrl_Handler, |
| 445 |
}, |
| 446 |
{ |
| 447 |
MethodName: "GenerateDownloadUrl", |
| 448 |
Handler: _FunctionService_GenerateDownloadUrl_Handler, |
| 449 |
}, |
| 450 |
{ |
| 451 |
MethodName: "ListRuntimes", |
| 452 |
Handler: _FunctionService_ListRuntimes_Handler, |
| 453 |
}, |
| 454 |
}, |
| 455 |
Streams: []grpc.StreamDesc{}, |
| 456 |
Metadata: "google/cloud/functions/v2beta/functions.proto", |
| 457 |
} |