Documentation ¶
Index ¶
- type AttributeService
- func (s *AttributeService) Create(ctx context.Context, dto *dtos.CreateAttributeDto) error
- func (s *AttributeService) Delete(ctx context.Context, id int) error
- func (s *AttributeService) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*dtos.AttributePaginatedDto, error)
- func (s *AttributeService) GetByID(ctx context.Context, id int) (res *dtos.AttributeDto, err error)
- func (s *AttributeService) Search(ctx context.Context, q string, page int, size int, sortBy string, ...) (*dtos.AttributePaginatedDto, error)
- func (s *AttributeService) Update(ctx context.Context, dto *dtos.UpdateAttributeDto) error
- type CategoryService
- func (s *CategoryService) Create(ctx context.Context, dto *dtos.CreateCategoryDto) error
- func (s *CategoryService) Delete(ctx context.Context, id int) error
- func (s *CategoryService) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*dtos.CategoryPaginatedDto, error)
- func (s *CategoryService) GetByID(ctx context.Context, id int) (res *dtos.CategoryDto, err error)
- func (s *CategoryService) GetProducts(ctx context.Context, id int, page int, size int, sortBy string, orderBy string) (*dtos.CategoryProductsPaginatedDto, error)
- func (s *CategoryService) Search(ctx context.Context, q string, page int, size int, sortBy string, ...) (*dtos.CategoryPaginatedDto, error)
- func (s *CategoryService) Update(ctx context.Context, dto *dtos.UpdateCategoryDto) error
- type ImageService
- type ProductService
- func (s *ProductService) AddAttribute(ctx context.Context, dto *dtos.CreateProductVariantAttributeDto) error
- func (s *ProductService) AddImage(ctx context.Context, id int, fileheader *multipart.FileHeader) error
- func (s *ProductService) Create(ctx context.Context, dto *dtos.CreateProductDto) error
- func (s *ProductService) CreateVariant(ctx context.Context, dto *dtos.CreateProductVariantDto) error
- func (s *ProductService) Delete(ctx context.Context, id int) error
- func (s *ProductService) DeleteVariant(ctx context.Context, id int, variantID int) error
- func (s *ProductService) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*dtos.ProductPaginatedDto, error)
- func (s *ProductService) FetchVariants(ctx context.Context, id int, page int, size int, sortBy string, orderBy string) (*dtos.ProductVariantPaginatedDto, error)
- func (s *ProductService) GetAttributes(ctx context.Context, id int, variantID int) ([]*dtos.AttributeDto, error)
- func (s *ProductService) GetByID(ctx context.Context, id int) (res *dtos.ProductDto, err error)
- func (s *ProductService) GetImages(ctx context.Context, id int) ([]*dtos.ImageDto, error)
- func (s *ProductService) GetVariantByID(ctx context.Context, id int, variantID int) (*dtos.ProductVariantDto, error)
- func (s *ProductService) RemoveAttribute(ctx context.Context, id int, variantID int, attributeID int) error
- func (s *ProductService) RemoveImage(ctx context.Context, id int, imageID int) error
- func (s *ProductService) Search(ctx context.Context, q string, page int, size int, sortBy string, ...) (*dtos.ProductPaginatedDto, error)
- func (s *ProductService) SearchVariants(ctx context.Context, q string, id int, page int, size int, sortBy string, ...) (*dtos.ProductVariantPaginatedDto, error)
- func (s *ProductService) Update(ctx context.Context, dto *dtos.UpdateProductDto) error
- func (s *ProductService) UpdateVariant(ctx context.Context, dto *dtos.UpdateProductVariantDto) error
- type UserService
- func (s *UserService) ChangePassword(ctx context.Context, username string, dto *dtos.ChangePasswordDto) error
- func (s *UserService) ChangeUsername(ctx context.Context, username string, dto *dtos.ChangeUsernameDto) error
- func (s *UserService) Delete(ctx context.Context, username string) error
- func (s *UserService) Me(ctx context.Context, username string) (res *dtos.UserDto, err error)
- func (s *UserService) Signin(ctx context.Context, dto *dtos.SigninDto) (token string, err error)
- func (s *UserService) Signup(ctx context.Context, dto *dtos.SignupDto) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeService ¶
type AttributeService struct {
// contains filtered or unexported fields
}
func NewAttributeService ¶
func NewAttributeService(repository interfaces.IAttributeRepository) *AttributeService
func (*AttributeService) Create ¶
func (s *AttributeService) Create(ctx context.Context, dto *dtos.CreateAttributeDto) error
func (*AttributeService) Delete ¶
func (s *AttributeService) Delete(ctx context.Context, id int) error
func (*AttributeService) Fetch ¶
func (s *AttributeService) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*dtos.AttributePaginatedDto, error)
func (*AttributeService) GetByID ¶
func (s *AttributeService) GetByID(ctx context.Context, id int) (res *dtos.AttributeDto, err error)
func (*AttributeService) Update ¶
func (s *AttributeService) Update(ctx context.Context, dto *dtos.UpdateAttributeDto) error
type CategoryService ¶
type CategoryService struct {
// contains filtered or unexported fields
}
func NewCategoryService ¶
func NewCategoryService(repository interfaces.ICategoryRepository) *CategoryService
func (*CategoryService) Create ¶
func (s *CategoryService) Create(ctx context.Context, dto *dtos.CreateCategoryDto) error
func (*CategoryService) Delete ¶
func (s *CategoryService) Delete(ctx context.Context, id int) error
func (*CategoryService) Fetch ¶
func (s *CategoryService) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*dtos.CategoryPaginatedDto, error)
func (*CategoryService) GetByID ¶
func (s *CategoryService) GetByID(ctx context.Context, id int) (res *dtos.CategoryDto, err error)
func (*CategoryService) GetProducts ¶
func (*CategoryService) Update ¶
func (s *CategoryService) Update(ctx context.Context, dto *dtos.UpdateCategoryDto) error
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
func NewImageService ¶
func NewImageService(repository interfaces.IImageRepository) *ImageService
func (*ImageService) Save ¶
func (s *ImageService) Save(ctx context.Context, id int, fileheader *multipart.FileHeader) (int, error)
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService(repository interfaces.IProductRepository, imageService interfaces.IImageService) *ProductService
func (*ProductService) AddAttribute ¶
func (s *ProductService) AddAttribute(ctx context.Context, dto *dtos.CreateProductVariantAttributeDto) error
func (*ProductService) AddImage ¶
func (s *ProductService) AddImage(ctx context.Context, id int, fileheader *multipart.FileHeader) error
func (*ProductService) Create ¶
func (s *ProductService) Create(ctx context.Context, dto *dtos.CreateProductDto) error
func (*ProductService) CreateVariant ¶
func (s *ProductService) CreateVariant(ctx context.Context, dto *dtos.CreateProductVariantDto) error
func (*ProductService) DeleteVariant ¶
func (*ProductService) Fetch ¶
func (s *ProductService) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*dtos.ProductPaginatedDto, error)
func (*ProductService) FetchVariants ¶
func (*ProductService) GetAttributes ¶
func (s *ProductService) GetAttributes(ctx context.Context, id int, variantID int) ([]*dtos.AttributeDto, error)
func (*ProductService) GetByID ¶
func (s *ProductService) GetByID(ctx context.Context, id int) (res *dtos.ProductDto, err error)
func (*ProductService) GetVariantByID ¶
func (s *ProductService) GetVariantByID(ctx context.Context, id int, variantID int) (*dtos.ProductVariantDto, error)
func (*ProductService) RemoveAttribute ¶
func (*ProductService) RemoveImage ¶
func (*ProductService) SearchVariants ¶
func (s *ProductService) SearchVariants(ctx context.Context, q string, id int, page int, size int, sortBy string, orderBy string, attrs []*dtos.AttributeSearchQueryDto) (*dtos.ProductVariantPaginatedDto, error)
func (*ProductService) Update ¶
func (s *ProductService) Update(ctx context.Context, dto *dtos.UpdateProductDto) error
func (*ProductService) UpdateVariant ¶
func (s *ProductService) UpdateVariant(ctx context.Context, dto *dtos.UpdateProductVariantDto) error
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repository interfaces.IUserRepository, hasher hasher.Hasher) *UserService
func (*UserService) ChangePassword ¶
func (s *UserService) ChangePassword(ctx context.Context, username string, dto *dtos.ChangePasswordDto) error
func (*UserService) ChangeUsername ¶
func (s *UserService) ChangeUsername(ctx context.Context, username string, dto *dtos.ChangeUsernameDto) error
func (*UserService) Delete ¶
func (s *UserService) Delete(ctx context.Context, username string) error
Click to show internal directories.
Click to hide internal directories.