Documentation ¶
Overview ¶
Package orderingpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterOrderingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOrderingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderingServiceClient) error
- func RegisterOrderingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOrderingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderingServiceServer) error
- func RegisterOrderingServiceServer(s grpc.ServiceRegistrar, srv OrderingServiceServer)
- func Registrations(reg registry.Registry) (err error)
- type ApproveOrder
- func (*ApproveOrder) Descriptor() ([]byte, []int)deprecated
- func (x *ApproveOrder) GetId() string
- func (x *ApproveOrder) GetShoppingId() string
- func (*ApproveOrder) Key() string
- func (*ApproveOrder) ProtoMessage()
- func (x *ApproveOrder) ProtoReflect() protoreflect.Message
- func (x *ApproveOrder) Reset()
- func (x *ApproveOrder) String() string
- type CancelOrderRequest
- type CancelOrderResponse
- type CompleteOrderRequest
- func (*CompleteOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompleteOrderRequest) GetId() string
- func (x *CompleteOrderRequest) GetInvoiceId() string
- func (*CompleteOrderRequest) ProtoMessage()
- func (x *CompleteOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CompleteOrderRequest) Reset()
- func (x *CompleteOrderRequest) String() string
- type CompleteOrderResponse
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetCustomerId() string
- func (x *CreateOrderRequest) GetItems() []*Item
- func (x *CreateOrderRequest) GetPaymentId() string
- func (*CreateOrderRequest) ProtoMessage()
- func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequest) Reset()
- func (x *CreateOrderRequest) String() string
- type CreateOrderResponse
- func (*CreateOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderResponse) GetId() string
- func (*CreateOrderResponse) ProtoMessage()
- func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
- func (x *CreateOrderResponse) Reset()
- func (x *CreateOrderResponse) String() string
- type GetOrderRequest
- type GetOrderResponse
- type Item
- func (*Item) Descriptor() ([]byte, []int)deprecated
- func (x *Item) GetPrice() float64
- func (x *Item) GetProductId() string
- func (x *Item) GetProductName() string
- func (x *Item) GetQuantity() int32
- func (x *Item) GetStoreId() string
- func (x *Item) GetStoreName() string
- func (*Item) ProtoMessage()
- func (x *Item) ProtoReflect() protoreflect.Message
- func (x *Item) Reset()
- func (x *Item) String() string
- type MockOrderingServiceClient
- func (_m *MockOrderingServiceClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*CancelOrderResponse, error)
- func (_m *MockOrderingServiceClient) CompleteOrder(ctx context.Context, in *CompleteOrderRequest, opts ...grpc.CallOption) (*CompleteOrderResponse, error)
- func (_m *MockOrderingServiceClient) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error)
- func (_m *MockOrderingServiceClient) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*GetOrderResponse, error)
- func (_m *MockOrderingServiceClient) ReadyOrder(ctx context.Context, in *ReadyOrderRequest, opts ...grpc.CallOption) (*ReadyOrderResponse, error)
- type MockOrderingServiceServer
- func (_m *MockOrderingServiceServer) CancelOrder(_a0 context.Context, _a1 *CancelOrderRequest) (*CancelOrderResponse, error)
- func (_m *MockOrderingServiceServer) CompleteOrder(_a0 context.Context, _a1 *CompleteOrderRequest) (*CompleteOrderResponse, error)
- func (_m *MockOrderingServiceServer) CreateOrder(_a0 context.Context, _a1 *CreateOrderRequest) (*CreateOrderResponse, error)
- func (_m *MockOrderingServiceServer) GetOrder(_a0 context.Context, _a1 *GetOrderRequest) (*GetOrderResponse, error)
- func (_m *MockOrderingServiceServer) ReadyOrder(_a0 context.Context, _a1 *ReadyOrderRequest) (*ReadyOrderResponse, error)
- type MockUnsafeOrderingServiceServer
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCustomerId() string
- func (x *Order) GetId() string
- func (x *Order) GetItems() []*Item
- func (x *Order) GetPaymentId() string
- func (x *Order) GetStatus() string
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderApproved
- func (*OrderApproved) Descriptor() ([]byte, []int)deprecated
- func (x *OrderApproved) GetCustomerId() string
- func (x *OrderApproved) GetId() string
- func (x *OrderApproved) GetPaymentId() string
- func (*OrderApproved) Key() string
- func (*OrderApproved) ProtoMessage()
- func (x *OrderApproved) ProtoReflect() protoreflect.Message
- func (x *OrderApproved) Reset()
- func (x *OrderApproved) String() string
- type OrderCanceled
- func (*OrderCanceled) Descriptor() ([]byte, []int)deprecated
- func (x *OrderCanceled) GetCustomerId() string
- func (x *OrderCanceled) GetId() string
- func (x *OrderCanceled) GetPaymentId() string
- func (*OrderCanceled) Key() string
- func (*OrderCanceled) ProtoMessage()
- func (x *OrderCanceled) ProtoReflect() protoreflect.Message
- func (x *OrderCanceled) Reset()
- func (x *OrderCanceled) String() string
- type OrderCompleted
- func (*OrderCompleted) Descriptor() ([]byte, []int)deprecated
- func (x *OrderCompleted) GetCustomerId() string
- func (x *OrderCompleted) GetId() string
- func (x *OrderCompleted) GetInvoiceId() string
- func (*OrderCompleted) Key() string
- func (*OrderCompleted) ProtoMessage()
- func (x *OrderCompleted) ProtoReflect() protoreflect.Message
- func (x *OrderCompleted) Reset()
- func (x *OrderCompleted) String() string
- type OrderCreated
- func (*OrderCreated) Descriptor() ([]byte, []int)deprecated
- func (x *OrderCreated) GetCustomerId() string
- func (x *OrderCreated) GetId() string
- func (x *OrderCreated) GetItems() []*OrderCreated_Item
- func (x *OrderCreated) GetPaymentId() string
- func (x *OrderCreated) GetShoppingId() string
- func (*OrderCreated) Key() string
- func (*OrderCreated) ProtoMessage()
- func (x *OrderCreated) ProtoReflect() protoreflect.Message
- func (x *OrderCreated) Reset()
- func (x *OrderCreated) String() string
- type OrderCreated_Item
- func (*OrderCreated_Item) Descriptor() ([]byte, []int)deprecated
- func (x *OrderCreated_Item) GetPrice() float64
- func (x *OrderCreated_Item) GetProductId() string
- func (x *OrderCreated_Item) GetQuantity() int32
- func (x *OrderCreated_Item) GetStoreId() string
- func (*OrderCreated_Item) ProtoMessage()
- func (x *OrderCreated_Item) ProtoReflect() protoreflect.Message
- func (x *OrderCreated_Item) Reset()
- func (x *OrderCreated_Item) String() string
- type OrderReadied
- func (*OrderReadied) Descriptor() ([]byte, []int)deprecated
- func (x *OrderReadied) GetCustomerId() string
- func (x *OrderReadied) GetId() string
- func (x *OrderReadied) GetPaymentId() string
- func (x *OrderReadied) GetTotal() float64
- func (*OrderReadied) Key() string
- func (*OrderReadied) ProtoMessage()
- func (x *OrderReadied) ProtoReflect() protoreflect.Message
- func (x *OrderReadied) Reset()
- func (x *OrderReadied) String() string
- type OrderRejected
- func (*OrderRejected) Descriptor() ([]byte, []int)deprecated
- func (x *OrderRejected) GetCustomerId() string
- func (x *OrderRejected) GetId() string
- func (x *OrderRejected) GetPaymentId() string
- func (*OrderRejected) Key() string
- func (*OrderRejected) ProtoMessage()
- func (x *OrderRejected) ProtoReflect() protoreflect.Message
- func (x *OrderRejected) Reset()
- func (x *OrderRejected) String() string
- type OrderingServiceClient
- type OrderingServiceServer
- type ReadyOrderRequest
- type ReadyOrderResponse
- type RejectOrder
- type UnimplementedOrderingServiceServer
- func (UnimplementedOrderingServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*CancelOrderResponse, error)
- func (UnimplementedOrderingServiceServer) CompleteOrder(context.Context, *CompleteOrderRequest) (*CompleteOrderResponse, error)
- func (UnimplementedOrderingServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
- func (UnimplementedOrderingServiceServer) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error)
- func (UnimplementedOrderingServiceServer) ReadyOrder(context.Context, *ReadyOrderRequest) (*ReadyOrderResponse, error)
- type UnsafeOrderingServiceServer
Constants ¶
const ( OrderAggregateChannel = "intellimall.ordering.events.Order" OrderCreatedEvent = "ordersapi.OrderCreated" OrderRejectedEvent = "ordersapi.OrderRejected" OrderApprovedEvent = "ordersapi.OrderApproved" OrderReadiedEvent = "ordersapi.OrderReadied" OrderCanceledEvent = "ordersapi.OrderCanceled" OrderCompletedEvent = "ordersapi.OrderCompleted" CommandChannel = "intellimall.ordering.commands" RejectOrderCommand = "ordersapi.RejectOrder" ApproveOrderCommand = "ordersapi.ApproveOrder" )
Variables ¶
var File_orderingpb_api_proto protoreflect.FileDescriptor
var File_orderingpb_messages_proto protoreflect.FileDescriptor
var OrderingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "orderingpb.OrderingService", HandlerType: (*OrderingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateOrder", Handler: _OrderingService_CreateOrder_Handler, }, { MethodName: "GetOrder", Handler: _OrderingService_GetOrder_Handler, }, { MethodName: "CancelOrder", Handler: _OrderingService_CancelOrder_Handler, }, { MethodName: "ReadyOrder", Handler: _OrderingService_ReadyOrder_Handler, }, { MethodName: "CompleteOrder", Handler: _OrderingService_CompleteOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "orderingpb/api.proto", }
OrderingService_ServiceDesc is the grpc.ServiceDesc for OrderingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrderingServiceHandler ¶
func RegisterOrderingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOrderingServiceHandler registers the http handlers for service OrderingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrderingServiceHandlerClient ¶
func RegisterOrderingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderingServiceClient) error
RegisterOrderingServiceHandlerClient registers the http handlers for service OrderingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrderingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrderingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OrderingServiceClient" to call the correct interceptors.
func RegisterOrderingServiceHandlerFromEndpoint ¶
func RegisterOrderingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOrderingServiceHandlerFromEndpoint is same as RegisterOrderingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrderingServiceHandlerServer ¶
func RegisterOrderingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderingServiceServer) error
RegisterOrderingServiceHandlerServer registers the http handlers for service OrderingService to "mux". UnaryRPC :call OrderingServiceServer 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 RegisterOrderingServiceHandlerFromEndpoint instead.
func RegisterOrderingServiceServer ¶
func RegisterOrderingServiceServer(s grpc.ServiceRegistrar, srv OrderingServiceServer)
func Registrations ¶
Types ¶
type ApproveOrder ¶
type ApproveOrder struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ShoppingId string `protobuf:"bytes,2,opt,name=shopping_id,json=shoppingId,proto3" json:"shopping_id,omitempty"` // contains filtered or unexported fields }
func (*ApproveOrder) Descriptor
deprecated
func (*ApproveOrder) Descriptor() ([]byte, []int)
Deprecated: Use ApproveOrder.ProtoReflect.Descriptor instead.
func (*ApproveOrder) GetId ¶
func (x *ApproveOrder) GetId() string
func (*ApproveOrder) GetShoppingId ¶
func (x *ApproveOrder) GetShoppingId() string
func (*ApproveOrder) Key ¶
func (*ApproveOrder) Key() string
func (*ApproveOrder) ProtoMessage ¶
func (*ApproveOrder) ProtoMessage()
func (*ApproveOrder) ProtoReflect ¶
func (x *ApproveOrder) ProtoReflect() protoreflect.Message
func (*ApproveOrder) Reset ¶
func (x *ApproveOrder) Reset()
func (*ApproveOrder) String ¶
func (x *ApproveOrder) String() string
type CancelOrderRequest ¶
type CancelOrderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CancelOrderRequest) Descriptor
deprecated
func (*CancelOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelOrderRequest.ProtoReflect.Descriptor instead.
func (*CancelOrderRequest) GetId ¶
func (x *CancelOrderRequest) GetId() string
func (*CancelOrderRequest) ProtoMessage ¶
func (*CancelOrderRequest) ProtoMessage()
func (*CancelOrderRequest) ProtoReflect ¶
func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message
func (*CancelOrderRequest) Reset ¶
func (x *CancelOrderRequest) Reset()
func (*CancelOrderRequest) String ¶
func (x *CancelOrderRequest) String() string
type CancelOrderResponse ¶
type CancelOrderResponse struct {
// contains filtered or unexported fields
}
func (*CancelOrderResponse) Descriptor
deprecated
func (*CancelOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CancelOrderResponse.ProtoReflect.Descriptor instead.
func (*CancelOrderResponse) ProtoMessage ¶
func (*CancelOrderResponse) ProtoMessage()
func (*CancelOrderResponse) ProtoReflect ¶
func (x *CancelOrderResponse) ProtoReflect() protoreflect.Message
func (*CancelOrderResponse) Reset ¶
func (x *CancelOrderResponse) Reset()
func (*CancelOrderResponse) String ¶
func (x *CancelOrderResponse) String() string
type CompleteOrderRequest ¶
type CompleteOrderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` InvoiceId string `protobuf:"bytes,2,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"` // contains filtered or unexported fields }
func (*CompleteOrderRequest) Descriptor
deprecated
func (*CompleteOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompleteOrderRequest.ProtoReflect.Descriptor instead.
func (*CompleteOrderRequest) GetId ¶
func (x *CompleteOrderRequest) GetId() string
func (*CompleteOrderRequest) GetInvoiceId ¶
func (x *CompleteOrderRequest) GetInvoiceId() string
func (*CompleteOrderRequest) ProtoMessage ¶
func (*CompleteOrderRequest) ProtoMessage()
func (*CompleteOrderRequest) ProtoReflect ¶
func (x *CompleteOrderRequest) ProtoReflect() protoreflect.Message
func (*CompleteOrderRequest) Reset ¶
func (x *CompleteOrderRequest) Reset()
func (*CompleteOrderRequest) String ¶
func (x *CompleteOrderRequest) String() string
type CompleteOrderResponse ¶
type CompleteOrderResponse struct {
// contains filtered or unexported fields
}
func (*CompleteOrderResponse) Descriptor
deprecated
func (*CompleteOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompleteOrderResponse.ProtoReflect.Descriptor instead.
func (*CompleteOrderResponse) ProtoMessage ¶
func (*CompleteOrderResponse) ProtoMessage()
func (*CompleteOrderResponse) ProtoReflect ¶
func (x *CompleteOrderResponse) ProtoReflect() protoreflect.Message
func (*CompleteOrderResponse) Reset ¶
func (x *CompleteOrderResponse) Reset()
func (*CompleteOrderResponse) String ¶
func (x *CompleteOrderResponse) String() string
type CreateOrderRequest ¶
type CreateOrderRequest struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetCustomerId ¶
func (x *CreateOrderRequest) GetCustomerId() string
func (*CreateOrderRequest) GetItems ¶
func (x *CreateOrderRequest) GetItems() []*Item
func (*CreateOrderRequest) GetPaymentId ¶
func (x *CreateOrderRequest) GetPaymentId() string
func (*CreateOrderRequest) ProtoMessage ¶
func (*CreateOrderRequest) ProtoMessage()
func (*CreateOrderRequest) ProtoReflect ¶
func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
func (*CreateOrderRequest) Reset ¶
func (x *CreateOrderRequest) Reset()
func (*CreateOrderRequest) String ¶
func (x *CreateOrderRequest) String() string
type CreateOrderResponse ¶
type CreateOrderResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderResponse) Descriptor
deprecated
func (*CreateOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.
func (*CreateOrderResponse) GetId ¶
func (x *CreateOrderResponse) GetId() string
func (*CreateOrderResponse) ProtoMessage ¶
func (*CreateOrderResponse) ProtoMessage()
func (*CreateOrderResponse) ProtoReflect ¶
func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
func (*CreateOrderResponse) Reset ¶
func (x *CreateOrderResponse) Reset()
func (*CreateOrderResponse) String ¶
func (x *CreateOrderResponse) String() string
type GetOrderRequest ¶
type GetOrderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetOrderRequest) Descriptor
deprecated
func (*GetOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderRequest.ProtoReflect.Descriptor instead.
func (*GetOrderRequest) GetId ¶
func (x *GetOrderRequest) GetId() string
func (*GetOrderRequest) ProtoMessage ¶
func (*GetOrderRequest) ProtoMessage()
func (*GetOrderRequest) ProtoReflect ¶
func (x *GetOrderRequest) ProtoReflect() protoreflect.Message
func (*GetOrderRequest) Reset ¶
func (x *GetOrderRequest) Reset()
func (*GetOrderRequest) String ¶
func (x *GetOrderRequest) String() string
type GetOrderResponse ¶
type GetOrderResponse struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*GetOrderResponse) Descriptor
deprecated
func (*GetOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderResponse.ProtoReflect.Descriptor instead.
func (*GetOrderResponse) GetOrder ¶
func (x *GetOrderResponse) GetOrder() *Order
func (*GetOrderResponse) ProtoMessage ¶
func (*GetOrderResponse) ProtoMessage()
func (*GetOrderResponse) ProtoReflect ¶
func (x *GetOrderResponse) ProtoReflect() protoreflect.Message
func (*GetOrderResponse) Reset ¶
func (x *GetOrderResponse) Reset()
func (*GetOrderResponse) String ¶
func (x *GetOrderResponse) String() string
type Item ¶
type Item struct { StoreId string `protobuf:"bytes,1,opt,name=store_id,json=storeId,proto3" json:"store_id,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` StoreName string `protobuf:"bytes,3,opt,name=store_name,json=storeName,proto3" json:"store_name,omitempty"` ProductName string `protobuf:"bytes,4,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"` Price float64 `protobuf:"fixed64,5,opt,name=price,proto3" json:"price,omitempty"` Quantity int32 `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetProductId ¶
func (*Item) GetProductName ¶
func (*Item) GetQuantity ¶
func (*Item) GetStoreId ¶
func (*Item) GetStoreName ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type MockOrderingServiceClient ¶
MockOrderingServiceClient is an autogenerated mock type for the OrderingServiceClient type
func NewMockOrderingServiceClient ¶
func NewMockOrderingServiceClient(t mockConstructorTestingTNewMockOrderingServiceClient) *MockOrderingServiceClient
NewMockOrderingServiceClient creates a new instance of MockOrderingServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockOrderingServiceClient) CancelOrder ¶
func (_m *MockOrderingServiceClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*CancelOrderResponse, error)
CancelOrder provides a mock function with given fields: ctx, in, opts
func (*MockOrderingServiceClient) CompleteOrder ¶
func (_m *MockOrderingServiceClient) CompleteOrder(ctx context.Context, in *CompleteOrderRequest, opts ...grpc.CallOption) (*CompleteOrderResponse, error)
CompleteOrder provides a mock function with given fields: ctx, in, opts
func (*MockOrderingServiceClient) CreateOrder ¶
func (_m *MockOrderingServiceClient) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error)
CreateOrder provides a mock function with given fields: ctx, in, opts
func (*MockOrderingServiceClient) GetOrder ¶
func (_m *MockOrderingServiceClient) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*GetOrderResponse, error)
GetOrder provides a mock function with given fields: ctx, in, opts
func (*MockOrderingServiceClient) ReadyOrder ¶
func (_m *MockOrderingServiceClient) ReadyOrder(ctx context.Context, in *ReadyOrderRequest, opts ...grpc.CallOption) (*ReadyOrderResponse, error)
ReadyOrder provides a mock function with given fields: ctx, in, opts
type MockOrderingServiceServer ¶
MockOrderingServiceServer is an autogenerated mock type for the OrderingServiceServer type
func NewMockOrderingServiceServer ¶
func NewMockOrderingServiceServer(t mockConstructorTestingTNewMockOrderingServiceServer) *MockOrderingServiceServer
NewMockOrderingServiceServer creates a new instance of MockOrderingServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockOrderingServiceServer) CancelOrder ¶
func (_m *MockOrderingServiceServer) CancelOrder(_a0 context.Context, _a1 *CancelOrderRequest) (*CancelOrderResponse, error)
CancelOrder provides a mock function with given fields: _a0, _a1
func (*MockOrderingServiceServer) CompleteOrder ¶
func (_m *MockOrderingServiceServer) CompleteOrder(_a0 context.Context, _a1 *CompleteOrderRequest) (*CompleteOrderResponse, error)
CompleteOrder provides a mock function with given fields: _a0, _a1
func (*MockOrderingServiceServer) CreateOrder ¶
func (_m *MockOrderingServiceServer) CreateOrder(_a0 context.Context, _a1 *CreateOrderRequest) (*CreateOrderResponse, error)
CreateOrder provides a mock function with given fields: _a0, _a1
func (*MockOrderingServiceServer) GetOrder ¶
func (_m *MockOrderingServiceServer) GetOrder(_a0 context.Context, _a1 *GetOrderRequest) (*GetOrderResponse, error)
GetOrder provides a mock function with given fields: _a0, _a1
func (*MockOrderingServiceServer) ReadyOrder ¶
func (_m *MockOrderingServiceServer) ReadyOrder(_a0 context.Context, _a1 *ReadyOrderRequest) (*ReadyOrderResponse, error)
ReadyOrder provides a mock function with given fields: _a0, _a1
type MockUnsafeOrderingServiceServer ¶
MockUnsafeOrderingServiceServer is an autogenerated mock type for the UnsafeOrderingServiceServer type
func NewMockUnsafeOrderingServiceServer ¶
func NewMockUnsafeOrderingServiceServer(t mockConstructorTestingTNewMockUnsafeOrderingServiceServer) *MockUnsafeOrderingServiceServer
NewMockUnsafeOrderingServiceServer creates a new instance of MockUnsafeOrderingServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type Order ¶
type Order struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` Items []*Item `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetCustomerId ¶
func (*Order) GetPaymentId ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderApproved ¶
type OrderApproved struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // contains filtered or unexported fields }
func (*OrderApproved) Descriptor
deprecated
func (*OrderApproved) Descriptor() ([]byte, []int)
Deprecated: Use OrderApproved.ProtoReflect.Descriptor instead.
func (*OrderApproved) GetCustomerId ¶
func (x *OrderApproved) GetCustomerId() string
func (*OrderApproved) GetId ¶
func (x *OrderApproved) GetId() string
func (*OrderApproved) GetPaymentId ¶
func (x *OrderApproved) GetPaymentId() string
func (*OrderApproved) Key ¶
func (*OrderApproved) Key() string
func (*OrderApproved) ProtoMessage ¶
func (*OrderApproved) ProtoMessage()
func (*OrderApproved) ProtoReflect ¶
func (x *OrderApproved) ProtoReflect() protoreflect.Message
func (*OrderApproved) Reset ¶
func (x *OrderApproved) Reset()
func (*OrderApproved) String ¶
func (x *OrderApproved) String() string
type OrderCanceled ¶
type OrderCanceled struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // contains filtered or unexported fields }
func (*OrderCanceled) Descriptor
deprecated
func (*OrderCanceled) Descriptor() ([]byte, []int)
Deprecated: Use OrderCanceled.ProtoReflect.Descriptor instead.
func (*OrderCanceled) GetCustomerId ¶
func (x *OrderCanceled) GetCustomerId() string
func (*OrderCanceled) GetId ¶
func (x *OrderCanceled) GetId() string
func (*OrderCanceled) GetPaymentId ¶
func (x *OrderCanceled) GetPaymentId() string
func (*OrderCanceled) Key ¶
func (*OrderCanceled) Key() string
func (*OrderCanceled) ProtoMessage ¶
func (*OrderCanceled) ProtoMessage()
func (*OrderCanceled) ProtoReflect ¶
func (x *OrderCanceled) ProtoReflect() protoreflect.Message
func (*OrderCanceled) Reset ¶
func (x *OrderCanceled) Reset()
func (*OrderCanceled) String ¶
func (x *OrderCanceled) String() string
type OrderCompleted ¶
type OrderCompleted struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` InvoiceId string `protobuf:"bytes,3,opt,name=invoice_id,json=invoiceId,proto3" json:"invoice_id,omitempty"` // contains filtered or unexported fields }
func (*OrderCompleted) Descriptor
deprecated
func (*OrderCompleted) Descriptor() ([]byte, []int)
Deprecated: Use OrderCompleted.ProtoReflect.Descriptor instead.
func (*OrderCompleted) GetCustomerId ¶
func (x *OrderCompleted) GetCustomerId() string
func (*OrderCompleted) GetId ¶
func (x *OrderCompleted) GetId() string
func (*OrderCompleted) GetInvoiceId ¶
func (x *OrderCompleted) GetInvoiceId() string
func (*OrderCompleted) Key ¶
func (*OrderCompleted) Key() string
func (*OrderCompleted) ProtoMessage ¶
func (*OrderCompleted) ProtoMessage()
func (*OrderCompleted) ProtoReflect ¶
func (x *OrderCompleted) ProtoReflect() protoreflect.Message
func (*OrderCompleted) Reset ¶
func (x *OrderCompleted) Reset()
func (*OrderCompleted) String ¶
func (x *OrderCompleted) String() string
type OrderCreated ¶
type OrderCreated struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` ShoppingId string `protobuf:"bytes,4,opt,name=shopping_id,json=shoppingId,proto3" json:"shopping_id,omitempty"` Items []*OrderCreated_Item `protobuf:"bytes,5,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*OrderCreated) Descriptor
deprecated
func (*OrderCreated) Descriptor() ([]byte, []int)
Deprecated: Use OrderCreated.ProtoReflect.Descriptor instead.
func (*OrderCreated) GetCustomerId ¶
func (x *OrderCreated) GetCustomerId() string
func (*OrderCreated) GetId ¶
func (x *OrderCreated) GetId() string
func (*OrderCreated) GetItems ¶
func (x *OrderCreated) GetItems() []*OrderCreated_Item
func (*OrderCreated) GetPaymentId ¶
func (x *OrderCreated) GetPaymentId() string
func (*OrderCreated) GetShoppingId ¶
func (x *OrderCreated) GetShoppingId() string
func (*OrderCreated) Key ¶
func (*OrderCreated) Key() string
func (*OrderCreated) ProtoMessage ¶
func (*OrderCreated) ProtoMessage()
func (*OrderCreated) ProtoReflect ¶
func (x *OrderCreated) ProtoReflect() protoreflect.Message
func (*OrderCreated) Reset ¶
func (x *OrderCreated) Reset()
func (*OrderCreated) String ¶
func (x *OrderCreated) String() string
type OrderCreated_Item ¶
type OrderCreated_Item struct { ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` StoreId string `protobuf:"bytes,2,opt,name=store_id,json=storeId,proto3" json:"store_id,omitempty"` Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*OrderCreated_Item) Descriptor
deprecated
func (*OrderCreated_Item) Descriptor() ([]byte, []int)
Deprecated: Use OrderCreated_Item.ProtoReflect.Descriptor instead.
func (*OrderCreated_Item) GetPrice ¶
func (x *OrderCreated_Item) GetPrice() float64
func (*OrderCreated_Item) GetProductId ¶
func (x *OrderCreated_Item) GetProductId() string
func (*OrderCreated_Item) GetQuantity ¶
func (x *OrderCreated_Item) GetQuantity() int32
func (*OrderCreated_Item) GetStoreId ¶
func (x *OrderCreated_Item) GetStoreId() string
func (*OrderCreated_Item) ProtoMessage ¶
func (*OrderCreated_Item) ProtoMessage()
func (*OrderCreated_Item) ProtoReflect ¶
func (x *OrderCreated_Item) ProtoReflect() protoreflect.Message
func (*OrderCreated_Item) Reset ¶
func (x *OrderCreated_Item) Reset()
func (*OrderCreated_Item) String ¶
func (x *OrderCreated_Item) String() string
type OrderReadied ¶
type OrderReadied struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` Total float64 `protobuf:"fixed64,4,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*OrderReadied) Descriptor
deprecated
func (*OrderReadied) Descriptor() ([]byte, []int)
Deprecated: Use OrderReadied.ProtoReflect.Descriptor instead.
func (*OrderReadied) GetCustomerId ¶
func (x *OrderReadied) GetCustomerId() string
func (*OrderReadied) GetId ¶
func (x *OrderReadied) GetId() string
func (*OrderReadied) GetPaymentId ¶
func (x *OrderReadied) GetPaymentId() string
func (*OrderReadied) GetTotal ¶
func (x *OrderReadied) GetTotal() float64
func (*OrderReadied) Key ¶
func (*OrderReadied) Key() string
func (*OrderReadied) ProtoMessage ¶
func (*OrderReadied) ProtoMessage()
func (*OrderReadied) ProtoReflect ¶
func (x *OrderReadied) ProtoReflect() protoreflect.Message
func (*OrderReadied) Reset ¶
func (x *OrderReadied) Reset()
func (*OrderReadied) String ¶
func (x *OrderReadied) String() string
type OrderRejected ¶
type OrderRejected struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` PaymentId string `protobuf:"bytes,3,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` // contains filtered or unexported fields }
func (*OrderRejected) Descriptor
deprecated
func (*OrderRejected) Descriptor() ([]byte, []int)
Deprecated: Use OrderRejected.ProtoReflect.Descriptor instead.
func (*OrderRejected) GetCustomerId ¶
func (x *OrderRejected) GetCustomerId() string
func (*OrderRejected) GetId ¶
func (x *OrderRejected) GetId() string
func (*OrderRejected) GetPaymentId ¶
func (x *OrderRejected) GetPaymentId() string
func (*OrderRejected) Key ¶
func (*OrderRejected) Key() string
func (*OrderRejected) ProtoMessage ¶
func (*OrderRejected) ProtoMessage()
func (*OrderRejected) ProtoReflect ¶
func (x *OrderRejected) ProtoReflect() protoreflect.Message
func (*OrderRejected) Reset ¶
func (x *OrderRejected) Reset()
func (*OrderRejected) String ¶
func (x *OrderRejected) String() string
type OrderingServiceClient ¶
type OrderingServiceClient interface { CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*GetOrderResponse, error) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*CancelOrderResponse, error) ReadyOrder(ctx context.Context, in *ReadyOrderRequest, opts ...grpc.CallOption) (*ReadyOrderResponse, error) CompleteOrder(ctx context.Context, in *CompleteOrderRequest, opts ...grpc.CallOption) (*CompleteOrderResponse, error) }
OrderingServiceClient is the client API for OrderingService 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 NewOrderingServiceClient ¶
func NewOrderingServiceClient(cc grpc.ClientConnInterface) OrderingServiceClient
type OrderingServiceServer ¶
type OrderingServiceServer interface { CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error) CancelOrder(context.Context, *CancelOrderRequest) (*CancelOrderResponse, error) ReadyOrder(context.Context, *ReadyOrderRequest) (*ReadyOrderResponse, error) CompleteOrder(context.Context, *CompleteOrderRequest) (*CompleteOrderResponse, error) // contains filtered or unexported methods }
OrderingServiceServer is the server API for OrderingService service. All implementations must embed UnimplementedOrderingServiceServer for forward compatibility
type ReadyOrderRequest ¶
type ReadyOrderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ReadyOrderRequest) Descriptor
deprecated
func (*ReadyOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadyOrderRequest.ProtoReflect.Descriptor instead.
func (*ReadyOrderRequest) GetId ¶
func (x *ReadyOrderRequest) GetId() string
func (*ReadyOrderRequest) ProtoMessage ¶
func (*ReadyOrderRequest) ProtoMessage()
func (*ReadyOrderRequest) ProtoReflect ¶
func (x *ReadyOrderRequest) ProtoReflect() protoreflect.Message
func (*ReadyOrderRequest) Reset ¶
func (x *ReadyOrderRequest) Reset()
func (*ReadyOrderRequest) String ¶
func (x *ReadyOrderRequest) String() string
type ReadyOrderResponse ¶
type ReadyOrderResponse struct {
// contains filtered or unexported fields
}
func (*ReadyOrderResponse) Descriptor
deprecated
func (*ReadyOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadyOrderResponse.ProtoReflect.Descriptor instead.
func (*ReadyOrderResponse) ProtoMessage ¶
func (*ReadyOrderResponse) ProtoMessage()
func (*ReadyOrderResponse) ProtoReflect ¶
func (x *ReadyOrderResponse) ProtoReflect() protoreflect.Message
func (*ReadyOrderResponse) Reset ¶
func (x *ReadyOrderResponse) Reset()
func (*ReadyOrderResponse) String ¶
func (x *ReadyOrderResponse) String() string
type RejectOrder ¶
type RejectOrder struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*RejectOrder) Descriptor
deprecated
func (*RejectOrder) Descriptor() ([]byte, []int)
Deprecated: Use RejectOrder.ProtoReflect.Descriptor instead.
func (*RejectOrder) GetId ¶
func (x *RejectOrder) GetId() string
func (*RejectOrder) Key ¶
func (*RejectOrder) Key() string
func (*RejectOrder) ProtoMessage ¶
func (*RejectOrder) ProtoMessage()
func (*RejectOrder) ProtoReflect ¶
func (x *RejectOrder) ProtoReflect() protoreflect.Message
func (*RejectOrder) Reset ¶
func (x *RejectOrder) Reset()
func (*RejectOrder) String ¶
func (x *RejectOrder) String() string
type UnimplementedOrderingServiceServer ¶
type UnimplementedOrderingServiceServer struct { }
UnimplementedOrderingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOrderingServiceServer) CancelOrder ¶
func (UnimplementedOrderingServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*CancelOrderResponse, error)
func (UnimplementedOrderingServiceServer) CompleteOrder ¶
func (UnimplementedOrderingServiceServer) CompleteOrder(context.Context, *CompleteOrderRequest) (*CompleteOrderResponse, error)
func (UnimplementedOrderingServiceServer) CreateOrder ¶
func (UnimplementedOrderingServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
func (UnimplementedOrderingServiceServer) GetOrder ¶
func (UnimplementedOrderingServiceServer) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error)
func (UnimplementedOrderingServiceServer) ReadyOrder ¶
func (UnimplementedOrderingServiceServer) ReadyOrder(context.Context, *ReadyOrderRequest) (*ReadyOrderResponse, error)
type UnsafeOrderingServiceServer ¶
type UnsafeOrderingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOrderingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderingServiceServer will result in compilation errors.