Documentation ¶
Index ¶
- Variables
- func CheckPermissions(ctx context.Context, req *pb.Order) error
- type MarketService
- type Marketplace
- func (m *Marketplace) CancelOrder(ctx context.Context, req *pb.Order) (*pb.Empty, error)
- func (m *Marketplace) CreateOrder(ctx context.Context, req *pb.Order) (*pb.Order, error)
- func (m *Marketplace) GetOrderByID(ctx context.Context, req *pb.ID) (*pb.Order, error)
- func (m *Marketplace) GetOrders(ctx context.Context, req *pb.GetOrdersRequest) (*pb.GetOrdersReply, error)
- func (m *Marketplace) GetProcessing(ctx context.Context, req *pb.Empty) (*pb.GetProcessingReply, error)
- func (m *Marketplace) TouchOrders(ctx context.Context, req *pb.TouchOrdersRequest) (*pb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
var IDGenerator = func() string { return uuid.New() }
IDGenerator generates command IDs. Function is used to ease mocking.
Functions ¶
Types ¶
type MarketService ¶
type Marketplace ¶
type Marketplace struct {
// contains filtered or unexported fields
}
Marketplace a GRPC Server implementing Marketplace API.
func NewMarketplace ¶
func NewMarketplace(marketService MarketService) *Marketplace
NewMarketplace creates a new instance of Marketplace.
func (*Marketplace) CancelOrder ¶
CancelOrder removes the given order from the storage.
func (*Marketplace) CreateOrder ¶
CreateOrder creates an order.
func (*Marketplace) GetOrderByID ¶
GetOrderByID retrieves order information by order id.
func (*Marketplace) GetOrders ¶
func (m *Marketplace) GetOrders(ctx context.Context, req *pb.GetOrdersRequest) (*pb.GetOrdersReply, error)
GetOrders retrieves orders by matching the given order options against the storage.
func (*Marketplace) GetProcessing ¶
func (m *Marketplace) GetProcessing(ctx context.Context, req *pb.Empty) (*pb.GetProcessingReply, error)
GetProcessing method exists just to match the Marketplace interface. The Market service itself is unable to know anything about processing orders. This method is implemented for Node in `insonmnia/node/market.go:348`
func (*Marketplace) TouchOrders ¶
func (m *Marketplace) TouchOrders(ctx context.Context, req *pb.TouchOrdersRequest) (*pb.Empty, error)
CancelOrder removes the given order from the storage.