...

Source file src/github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb/remove_internal_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/remove_internal_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  // Foo2ServiceClient is the client API for Foo2Service 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 Foo2ServiceClient interface {
    25  	// Foo Summary (-- This comment should be excluded from OpenAPI output --)
    26  	//
    27  	// (-- This comment should be excluded from OpenAPI output --)
    28  	// Description
    29  	Foo2(ctx context.Context, in *Foo2Request, opts ...grpc.CallOption) (*Foo2Reply, error)
    30  }
    31  
    32  type foo2ServiceClient struct {
    33  	cc grpc.ClientConnInterface
    34  }
    35  
    36  func NewFoo2ServiceClient(cc grpc.ClientConnInterface) Foo2ServiceClient {
    37  	return &foo2ServiceClient{cc}
    38  }
    39  
    40  func (c *foo2ServiceClient) Foo2(ctx context.Context, in *Foo2Request, opts ...grpc.CallOption) (*Foo2Reply, error) {
    41  	out := new(Foo2Reply)
    42  	err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.Foo2Service/Foo2", in, out, opts...)
    43  	if err != nil {
    44  		return nil, err
    45  	}
    46  	return out, nil
    47  }
    48  
    49  // Foo2ServiceServer is the server API for Foo2Service service.
    50  // All implementations should embed UnimplementedFoo2ServiceServer
    51  // for forward compatibility
    52  type Foo2ServiceServer interface {
    53  	// Foo Summary (-- This comment should be excluded from OpenAPI output --)
    54  	//
    55  	// (-- This comment should be excluded from OpenAPI output --)
    56  	// Description
    57  	Foo2(context.Context, *Foo2Request) (*Foo2Reply, error)
    58  }
    59  
    60  // UnimplementedFoo2ServiceServer should be embedded to have forward compatible implementations.
    61  type UnimplementedFoo2ServiceServer struct {
    62  }
    63  
    64  func (UnimplementedFoo2ServiceServer) Foo2(context.Context, *Foo2Request) (*Foo2Reply, error) {
    65  	return nil, status.Errorf(codes.Unimplemented, "method Foo2 not implemented")
    66  }
    67  
    68  // UnsafeFoo2ServiceServer may be embedded to opt out of forward compatibility for this service.
    69  // Use of this interface is not recommended, as added methods to Foo2ServiceServer will
    70  // result in compilation errors.
    71  type UnsafeFoo2ServiceServer interface {
    72  	mustEmbedUnimplementedFoo2ServiceServer()
    73  }
    74  
    75  func RegisterFoo2ServiceServer(s grpc.ServiceRegistrar, srv Foo2ServiceServer) {
    76  	s.RegisterService(&Foo2Service_ServiceDesc, srv)
    77  }
    78  
    79  func _Foo2Service_Foo2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    80  	in := new(Foo2Request)
    81  	if err := dec(in); err != nil {
    82  		return nil, err
    83  	}
    84  	if interceptor == nil {
    85  		return srv.(Foo2ServiceServer).Foo2(ctx, in)
    86  	}
    87  	info := &grpc.UnaryServerInfo{
    88  		Server:     srv,
    89  		FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.Foo2Service/Foo2",
    90  	}
    91  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    92  		return srv.(Foo2ServiceServer).Foo2(ctx, req.(*Foo2Request))
    93  	}
    94  	return interceptor(ctx, in, info, handler)
    95  }
    96  
    97  // Foo2Service_ServiceDesc is the grpc.ServiceDesc for Foo2Service service.
    98  // It's only intended for direct use with grpc.RegisterService,
    99  // and not to be introspected or modified (even as a copy)
   100  var Foo2Service_ServiceDesc = grpc.ServiceDesc{
   101  	ServiceName: "grpc.gateway.examples.internal.proto.examplepb.Foo2Service",
   102  	HandlerType: (*Foo2ServiceServer)(nil),
   103  	Methods: []grpc.MethodDesc{
   104  		{
   105  			MethodName: "Foo2",
   106  			Handler:    _Foo2Service_Foo2_Handler,
   107  		},
   108  	},
   109  	Streams:  []grpc.StreamDesc{},
   110  	Metadata: "examples/internal/proto/examplepb/remove_internal_comment.proto",
   111  }
   112  

View as plain text