123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.3.0
- // - protoc v5.26.1
- // source: order.proto
- package prod
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- const (
- OrderService_NewOrder_FullMethodName = "/services.OrderService/NewOrder"
- )
- // OrderServiceClient is the client API for OrderService service.
- //
- // 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.
- type OrderServiceClient interface {
- NewOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*OrderResponse, error)
- }
- type orderServiceClient struct {
- cc grpc.ClientConnInterface
- }
- func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient {
- return &orderServiceClient{cc}
- }
- func (c *orderServiceClient) NewOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*OrderResponse, error) {
- out := new(OrderResponse)
- err := c.cc.Invoke(ctx, OrderService_NewOrder_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // OrderServiceServer is the server API for OrderService service.
- // All implementations must embed UnimplementedOrderServiceServer
- // for forward compatibility
- type OrderServiceServer interface {
- NewOrder(context.Context, *OrderRequest) (*OrderResponse, error)
- mustEmbedUnimplementedOrderServiceServer()
- }
- // UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.
- type UnimplementedOrderServiceServer struct {
- }
- func (UnimplementedOrderServiceServer) NewOrder(context.Context, *OrderRequest) (*OrderResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method NewOrder not implemented")
- }
- func (UnimplementedOrderServiceServer) mustEmbedUnimplementedOrderServiceServer() {}
- // UnsafeOrderServiceServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to OrderServiceServer will
- // result in compilation errors.
- type UnsafeOrderServiceServer interface {
- mustEmbedUnimplementedOrderServiceServer()
- }
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer) {
- s.RegisterService(&OrderService_ServiceDesc, srv)
- }
- func _OrderService_NewOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(OrderRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OrderServiceServer).NewOrder(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: OrderService_NewOrder_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OrderServiceServer).NewOrder(ctx, req.(*OrderRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // OrderService_ServiceDesc is the grpc.ServiceDesc for OrderService service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var OrderService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "services.OrderService",
- HandlerType: (*OrderServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "NewOrder",
- Handler: _OrderService_NewOrder_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "order.proto",
- }
|