pkg

package
v0.0.0-...-e809d31 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchProduct = errors.New("no such product")
View Source
var ErrNoSuchUser = errors.New("no such user")

Functions

func UnMarshalProduct

func UnMarshalProduct(val map[string]string) (products []*model.CartProduct, err error)

Types

type Product

type Product struct {
	ProductId  int64 `json:"product_id"`
	MerchantId int64 `json:"merchant_id"`
	Price      int64 `json:"price"`
	Stock      int64 `json:"stock"`
}

type ProductManager

type ProductManager struct {
	ProductService productservice.Client
}

func (*ProductManager) GetProductInfo

func (p *ProductManager) GetProductInfo(ctx context.Context, productId int64) (productInfo *Product, err error)

type UserManager

type UserManager struct {
	UserService userservice.Client
}

func (*UserManager) GetUserInfo

func (u *UserManager) GetUserInfo(ctx context.Context, userId int64) error

Jump to

Keyboard shortcuts

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