Documentation ¶
Index ¶
- Variables
- type Product
- func (p *Product) CacheNullProductInfo(ctx context.Context, pid int64)
- func (p *Product) CacheProductInfo(ctx context.Context, id int64, data interface{}) error
- func (p *Product) ClearProductCache(ctx context.Context, id int64) error
- func (p *Product) CreateProduct(ctx context.Context, product *model.ProductBasic) error
- func (p *Product) DelProduct(ctx context.Context, mid, pid int64) error
- func (p *Product) GetFavorite(ctx context.Context, ids []string) (list []*model.ProductBasic, err error)
- func (p *Product) GetFavoriteId(ctx context.Context, uid int64) ([]string, error)
- func (p *Product) GetProductInfo(ctx context.Context, pid int64) (info *model.ProductBasic, err error)
- func (p *Product) ProductList(ctx context.Context, key string, page, pageSize int64) (list []*model.ProductBasic, total int64, err error)
- func (p *Product) PublishedProducts(ctx context.Context, mid int64) (list []*model.ProductBasic, err error)
- func (p *Product) SearchProduct(ctx context.Context, key string) (list []*model.ProductBasic, err error)
- func (p *Product) UpdateProduct(ctx context.Context, updateInfo *model.UpdateInfo) error
- func (p *Product) UpdateStock(ctx context.Context, id, stock int64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoPermission = errors.New("no permission") ErrNoProduct = errors.New("no such product") )
Functions ¶
This section is empty.
Types ¶
type Product ¶
type Product struct {
// contains filtered or unexported fields
}
func NewProduct ¶
func (*Product) CacheNullProductInfo ¶
func (*Product) CacheProductInfo ¶
func (*Product) ClearProductCache ¶
func (*Product) CreateProduct ¶
func (*Product) DelProduct ¶
func (*Product) GetFavorite ¶
func (*Product) GetFavoriteId ¶
func (*Product) GetProductInfo ¶
func (*Product) ProductList ¶
func (*Product) PublishedProducts ¶
func (*Product) SearchProduct ¶
func (*Product) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.