orders

package
v0.0.0-...-cc0f04f Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegister

func NewRegister(storage Storage, l *logg.Logger) handlers.Handler

Types

type Orders

type Orders struct {
	OrderId            int    `json:"order-id"`
	UserId             int    `json:"user-id"`
	DataOfOrder        string `json:"data-of-order"`
	OrderedProductsIds string `json:"ordered-products-ids"`
	FinalPrice         string `json:"final-price"`
	DeliveredStatus    string `json:"delivered-status"`
}

type Storage

type Storage interface {
	CreateOrder(ctx context.Context, order Orders) error
	ChangeOrder(ctx context.Context, order Orders) error
	OrderDelete(ctx context.Context, orderId int) error

	OrderFindOne(ctx context.Context, id int) (Orders, error)
	OrdersGetAll(ctx context.Context) ([]Orders, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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