Documentation ¶
Index ¶
- type Order
- type OrderLine
- type OrdersService
- func (os *OrdersService) CreateOrder(ctx context.Context, req *connect.Request[v1.CreateOrderRequest]) (*connect.Response[v1.CreateOrderResponse], error)
- func (os *OrdersService) DeleteOrder(ctx context.Context, req *connect.Request[v1.DeleteOrderRequest]) (*connect.Response[v1.DeleteOrderResponse], error)
- func (os *OrdersService) GetOrder(ctx context.Context, req *connect.Request[v1.GetOrderRequest]) (*connect.Response[v1.GetOrderResponse], error)
- func (os *OrdersService) ListOrders(ctx context.Context, req *connect.Request[v1.ListOrdersRequest]) (*connect.Response[v1.ListOrdersResponse], error)
- func (os *OrdersService) UpdateOrder(ctx context.Context, req *connect.Request[v1.UpdateOrderRequest]) (*connect.Response[v1.UpdateOrderResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Order ¶
type OrderLine ¶
type OrderLine struct { BookId string `bson:"book_id,omitempty"` Quantity int32 `bson:"quantity,omitempty"` }
func NewOrderLine ¶
type OrdersService ¶
type OrdersService struct {
// contains filtered or unexported fields
}
func NewOrdersService ¶
func NewOrdersService(client *mongo.Client) *OrdersService
func (*OrdersService) CreateOrder ¶
func (os *OrdersService) CreateOrder(ctx context.Context, req *connect.Request[v1.CreateOrderRequest]) (*connect.Response[v1.CreateOrderResponse], error)
func (*OrdersService) DeleteOrder ¶
func (os *OrdersService) DeleteOrder(ctx context.Context, req *connect.Request[v1.DeleteOrderRequest]) (*connect.Response[v1.DeleteOrderResponse], error)
func (*OrdersService) GetOrder ¶
func (os *OrdersService) GetOrder(ctx context.Context, req *connect.Request[v1.GetOrderRequest]) (*connect.Response[v1.GetOrderResponse], error)
func (*OrdersService) ListOrders ¶
func (os *OrdersService) ListOrders(ctx context.Context, req *connect.Request[v1.ListOrdersRequest]) (*connect.Response[v1.ListOrdersResponse], error)
func (*OrdersService) UpdateOrder ¶
func (os *OrdersService) UpdateOrder(ctx context.Context, req *connect.Request[v1.UpdateOrderRequest]) (*connect.Response[v1.UpdateOrderResponse], error)
Click to show internal directories.
Click to hide internal directories.