Documentation ¶
Index ¶
- func ValidateProduct(productServiceURL string, id uint) bool
- type OrderService
- func (o *OrderService) Create(ctx context.Context, data database.OrderIn) (string, error)
- func (o *OrderService) Delete(ctx context.Context, id uint) (string, error)
- func (o *OrderService) GetByID(ctx context.Context, id uint) ([]database.OrderItemOut, error)
- func (o *OrderService) QuantityOrdered(ctx context.Context, id uint) (uint, error)
- func (o *OrderService) Search(ctx context.Context, search string, startDate time.Time, endDate time.Time) ([]database.OrderOut, error)
- func (o *OrderService) Top(ctx context.Context, count uint) ([]database.ProductOutTop, error)
- func (o *OrderService) Total(ctx context.Context) (float32, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateProduct ¶
Types ¶
type OrderService ¶
func (*OrderService) GetByID ¶
func (o *OrderService) GetByID(ctx context.Context, id uint) ([]database.OrderItemOut, error)
func (*OrderService) QuantityOrdered ¶
func (*OrderService) Top ¶
func (o *OrderService) Top(ctx context.Context, count uint) ([]database.ProductOutTop, error)
type Service ¶
type Service interface { GetByID(ctx context.Context, id uint) ([]database.OrderItemOut, error) Search(ctx context.Context, search string, startDate time.Time, endDate time.Time) ([]database.OrderOut, error) Create(ctx context.Context, data database.OrderIn) (string, error) Delete(ctx context.Context, id uint) (string, error) Total(ctx context.Context) (float32, error) Top(ctx context.Context, count uint) ([]database.ProductOutTop, error) QuantityOrdered(ctx context.Context, id uint) (uint, error) }
Click to show internal directories.
Click to hide internal directories.