Documentation
¶
Index ¶
- Variables
- type Product
- type ProductRepo
- type ProductUsecase
- func (uc *ProductUsecase) CreateProduct(ctx context.Context, g *Product) (*Product, error)
- func (uc *ProductUsecase) DeleteById(ctx context.Context, id string) (string, error)
- func (uc *ProductUsecase) GetProduct(ctx context.Context, id string) (*Product, error)
- func (uc *ProductUsecase) Update(ctx context.Context, id string, p *UpdateProduct) (*Product, error)
- type UpdateProduct
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewProductUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type ProductRepo ¶
type ProductRepo interface { Save(context.Context, *Product) (*Product, error) Update(context.Context, string, *UpdateProduct) (*Product, error) FindByID(context.Context, string) (*Product, error) DeleteById(context.Context, string) (string, error) ListByHello(context.Context, string) ([]*Product, error) ListAll(context.Context) ([]*Product, error) }
type ProductUsecase ¶
type ProductUsecase struct {
// contains filtered or unexported fields
}
func NewProductUsecase ¶
func NewProductUsecase(repo ProductRepo, logger log.Logger) *ProductUsecase
func (*ProductUsecase) CreateProduct ¶
func (*ProductUsecase) DeleteById ¶
func (*ProductUsecase) GetProduct ¶
func (*ProductUsecase) Update ¶
func (uc *ProductUsecase) Update(ctx context.Context, id string, p *UpdateProduct) (*Product, error)
type UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.