// Copyright (C) 2024 Declan Teevan // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: stocklet/order/v1/service.proto package order_v1 import ( context "context" v1 "github.com/hexolan/stocklet/internal/pkg/protogen/common/v1" v11 "github.com/hexolan/stocklet/internal/pkg/protogen/events/v1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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_ServiceInfo_FullMethodName = "/stocklet.order.v1.OrderService/ServiceInfo" OrderService_ViewOrder_FullMethodName = "/stocklet.order.v1.OrderService/ViewOrder" OrderService_ViewOrders_FullMethodName = "/stocklet.order.v1.OrderService/ViewOrders" OrderService_PlaceOrder_FullMethodName = "/stocklet.order.v1.OrderService/PlaceOrder" OrderService_ProcessProductPriceQuoteEvent_FullMethodName = "/stocklet.order.v1.OrderService/ProcessProductPriceQuoteEvent" OrderService_ProcessStockReservationEvent_FullMethodName = "/stocklet.order.v1.OrderService/ProcessStockReservationEvent" OrderService_ProcessShipmentAllocationEvent_FullMethodName = "/stocklet.order.v1.OrderService/ProcessShipmentAllocationEvent" OrderService_ProcessPaymentProcessedEvent_FullMethodName = "/stocklet.order.v1.OrderService/ProcessPaymentProcessedEvent" ) // 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 { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) ViewOrder(ctx context.Context, in *ViewOrderRequest, opts ...grpc.CallOption) (*ViewOrderResponse, error) // Get a list of a customer's orders. // If accessed through the gateway - shows the current user's orders. ViewOrders(ctx context.Context, in *ViewOrdersRequest, opts ...grpc.CallOption) (*ViewOrdersResponse, error) PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessProductPriceQuoteEvent(ctx context.Context, in *v11.ProductPriceQuoteEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessStockReservationEvent(ctx context.Context, in *v11.StockReservationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessShipmentAllocationEvent(ctx context.Context, in *v11.ShipmentAllocationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessPaymentProcessedEvent(ctx context.Context, in *v11.PaymentProcessedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) } type orderServiceClient struct { cc grpc.ClientConnInterface } func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient { return &orderServiceClient{cc} } func (c *orderServiceClient) ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) { out := new(v1.ServiceInfoResponse) err := c.cc.Invoke(ctx, OrderService_ServiceInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) ViewOrder(ctx context.Context, in *ViewOrderRequest, opts ...grpc.CallOption) (*ViewOrderResponse, error) { out := new(ViewOrderResponse) err := c.cc.Invoke(ctx, OrderService_ViewOrder_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) ViewOrders(ctx context.Context, in *ViewOrdersRequest, opts ...grpc.CallOption) (*ViewOrdersResponse, error) { out := new(ViewOrdersResponse) err := c.cc.Invoke(ctx, OrderService_ViewOrders_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error) { out := new(PlaceOrderResponse) err := c.cc.Invoke(ctx, OrderService_PlaceOrder_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) ProcessProductPriceQuoteEvent(ctx context.Context, in *v11.ProductPriceQuoteEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, OrderService_ProcessProductPriceQuoteEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) ProcessStockReservationEvent(ctx context.Context, in *v11.StockReservationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, OrderService_ProcessStockReservationEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) ProcessShipmentAllocationEvent(ctx context.Context, in *v11.ShipmentAllocationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, OrderService_ProcessShipmentAllocationEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orderServiceClient) ProcessPaymentProcessedEvent(ctx context.Context, in *v11.PaymentProcessedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, OrderService_ProcessPaymentProcessedEvent_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 { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) ViewOrder(context.Context, *ViewOrderRequest) (*ViewOrderResponse, error) // Get a list of a customer's orders. // If accessed through the gateway - shows the current user's orders. ViewOrders(context.Context, *ViewOrdersRequest) (*ViewOrdersResponse, error) PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessProductPriceQuoteEvent(context.Context, *v11.ProductPriceQuoteEvent) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessStockReservationEvent(context.Context, *v11.StockReservationEvent) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessShipmentAllocationEvent(context.Context, *v11.ShipmentAllocationEvent) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessPaymentProcessedEvent(context.Context, *v11.PaymentProcessedEvent) (*emptypb.Empty, error) mustEmbedUnimplementedOrderServiceServer() } // UnimplementedOrderServiceServer must be embedded to have forward compatible implementations. type UnimplementedOrderServiceServer struct { } func (UnimplementedOrderServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServiceInfo not implemented") } func (UnimplementedOrderServiceServer) ViewOrder(context.Context, *ViewOrderRequest) (*ViewOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ViewOrder not implemented") } func (UnimplementedOrderServiceServer) ViewOrders(context.Context, *ViewOrdersRequest) (*ViewOrdersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ViewOrders not implemented") } func (UnimplementedOrderServiceServer) PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PlaceOrder not implemented") } func (UnimplementedOrderServiceServer) ProcessProductPriceQuoteEvent(context.Context, *v11.ProductPriceQuoteEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessProductPriceQuoteEvent not implemented") } func (UnimplementedOrderServiceServer) ProcessStockReservationEvent(context.Context, *v11.StockReservationEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessStockReservationEvent not implemented") } func (UnimplementedOrderServiceServer) ProcessShipmentAllocationEvent(context.Context, *v11.ShipmentAllocationEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessShipmentAllocationEvent not implemented") } func (UnimplementedOrderServiceServer) ProcessPaymentProcessedEvent(context.Context, *v11.PaymentProcessedEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessPaymentProcessedEvent 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_ServiceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.ServiceInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ServiceInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ServiceInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ServiceInfo(ctx, req.(*v1.ServiceInfoRequest)) } return interceptor(ctx, in, info, handler) } func _OrderService_ViewOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ViewOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ViewOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ViewOrder(ctx, req.(*ViewOrderRequest)) } return interceptor(ctx, in, info, handler) } func _OrderService_ViewOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewOrdersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ViewOrders(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ViewOrders_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ViewOrders(ctx, req.(*ViewOrdersRequest)) } return interceptor(ctx, in, info, handler) } func _OrderService_PlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PlaceOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).PlaceOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_PlaceOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).PlaceOrder(ctx, req.(*PlaceOrderRequest)) } return interceptor(ctx, in, info, handler) } func _OrderService_ProcessProductPriceQuoteEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.ProductPriceQuoteEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ProcessProductPriceQuoteEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ProcessProductPriceQuoteEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ProcessProductPriceQuoteEvent(ctx, req.(*v11.ProductPriceQuoteEvent)) } return interceptor(ctx, in, info, handler) } func _OrderService_ProcessStockReservationEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.StockReservationEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ProcessStockReservationEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ProcessStockReservationEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ProcessStockReservationEvent(ctx, req.(*v11.StockReservationEvent)) } return interceptor(ctx, in, info, handler) } func _OrderService_ProcessShipmentAllocationEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.ShipmentAllocationEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ProcessShipmentAllocationEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ProcessShipmentAllocationEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ProcessShipmentAllocationEvent(ctx, req.(*v11.ShipmentAllocationEvent)) } return interceptor(ctx, in, info, handler) } func _OrderService_ProcessPaymentProcessedEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.PaymentProcessedEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrderServiceServer).ProcessPaymentProcessedEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrderService_ProcessPaymentProcessedEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrderServiceServer).ProcessPaymentProcessedEvent(ctx, req.(*v11.PaymentProcessedEvent)) } 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: "stocklet.order.v1.OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ServiceInfo", Handler: _OrderService_ServiceInfo_Handler, }, { MethodName: "ViewOrder", Handler: _OrderService_ViewOrder_Handler, }, { MethodName: "ViewOrders", Handler: _OrderService_ViewOrders_Handler, }, { MethodName: "PlaceOrder", Handler: _OrderService_PlaceOrder_Handler, }, { MethodName: "ProcessProductPriceQuoteEvent", Handler: _OrderService_ProcessProductPriceQuoteEvent_Handler, }, { MethodName: "ProcessStockReservationEvent", Handler: _OrderService_ProcessStockReservationEvent_Handler, }, { MethodName: "ProcessShipmentAllocationEvent", Handler: _OrderService_ProcessShipmentAllocationEvent_Handler, }, { MethodName: "ProcessPaymentProcessedEvent", Handler: _OrderService_ProcessPaymentProcessedEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stocklet/order/v1/service.proto", }