Documentation ¶
Index ¶
- type AuthService
- type InputUser
- type ProductService
- func (ps *ProductService) CreateProduct(p *model.Product) error
- func (ps *ProductService) DeleteProduct(productId int, userId int) error
- func (ps *ProductService) GetProductById(id int) (*model.Product, error)
- func (ps *ProductService) GetProductCategories() ([]*model.Category, error)
- func (ps *ProductService) GetProductMaterials() ([]*model.Material, error)
- func (ps *ProductService) GetProductsByUserId(userId int) ([]*model.Product, error)
- func (ps *ProductService) UpdateProduct(productId int, p *model.Product) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(store store.Store) *AuthService
func (*AuthService) Authenticate ¶
func (s *AuthService) Authenticate(id int) (*model.User, error)
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService(store store.Store) *ProductService
func (*ProductService) CreateProduct ¶
func (ps *ProductService) CreateProduct(p *model.Product) error
func (*ProductService) DeleteProduct ¶
func (ps *ProductService) DeleteProduct(productId int, userId int) error
func (*ProductService) GetProductById ¶
func (ps *ProductService) GetProductById(id int) (*model.Product, error)
func (*ProductService) GetProductCategories ¶
func (ps *ProductService) GetProductCategories() ([]*model.Category, error)
func (*ProductService) GetProductMaterials ¶
func (ps *ProductService) GetProductMaterials() ([]*model.Material, error)
func (*ProductService) GetProductsByUserId ¶
func (ps *ProductService) GetProductsByUserId(userId int) ([]*model.Product, error)
func (*ProductService) UpdateProduct ¶
func (ps *ProductService) UpdateProduct(productId int, p *model.Product) error
type Service ¶
type Service struct { ProductService *ProductService AuthService *AuthService }
func NewService ¶
Click to show internal directories.
Click to hide internal directories.