products

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: 12 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 Products

type Products struct {
	Id              int    `json:"id"`
	ProductName     string `json:"product-name"`
	Category        int    `json:"category"`
	QuantityOfGoods int    `json:"quantity-of-goods"`
	LastPrice       string `json:"last-price"`
	AvailableStatus string `json:"available-status"`
	PictureAddress  string `json:"picture-address"`
}

type Storage

type Storage interface {
	ProductsAddItems(ctx context.Context, p []Products) error
	ProductUpdateItem(ctx context.Context, p Products) error
	ProductDeleteItem(ctx context.Context, id int) error

	ProductFindOne(ctx context.Context, id int) (Products, error)
	ProductsGetAll(ctx context.Context) ([]Products, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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