...

Source file src/github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb/ignore_comment_grpc.pb.go

Documentation: github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.2.0
     4  // - protoc             (unknown)
     5  // source: examples/internal/proto/examplepb/ignore_comment.proto
     6  
     7  package examplepb
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  // FooServiceClient is the client API for FooService service.
    22  //
    23  // 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.
    24  type FooServiceClient interface {
    25  	// This comment should be excluded from OpenAPI output
    26  	Foo(ctx context.Context, in *FooRequest, opts ...grpc.CallOption) (*FooReply, error)
    27  }
    28  
    29  type fooServiceClient struct {
    30  	cc grpc.ClientConnInterface
    31  }
    32  
    33  func NewFooServiceClient(cc grpc.ClientConnInterface) FooServiceClient {
    34  	return &fooServiceClient{cc}
    35  }
    36  
    37  func (c *fooServiceClient) Foo(ctx context.Context, in *FooRequest, opts ...grpc.CallOption) (*FooReply, error) {
    38  	out := new(FooReply)
    39  	err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.FooService/Foo", in, out, opts...)
    40  	if err != nil {
    41  		return nil, err
    42  	}
    43  	return out, nil
    44  }
    45  
    46  // FooServiceServer is the server API for FooService service.
    47  // All implementations should embed UnimplementedFooServiceServer
    48  // for forward compatibility
    49  type FooServiceServer interface {
    50  	// This comment should be excluded from OpenAPI output
    51  	Foo(context.Context, *FooRequest) (*FooReply, error)
    52  }
    53  
    54  // UnimplementedFooServiceServer should be embedded to have forward compatible implementations.
    55  type UnimplementedFooServiceServer struct {
    56  }
    57  
    58  func (UnimplementedFooServiceServer) Foo(context.Context, *FooRequest) (*FooReply, error) {
    59  	return nil, status.Errorf(codes.Unimplemented, "method Foo not implemented")
    60  }
    61  
    62  // UnsafeFooServiceServer may be embedded to opt out of forward compatibility for this service.
    63  // Use of this interface is not recommended, as added methods to FooServiceServer will
    64  // result in compilation errors.
    65  type UnsafeFooServiceServer interface {
    66  	mustEmbedUnimplementedFooServiceServer()
    67  }
    68  
    69  func RegisterFooServiceServer(s grpc.ServiceRegistrar, srv FooServiceServer) {
    70  	s.RegisterService(&FooService_ServiceDesc, srv)
    71  }
    72  
    73  func _FooService_Foo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    74  	in := new(FooRequest)
    75  	if err := dec(in); err != nil {
    76  		return nil, err
    77  	}
    78  	if interceptor == nil {
    79  		return srv.(FooServiceServer).Foo(ctx, in)
    80  	}
    81  	info := &grpc.UnaryServerInfo{
    82  		Server:     srv,
    83  		FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.FooService/Foo",
    84  	}
    85  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    86  		return srv.(FooServiceServer).Foo(ctx, req.(*FooRequest))
    87  	}
    88  	return interceptor(ctx, in, info, handler)
    89  }
    90  
    91  // FooService_ServiceDesc is the grpc.ServiceDesc for FooService service.
    92  // It's only intended for direct use with grpc.RegisterService,
    93  // and not to be introspected or modified (even as a copy)
    94  var FooService_ServiceDesc = grpc.ServiceDesc{
    95  	ServiceName: "grpc.gateway.examples.internal.proto.examplepb.FooService",
    96  	HandlerType: (*FooServiceServer)(nil),
    97  	Methods: []grpc.MethodDesc{
    98  		{
    99  			MethodName: "Foo",
   100  			Handler:    _FooService_Foo_Handler,
   101  		},
   102  	},
   103  	Streams:  []grpc.StreamDesc{},
   104  	Metadata: "examples/internal/proto/examplepb/ignore_comment.proto",
   105  }
   106  

View as plain text