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