Documentation ¶
Index ¶
- func ValidateCategory(categoryServiceURL string, id uint) bool
- type ProductService
- func (p *ProductService) Create(ctx context.Context, data database.ProductIn) (string, error)
- func (p *ProductService) Delete(ctx context.Context, id uint) (string, error)
- func (p *ProductService) GetByID(ctx context.Context, id uint) (database.ProductOut, error)
- func (p *ProductService) Search(ctx context.Context, search string, category uint, minPrice float32, ...) ([]database.ProductOut, error)
- func (p *ProductService) Update(ctx context.Context, id uint, data database.ProductIn) (string, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCategory ¶
Types ¶
type ProductService ¶
func (*ProductService) GetByID ¶
func (p *ProductService) GetByID(ctx context.Context, id uint) (database.ProductOut, error)
type Service ¶
type Service interface { GetByID(ctx context.Context, id uint) (database.ProductOut, error) Search(ctx context.Context, search string, category uint, minPrice float32, maxPrice float32, discount bool, sortName string, sortPrice string) ([]database.ProductOut, error) Create(ctx context.Context, data database.ProductIn) (string, error) Update(ctx context.Context, id uint, data database.ProductIn) (string, error) Delete(ctx context.Context, id uint) (string, error) }
Click to show internal directories.
Click to hide internal directories.