order

package
v0.0.0-...-241bfea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 (r *Repository) OrderContext(ctx context.Context, id int32) (*proto.Order, error)

func (*Repository) OrdersContext

func (r *Repository) OrdersContext(ctx context.Context) ([]*proto.Order, error)

func (*Repository) ProductOrdersContext

func (r *Repository) ProductOrdersContext(ctx context.Context, orderID *int32) ([]*proto.ProductOrder, error)

func (*Repository) UpdateOrderContext

func (r *Repository) UpdateOrderContext(ctx context.Context, order *proto.Order) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL