go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/examples/appengine/helloworld_v2/apipb/helloworld.pb.go (about) 1 // Copyright 2020 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. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.31.0 18 // protoc v3.21.7 19 // source: go.chromium.org/luci/examples/appengine/helloworld_v2/apipb/helloworld.proto 20 21 package apipb 22 23 import prpc "go.chromium.org/luci/grpc/prpc" 24 25 import ( 26 context "context" 27 grpc "google.golang.org/grpc" 28 codes "google.golang.org/grpc/codes" 29 status "google.golang.org/grpc/status" 30 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 31 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 32 emptypb "google.golang.org/protobuf/types/known/emptypb" 33 reflect "reflect" 34 ) 35 36 const ( 37 // Verify that this generated code is sufficiently up-to-date. 38 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 39 // Verify that runtime/protoimpl is sufficiently up-to-date. 40 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 41 ) 42 43 var File_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto protoreflect.FileDescriptor 44 45 var file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_rawDesc = []byte{ 46 0x0a, 0x4c, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 47 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 48 0x61, 0x70, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 49 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x70, 0x62, 0x2f, 0x68, 0x65, 50 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 51 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x68, 0x65, 52 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 53 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 54 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x44, 0x0a, 0x07, 0x47, 0x72, 0x65, 0x65, 0x74, 0x65, 0x72, 55 0x12, 0x39, 0x0a, 0x05, 0x53, 0x61, 0x79, 0x48, 0x69, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 56 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 57 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 58 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 59 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 60 0x75, 0x63, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x70, 61 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 62 0x64, 0x5f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 63 0x6f, 0x33, 64 } 65 66 var file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_goTypes = []interface{}{ 67 (*emptypb.Empty)(nil), // 0: google.protobuf.Empty 68 } 69 var file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_depIdxs = []int32{ 70 0, // 0: luci.examples.helloworld.Greeter.SayHi:input_type -> google.protobuf.Empty 71 0, // 1: luci.examples.helloworld.Greeter.SayHi:output_type -> google.protobuf.Empty 72 1, // [1:2] is the sub-list for method output_type 73 0, // [0:1] is the sub-list for method input_type 74 0, // [0:0] is the sub-list for extension type_name 75 0, // [0:0] is the sub-list for extension extendee 76 0, // [0:0] is the sub-list for field type_name 77 } 78 79 func init() { file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_init() } 80 func file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_init() { 81 if File_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto != nil { 82 return 83 } 84 type x struct{} 85 out := protoimpl.TypeBuilder{ 86 File: protoimpl.DescBuilder{ 87 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 88 RawDescriptor: file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_rawDesc, 89 NumEnums: 0, 90 NumMessages: 0, 91 NumExtensions: 0, 92 NumServices: 1, 93 }, 94 GoTypes: file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_goTypes, 95 DependencyIndexes: file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_depIdxs, 96 }.Build() 97 File_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto = out.File 98 file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_rawDesc = nil 99 file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_goTypes = nil 100 file_go_chromium_org_luci_examples_appengine_helloworld_v2_apipb_helloworld_proto_depIdxs = nil 101 } 102 103 // Reference imports to suppress errors if they are not otherwise used. 104 var _ context.Context 105 var _ grpc.ClientConnInterface 106 107 // This is a compile-time assertion to ensure that this generated file 108 // is compatible with the grpc package it is being compiled against. 109 const _ = grpc.SupportPackageIsVersion6 110 111 // GreeterClient is the client API for Greeter service. 112 // 113 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 114 type GreeterClient interface { 115 SayHi(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) 116 } 117 type greeterPRPCClient struct { 118 client *prpc.Client 119 } 120 121 func NewGreeterPRPCClient(client *prpc.Client) GreeterClient { 122 return &greeterPRPCClient{client} 123 } 124 125 func (c *greeterPRPCClient) SayHi(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { 126 out := new(emptypb.Empty) 127 err := c.client.Call(ctx, "luci.examples.helloworld.Greeter", "SayHi", in, out, opts...) 128 if err != nil { 129 return nil, err 130 } 131 return out, nil 132 } 133 134 type greeterClient struct { 135 cc grpc.ClientConnInterface 136 } 137 138 func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { 139 return &greeterClient{cc} 140 } 141 142 func (c *greeterClient) SayHi(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { 143 out := new(emptypb.Empty) 144 err := c.cc.Invoke(ctx, "/luci.examples.helloworld.Greeter/SayHi", in, out, opts...) 145 if err != nil { 146 return nil, err 147 } 148 return out, nil 149 } 150 151 // GreeterServer is the server API for Greeter service. 152 type GreeterServer interface { 153 SayHi(context.Context, *emptypb.Empty) (*emptypb.Empty, error) 154 } 155 156 // UnimplementedGreeterServer can be embedded to have forward compatible implementations. 157 type UnimplementedGreeterServer struct { 158 } 159 160 func (*UnimplementedGreeterServer) SayHi(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { 161 return nil, status.Errorf(codes.Unimplemented, "method SayHi not implemented") 162 } 163 164 func RegisterGreeterServer(s prpc.Registrar, srv GreeterServer) { 165 s.RegisterService(&_Greeter_serviceDesc, srv) 166 } 167 168 func _Greeter_SayHi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 169 in := new(emptypb.Empty) 170 if err := dec(in); err != nil { 171 return nil, err 172 } 173 if interceptor == nil { 174 return srv.(GreeterServer).SayHi(ctx, in) 175 } 176 info := &grpc.UnaryServerInfo{ 177 Server: srv, 178 FullMethod: "/luci.examples.helloworld.Greeter/SayHi", 179 } 180 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 181 return srv.(GreeterServer).SayHi(ctx, req.(*emptypb.Empty)) 182 } 183 return interceptor(ctx, in, info, handler) 184 } 185 186 var _Greeter_serviceDesc = grpc.ServiceDesc{ 187 ServiceName: "luci.examples.helloworld.Greeter", 188 HandlerType: (*GreeterServer)(nil), 189 Methods: []grpc.MethodDesc{ 190 { 191 MethodName: "SayHi", 192 Handler: _Greeter_SayHi_Handler, 193 }, 194 }, 195 Streams: []grpc.StreamDesc{}, 196 Metadata: "go.chromium.org/luci/examples/appengine/helloworld_v2/apipb/helloworld.proto", 197 }