Documentation ¶
Overview ¶
Package shipping_v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterShippingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterShippingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShippingServiceClient) error
- func RegisterShippingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterShippingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShippingServiceServer) error
- func RegisterShippingServiceServer(s grpc.ServiceRegistrar, srv ShippingServiceServer)
- type Shipment
- func (*Shipment) Descriptor() ([]byte, []int)deprecated
- func (x *Shipment) GetCreatedAt() int64
- func (x *Shipment) GetDispatched() bool
- func (x *Shipment) GetId() string
- func (x *Shipment) GetOrderId() string
- func (x *Shipment) GetUpdatedAt() int64
- func (*Shipment) ProtoMessage()
- func (x *Shipment) ProtoReflect() protoreflect.Message
- func (x *Shipment) Reset()
- func (x *Shipment) String() string
- type ShipmentItem
- func (*ShipmentItem) Descriptor() ([]byte, []int)deprecated
- func (x *ShipmentItem) GetProductId() string
- func (x *ShipmentItem) GetQuantity() int32
- func (x *ShipmentItem) GetShipmentId() string
- func (*ShipmentItem) ProtoMessage()
- func (x *ShipmentItem) ProtoReflect() protoreflect.Message
- func (x *ShipmentItem) Reset()
- func (x *ShipmentItem) String() string
- type ShippingServiceClient
- type ShippingServiceServer
- type UnimplementedShippingServiceServer
- func (UnimplementedShippingServiceServer) ProcessPaymentProcessedEvent(context.Context, *v11.PaymentProcessedEvent) (*emptypb.Empty, error)
- func (UnimplementedShippingServiceServer) ProcessStockReservationEvent(context.Context, *v11.StockReservationEvent) (*emptypb.Empty, error)
- func (UnimplementedShippingServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error)
- func (UnimplementedShippingServiceServer) ViewShipment(context.Context, *ViewShipmentRequest) (*ViewShipmentResponse, error)
- func (UnimplementedShippingServiceServer) ViewShipmentManifest(context.Context, *ViewShipmentManifestRequest) (*ViewShipmentManifestResponse, error)
- type UnsafeShippingServiceServer
- type ViewShipmentManifestRequest
- func (*ViewShipmentManifestRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ViewShipmentManifestRequest) GetShipmentId() string
- func (*ViewShipmentManifestRequest) ProtoMessage()
- func (x *ViewShipmentManifestRequest) ProtoReflect() protoreflect.Message
- func (x *ViewShipmentManifestRequest) Reset()
- func (x *ViewShipmentManifestRequest) String() string
- type ViewShipmentManifestResponse
- func (*ViewShipmentManifestResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ViewShipmentManifestResponse) GetManifest() []*ShipmentItem
- func (*ViewShipmentManifestResponse) ProtoMessage()
- func (x *ViewShipmentManifestResponse) ProtoReflect() protoreflect.Message
- func (x *ViewShipmentManifestResponse) Reset()
- func (x *ViewShipmentManifestResponse) String() string
- type ViewShipmentRequest
- func (*ViewShipmentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ViewShipmentRequest) GetShipmentId() string
- func (*ViewShipmentRequest) ProtoMessage()
- func (x *ViewShipmentRequest) ProtoReflect() protoreflect.Message
- func (x *ViewShipmentRequest) Reset()
- func (x *ViewShipmentRequest) String() string
- type ViewShipmentResponse
- func (*ViewShipmentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ViewShipmentResponse) GetShipment() *Shipment
- func (*ViewShipmentResponse) ProtoMessage()
- func (x *ViewShipmentResponse) ProtoReflect() protoreflect.Message
- func (x *ViewShipmentResponse) Reset()
- func (x *ViewShipmentResponse) String() string
Constants ¶
const ( ShippingService_ServiceInfo_FullMethodName = "/stocklet.shipping.v1.ShippingService/ServiceInfo" ShippingService_ViewShipment_FullMethodName = "/stocklet.shipping.v1.ShippingService/ViewShipment" ShippingService_ViewShipmentManifest_FullMethodName = "/stocklet.shipping.v1.ShippingService/ViewShipmentManifest" ShippingService_ProcessStockReservationEvent_FullMethodName = "/stocklet.shipping.v1.ShippingService/ProcessStockReservationEvent" ShippingService_ProcessPaymentProcessedEvent_FullMethodName = "/stocklet.shipping.v1.ShippingService/ProcessPaymentProcessedEvent" )
Variables ¶
var File_stocklet_shipping_v1_service_proto protoreflect.FileDescriptor
var File_stocklet_shipping_v1_types_proto protoreflect.FileDescriptor
var ShippingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stocklet.shipping.v1.ShippingService", HandlerType: (*ShippingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ServiceInfo", Handler: _ShippingService_ServiceInfo_Handler, }, { MethodName: "ViewShipment", Handler: _ShippingService_ViewShipment_Handler, }, { MethodName: "ViewShipmentManifest", Handler: _ShippingService_ViewShipmentManifest_Handler, }, { MethodName: "ProcessStockReservationEvent", Handler: _ShippingService_ProcessStockReservationEvent_Handler, }, { MethodName: "ProcessPaymentProcessedEvent", Handler: _ShippingService_ProcessPaymentProcessedEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stocklet/shipping/v1/service.proto", }
ShippingService_ServiceDesc is the grpc.ServiceDesc for ShippingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterShippingServiceHandler ¶
func RegisterShippingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterShippingServiceHandler registers the http handlers for service ShippingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterShippingServiceHandlerClient ¶
func RegisterShippingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShippingServiceClient) error
RegisterShippingServiceHandlerClient registers the http handlers for service ShippingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ShippingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ShippingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ShippingServiceClient" to call the correct interceptors.
func RegisterShippingServiceHandlerFromEndpoint ¶
func RegisterShippingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterShippingServiceHandlerFromEndpoint is same as RegisterShippingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterShippingServiceHandlerServer ¶
func RegisterShippingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShippingServiceServer) error
RegisterShippingServiceHandlerServer registers the http handlers for service ShippingService to "mux". UnaryRPC :call ShippingServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterShippingServiceHandlerFromEndpoint instead.
func RegisterShippingServiceServer ¶
func RegisterShippingServiceServer(s grpc.ServiceRegistrar, srv ShippingServiceServer)
Types ¶
type Shipment ¶
type Shipment struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` Dispatched bool `protobuf:"varint,3,opt,name=dispatched,proto3" json:"dispatched,omitempty"` CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *int64 `protobuf:"varint,6,opt,name=updated_at,json=updatedAt,proto3,oneof" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Shipment) Descriptor
deprecated
func (*Shipment) GetCreatedAt ¶
func (*Shipment) GetDispatched ¶
func (*Shipment) GetOrderId ¶
func (*Shipment) GetUpdatedAt ¶
func (*Shipment) ProtoMessage ¶
func (*Shipment) ProtoMessage()
func (*Shipment) ProtoReflect ¶
func (x *Shipment) ProtoReflect() protoreflect.Message
type ShipmentItem ¶
type ShipmentItem struct { ShipmentId string `protobuf:"bytes,1,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*ShipmentItem) Descriptor
deprecated
func (*ShipmentItem) Descriptor() ([]byte, []int)
Deprecated: Use ShipmentItem.ProtoReflect.Descriptor instead.
func (*ShipmentItem) GetProductId ¶
func (x *ShipmentItem) GetProductId() string
func (*ShipmentItem) GetQuantity ¶
func (x *ShipmentItem) GetQuantity() int32
func (*ShipmentItem) GetShipmentId ¶
func (x *ShipmentItem) GetShipmentId() string
func (*ShipmentItem) ProtoMessage ¶
func (*ShipmentItem) ProtoMessage()
func (*ShipmentItem) ProtoReflect ¶
func (x *ShipmentItem) ProtoReflect() protoreflect.Message
func (*ShipmentItem) Reset ¶
func (x *ShipmentItem) Reset()
func (*ShipmentItem) String ¶
func (x *ShipmentItem) String() string
type ShippingServiceClient ¶
type ShippingServiceClient 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) ViewShipment(ctx context.Context, in *ViewShipmentRequest, opts ...grpc.CallOption) (*ViewShipmentResponse, error) ViewShipmentManifest(ctx context.Context, in *ViewShipmentManifestRequest, opts ...grpc.CallOption) (*ViewShipmentManifestResponse, 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 ProcessPaymentProcessedEvent(ctx context.Context, in *v11.PaymentProcessedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) }
ShippingServiceClient is the client API for ShippingService 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.
func NewShippingServiceClient ¶
func NewShippingServiceClient(cc grpc.ClientConnInterface) ShippingServiceClient
type ShippingServiceServer ¶
type ShippingServiceServer interface { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) ViewShipment(context.Context, *ViewShipmentRequest) (*ViewShipmentResponse, error) ViewShipmentManifest(context.Context, *ViewShipmentManifestRequest) (*ViewShipmentManifestResponse, 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 ProcessPaymentProcessedEvent(context.Context, *v11.PaymentProcessedEvent) (*emptypb.Empty, error) // contains filtered or unexported methods }
ShippingServiceServer is the server API for ShippingService service. All implementations must embed UnimplementedShippingServiceServer for forward compatibility
type UnimplementedShippingServiceServer ¶
type UnimplementedShippingServiceServer struct { }
UnimplementedShippingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedShippingServiceServer) ProcessPaymentProcessedEvent ¶
func (UnimplementedShippingServiceServer) ProcessPaymentProcessedEvent(context.Context, *v11.PaymentProcessedEvent) (*emptypb.Empty, error)
func (UnimplementedShippingServiceServer) ProcessStockReservationEvent ¶
func (UnimplementedShippingServiceServer) ProcessStockReservationEvent(context.Context, *v11.StockReservationEvent) (*emptypb.Empty, error)
func (UnimplementedShippingServiceServer) ServiceInfo ¶
func (UnimplementedShippingServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error)
func (UnimplementedShippingServiceServer) ViewShipment ¶
func (UnimplementedShippingServiceServer) ViewShipment(context.Context, *ViewShipmentRequest) (*ViewShipmentResponse, error)
func (UnimplementedShippingServiceServer) ViewShipmentManifest ¶
func (UnimplementedShippingServiceServer) ViewShipmentManifest(context.Context, *ViewShipmentManifestRequest) (*ViewShipmentManifestResponse, error)
type UnsafeShippingServiceServer ¶
type UnsafeShippingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeShippingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShippingServiceServer will result in compilation errors.
type ViewShipmentManifestRequest ¶
type ViewShipmentManifestRequest struct { ShipmentId string `protobuf:"bytes,1,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"` // contains filtered or unexported fields }
func (*ViewShipmentManifestRequest) Descriptor
deprecated
func (*ViewShipmentManifestRequest) Descriptor() ([]byte, []int)
Deprecated: Use ViewShipmentManifestRequest.ProtoReflect.Descriptor instead.
func (*ViewShipmentManifestRequest) GetShipmentId ¶
func (x *ViewShipmentManifestRequest) GetShipmentId() string
func (*ViewShipmentManifestRequest) ProtoMessage ¶
func (*ViewShipmentManifestRequest) ProtoMessage()
func (*ViewShipmentManifestRequest) ProtoReflect ¶
func (x *ViewShipmentManifestRequest) ProtoReflect() protoreflect.Message
func (*ViewShipmentManifestRequest) Reset ¶
func (x *ViewShipmentManifestRequest) Reset()
func (*ViewShipmentManifestRequest) String ¶
func (x *ViewShipmentManifestRequest) String() string
type ViewShipmentManifestResponse ¶
type ViewShipmentManifestResponse struct { Manifest []*ShipmentItem `protobuf:"bytes,1,rep,name=manifest,proto3" json:"manifest,omitempty"` // contains filtered or unexported fields }
func (*ViewShipmentManifestResponse) Descriptor
deprecated
func (*ViewShipmentManifestResponse) Descriptor() ([]byte, []int)
Deprecated: Use ViewShipmentManifestResponse.ProtoReflect.Descriptor instead.
func (*ViewShipmentManifestResponse) GetManifest ¶
func (x *ViewShipmentManifestResponse) GetManifest() []*ShipmentItem
func (*ViewShipmentManifestResponse) ProtoMessage ¶
func (*ViewShipmentManifestResponse) ProtoMessage()
func (*ViewShipmentManifestResponse) ProtoReflect ¶
func (x *ViewShipmentManifestResponse) ProtoReflect() protoreflect.Message
func (*ViewShipmentManifestResponse) Reset ¶
func (x *ViewShipmentManifestResponse) Reset()
func (*ViewShipmentManifestResponse) String ¶
func (x *ViewShipmentManifestResponse) String() string
type ViewShipmentRequest ¶
type ViewShipmentRequest struct { ShipmentId string `protobuf:"bytes,1,opt,name=shipment_id,json=shipmentId,proto3" json:"shipment_id,omitempty"` // contains filtered or unexported fields }
func (*ViewShipmentRequest) Descriptor
deprecated
func (*ViewShipmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use ViewShipmentRequest.ProtoReflect.Descriptor instead.
func (*ViewShipmentRequest) GetShipmentId ¶
func (x *ViewShipmentRequest) GetShipmentId() string
func (*ViewShipmentRequest) ProtoMessage ¶
func (*ViewShipmentRequest) ProtoMessage()
func (*ViewShipmentRequest) ProtoReflect ¶
func (x *ViewShipmentRequest) ProtoReflect() protoreflect.Message
func (*ViewShipmentRequest) Reset ¶
func (x *ViewShipmentRequest) Reset()
func (*ViewShipmentRequest) String ¶
func (x *ViewShipmentRequest) String() string
type ViewShipmentResponse ¶
type ViewShipmentResponse struct { Shipment *Shipment `protobuf:"bytes,1,opt,name=shipment,proto3" json:"shipment,omitempty"` // contains filtered or unexported fields }
func (*ViewShipmentResponse) Descriptor
deprecated
func (*ViewShipmentResponse) Descriptor() ([]byte, []int)
Deprecated: Use ViewShipmentResponse.ProtoReflect.Descriptor instead.
func (*ViewShipmentResponse) GetShipment ¶
func (x *ViewShipmentResponse) GetShipment() *Shipment
func (*ViewShipmentResponse) ProtoMessage ¶
func (*ViewShipmentResponse) ProtoMessage()
func (*ViewShipmentResponse) ProtoReflect ¶
func (x *ViewShipmentResponse) ProtoReflect() protoreflect.Message
func (*ViewShipmentResponse) Reset ¶
func (x *ViewShipmentResponse) Reset()
func (*ViewShipmentResponse) String ¶
func (x *ViewShipmentResponse) String() string