Documentation ¶
Index ¶
- func ProtoOrderStatusToString(status proto.OrderStatus) (string, error)
- func StringToProtoOrderStatus(status string) (proto.OrderStatus, error)
- type Repository
- func (r *Repository) CancelOrderContext(ctx context.Context, id int32) error
- func (r *Repository) CompleteOrderContext(ctx context.Context, id int32) error
- func (r *Repository) CreateOrderContext(ctx context.Context, supplierID int32, products []*proto.ProductOrder, ...) (int32, error)
- func (r *Repository) DistributionsContext(ctx context.Context, orderID *int32) ([]*proto.Distribution, error)
- func (r *Repository) OrderContext(ctx context.Context, id int32) (*proto.Order, error)
- func (r *Repository) OrdersContext(ctx context.Context) ([]*proto.Order, error)
- func (r *Repository) ProductOrdersContext(ctx context.Context, orderID *int32) ([]*proto.ProductOrder, error)
- func (r *Repository) UpdateOrderContext(ctx context.Context, order *proto.Order) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoOrderStatusToString ¶
func ProtoOrderStatusToString(status proto.OrderStatus) (string, error)
func StringToProtoOrderStatus ¶
func StringToProtoOrderStatus(status string) (proto.OrderStatus, error)
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(database *postgres.Database) *Repository
func (*Repository) CancelOrderContext ¶
func (r *Repository) CancelOrderContext(ctx context.Context, id int32) error
func (*Repository) CompleteOrderContext ¶
func (r *Repository) CompleteOrderContext(ctx context.Context, id int32) error
func (*Repository) CreateOrderContext ¶
func (r *Repository) CreateOrderContext( ctx context.Context, supplierID int32, products []*proto.ProductOrder, applicationIds []int32, ) (int32, error)
func (*Repository) DistributionsContext ¶
func (r *Repository) DistributionsContext(ctx context.Context, orderID *int32) ([]*proto.Distribution, error)
func (*Repository) OrderContext ¶
func (*Repository) OrdersContext ¶
func (*Repository) ProductOrdersContext ¶
func (r *Repository) ProductOrdersContext(ctx context.Context, orderID *int32) ([]*proto.ProductOrder, error)
func (*Repository) UpdateOrderContext ¶
Click to show internal directories.
Click to hide internal directories.