Documentation ¶
Index ¶
- type CategoryService
- func (s CategoryService) GetAncestorCategories(ctx context.Context, categoryID int32) ([]anor.Category, error)
- func (s CategoryService) GetCategory(ctx context.Context, categoryID int32) (anor.Category, error)
- func (s CategoryService) GetChildCategories(ctx context.Context, categoryID int32) ([]anor.Category, error)
- func (s CategoryService) GetSiblingCategories(ctx context.Context, categoryID int32) ([]anor.Category, error)
- type ProductService
- func (s ProductService) GetProduct(ctx context.Context, id int64) (*anor.Product, error)
- func (s ProductService) GetProductsByLeafCategoryID(ctx context.Context, categoryID int32, params anor.GetProductsByCategoryParams) ([]anor.Product, int64, error)
- func (s ProductService) GetProductsByNonLeafCategoryID(ctx context.Context, categoryID int32, params anor.GetProductsByCategoryParams) ([]anor.Product, int64, error)
- type UserService
- func (s UserService) CreateUser(ctx context.Context, u anor.User) error
- func (s UserService) GetUser(ctx context.Context, id int64) (anor.User, error)
- func (s UserService) GetUserByEmail(ctx context.Context, email string) (anor.User, error)
- func (s UserService) UpdateUserOTP(ctx context.Context, id int64, otp string, otpExpiry int64) error
- func (s UserService) UpdateUserPassword(ctx context.Context, id int64, password string) error
- func (s UserService) UpdateUserStatus(ctx context.Context, status anor.UserStatus, id int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryService ¶
type CategoryService struct {
// contains filtered or unexported fields
}
func NewCategoryService ¶
func NewCategoryService(cs category.Store) *CategoryService
func (CategoryService) GetAncestorCategories ¶
func (CategoryService) GetCategory ¶
func (CategoryService) GetChildCategories ¶
func (CategoryService) GetSiblingCategories ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService(ps product.Store, cs category.Store) *ProductService
func (ProductService) GetProduct ¶
func (ProductService) GetProductsByLeafCategoryID ¶
func (s ProductService) GetProductsByLeafCategoryID( ctx context.Context, categoryID int32, params anor.GetProductsByCategoryParams, ) ([]anor.Product, int64, error)
func (ProductService) GetProductsByNonLeafCategoryID ¶
func (s ProductService) GetProductsByNonLeafCategoryID( ctx context.Context, categoryID int32, params anor.GetProductsByCategoryParams, ) ([]anor.Product, int64, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(us user.Store) *UserService
func (UserService) CreateUser ¶
func (UserService) GetUserByEmail ¶
func (UserService) UpdateUserOTP ¶
func (UserService) UpdateUserPassword ¶
func (UserService) UpdateUserStatus ¶
func (s UserService) UpdateUserStatus(ctx context.Context, status anor.UserStatus, id int64) error
Click to show internal directories.
Click to hide internal directories.