go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/api/v0/service_gerrit_grpc.pb.go (about) 1 // Copyright 2023 The LUCI Authors. 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 v3.21.7 19 // source: go.chromium.org/luci/cv/api/v0/service_gerrit.proto 20 21 package cvpb 22 23 import ( 24 context "context" 25 grpc "google.golang.org/grpc" 26 codes "google.golang.org/grpc/codes" 27 status "google.golang.org/grpc/status" 28 ) 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the grpc package it is being compiled against. 32 // Requires gRPC-Go v1.32.0 or later. 33 const _ = grpc.SupportPackageIsVersion7 34 35 const ( 36 GerritIntegration_GetCLRunInfo_FullMethodName = "/cv.v0.GerritIntegration/GetCLRunInfo" 37 ) 38 39 // GerritIntegrationClient is the client API for GerritIntegration service. 40 // 41 // 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. 42 type GerritIntegrationClient interface { 43 // GetCLRunInfo returns ongoing Run information for the given CL and the CLs 44 // that the given CL depends on. 45 GetCLRunInfo(ctx context.Context, in *GetCLRunInfoRequest, opts ...grpc.CallOption) (*GetCLRunInfoResponse, error) 46 } 47 48 type gerritIntegrationClient struct { 49 cc grpc.ClientConnInterface 50 } 51 52 func NewGerritIntegrationClient(cc grpc.ClientConnInterface) GerritIntegrationClient { 53 return &gerritIntegrationClient{cc} 54 } 55 56 func (c *gerritIntegrationClient) GetCLRunInfo(ctx context.Context, in *GetCLRunInfoRequest, opts ...grpc.CallOption) (*GetCLRunInfoResponse, error) { 57 out := new(GetCLRunInfoResponse) 58 err := c.cc.Invoke(ctx, GerritIntegration_GetCLRunInfo_FullMethodName, in, out, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return out, nil 63 } 64 65 // GerritIntegrationServer is the server API for GerritIntegration service. 66 // All implementations must embed UnimplementedGerritIntegrationServer 67 // for forward compatibility 68 type GerritIntegrationServer interface { 69 // GetCLRunInfo returns ongoing Run information for the given CL and the CLs 70 // that the given CL depends on. 71 GetCLRunInfo(context.Context, *GetCLRunInfoRequest) (*GetCLRunInfoResponse, error) 72 mustEmbedUnimplementedGerritIntegrationServer() 73 } 74 75 // UnimplementedGerritIntegrationServer must be embedded to have forward compatible implementations. 76 type UnimplementedGerritIntegrationServer struct { 77 } 78 79 func (UnimplementedGerritIntegrationServer) GetCLRunInfo(context.Context, *GetCLRunInfoRequest) (*GetCLRunInfoResponse, error) { 80 return nil, status.Errorf(codes.Unimplemented, "method GetCLRunInfo not implemented") 81 } 82 func (UnimplementedGerritIntegrationServer) mustEmbedUnimplementedGerritIntegrationServer() {} 83 84 // UnsafeGerritIntegrationServer may be embedded to opt out of forward compatibility for this service. 85 // Use of this interface is not recommended, as added methods to GerritIntegrationServer will 86 // result in compilation errors. 87 type UnsafeGerritIntegrationServer interface { 88 mustEmbedUnimplementedGerritIntegrationServer() 89 } 90 91 func RegisterGerritIntegrationServer(s grpc.ServiceRegistrar, srv GerritIntegrationServer) { 92 s.RegisterService(&GerritIntegration_ServiceDesc, srv) 93 } 94 95 func _GerritIntegration_GetCLRunInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 96 in := new(GetCLRunInfoRequest) 97 if err := dec(in); err != nil { 98 return nil, err 99 } 100 if interceptor == nil { 101 return srv.(GerritIntegrationServer).GetCLRunInfo(ctx, in) 102 } 103 info := &grpc.UnaryServerInfo{ 104 Server: srv, 105 FullMethod: GerritIntegration_GetCLRunInfo_FullMethodName, 106 } 107 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 108 return srv.(GerritIntegrationServer).GetCLRunInfo(ctx, req.(*GetCLRunInfoRequest)) 109 } 110 return interceptor(ctx, in, info, handler) 111 } 112 113 // GerritIntegration_ServiceDesc is the grpc.ServiceDesc for GerritIntegration service. 114 // It's only intended for direct use with grpc.RegisterService, 115 // and not to be introspected or modified (even as a copy) 116 var GerritIntegration_ServiceDesc = grpc.ServiceDesc{ 117 ServiceName: "cv.v0.GerritIntegration", 118 HandlerType: (*GerritIntegrationServer)(nil), 119 Methods: []grpc.MethodDesc{ 120 { 121 MethodName: "GetCLRunInfo", 122 Handler: _GerritIntegration_GetCLRunInfo_Handler, 123 }, 124 }, 125 Streams: []grpc.StreamDesc{}, 126 Metadata: "go.chromium.org/luci/cv/api/v0/service_gerrit.proto", 127 }