Documentation ¶
Index ¶
- Constants
- type CategoryRepo
- func (c *CategoryRepo) Delete(ctx context.Context, category entity.Category) error
- func (c *CategoryRepo) DeleteSoft(ctx context.Context, category entity.Category) error
- func (c *CategoryRepo) FindByID(ctx context.Context, id string) (entity.Category, error)
- func (c *CategoryRepo) Insert(ctx context.Context, category entity.Category) error
- type ProductRepo
- func (ph *ProductRepo) BatchInsert(ctx context.Context, products []entity.Product) error
- func (ph *ProductRepo) Delete(ctx context.Context, product entity.Product) error
- func (ph *ProductRepo) DeleteSoft(ctx context.Context, product entity.Product) error
- func (ph *ProductRepo) FindById(ctx context.Context, id string) (entity.Product, error)
- func (ph *ProductRepo) Insert(ctx context.Context, product entity.Product) error
- func (ph *ProductRepo) Update(ctx context.Context, product entity.Product) error
Constants ¶
View Source
const ( FieldID = "id" CollectionNameCategory = "category" CollectionNameProduct = "product" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryRepo ¶
type CategoryRepo struct {
// contains filtered or unexported fields
}
func NewCategoryRepo ¶
func NewCategoryRepo(db *db.Database) *CategoryRepo
func (*CategoryRepo) DeleteSoft ¶
type ProductRepo ¶
type ProductRepo struct {
// contains filtered or unexported fields
}
func NewProductRepo ¶
func NewProductRepo(db *db.Database) *ProductRepo
func (*ProductRepo) BatchInsert ¶
func (*ProductRepo) DeleteSoft ¶
Click to show internal directories.
Click to hide internal directories.