mysql

package
v0.0.0-...-a655b0a Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderMysqlRepo

type OrderMysqlRepo struct {
	// contains filtered or unexported fields
}

func NewOrderMysqlRepo

func NewOrderMysqlRepo(
	db *infras.MysqlConnector,
) *OrderMysqlRepo

func (*OrderMysqlRepo) AddOrder

func (o *OrderMysqlRepo) AddOrder(
	ctx context.Context,
	order *entities.Order,
) (*entities.Order, error)

func (*OrderMysqlRepo) UpdateOrderStatus

func (o *OrderMysqlRepo) UpdateOrderStatus(
	ctx context.Context,
	id int,
	status entities.OrderStatus,
) (*entities.Order, error)

type ProductMysqlRepo

type ProductMysqlRepo struct {
	// contains filtered or unexported fields
}

func NewProductMysqlRepo

func NewProductMysqlRepo(
	db *infras.MysqlConnector,
) *ProductMysqlRepo

func (*ProductMysqlRepo) AddProduct

func (p *ProductMysqlRepo) AddProduct(
	ctx context.Context,
	prod *entities.Product,
) (*entities.Product, error)

func (*ProductMysqlRepo) GetProduct

func (p *ProductMysqlRepo) GetProduct(
	ctx context.Context,
	id int64,
) (*entities.Product, error)

func (*ProductMysqlRepo) ListProducts

func (p *ProductMysqlRepo) ListProducts(
	ctx context.Context,
	page int,
	limit int,
) ([]*entities.Product, error)

Jump to

Keyboard shortcuts

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