Documentation
¶
Index ¶
- type CategoryService
- func (s *CategoryService) Create(ctx context.Context, catg domain.Category) (string, error)
- func (s *CategoryService) Delete(ctx context.Context, id string) error
- func (s *CategoryService) Get(ctx context.Context, id string) (domain.Category, error)
- func (s *CategoryService) GetAll(ctx context.Context) ([]domain.Category, error)
- func (s *CategoryService) Update(ctx context.Context, id string, catg domain.Category) error
- type ICategoryRepo
- type ICategoryService
- type IIngredientRepo
- type IIngredientService
- type IKitRepo
- type IKitService
- type IngredientService
- func (s *IngredientService) Create(ctx context.Context, catg domain.Ingredient) (string, error)
- func (s *IngredientService) Delete(ctx context.Context, id string) error
- func (s *IngredientService) Get(ctx context.Context, id string) (domain.Ingredient, error)
- func (s *IngredientService) GetAll(ctx context.Context) ([]domain.Ingredient, error)
- func (s *IngredientService) GetPage(ctx context.Context, page int, pageSize int, sortField string, ...) ([]domain.Ingredient, error)
- func (s *IngredientService) Update(ctx context.Context, id string, catg domain.Ingredient) error
- type KitService
- func (s *KitService) Create(ctx context.Context, catg domain.Kit) (string, error)
- func (s *KitService) Delete(ctx context.Context, id string) error
- func (s *KitService) Get(ctx context.Context, id string) (domain.Kit, error)
- func (s *KitService) GetAll(ctx context.Context) ([]domain.Kit, error)
- func (s *KitService) GetPage(ctx context.Context, page int, pageSize int, sortField string, ...) ([]domain.Kit, error)
- func (s *KitService) Update(ctx context.Context, id string, catg domain.Kit) error
- func (s *KitService) UpdatePrice(ctx context.Context, id string, prices []domain.Price) 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( logger *otelzap.SugaredLogger, catgRepo ICategoryRepo, ) *CategoryService
func (*CategoryService) Delete ¶
func (s *CategoryService) Delete(ctx context.Context, id string) error
type ICategoryRepo ¶
type ICategoryRepo interface { Insert(ctx context.Context, catg domain.Category) (string, error) Update(ctx context.Context, id string, catg domain.Category) error Delete(ctx context.Context, id string) error Get(ctx context.Context, id string) (domain.Category, error) GetAll(ctx context.Context) ([]domain.Category, error) }
type ICategoryService ¶
type ICategoryService interface { Create(ctx context.Context, catg domain.Category) (string, error) Update(ctx context.Context, id string, catg domain.Category) error Delete(ctx context.Context, id string) error Get(ctx context.Context, id string) (domain.Category, error) GetAll(ctx context.Context) ([]domain.Category, error) }
type IIngredientRepo ¶
type IIngredientRepo interface { Insert(ctx context.Context, catg domain.Ingredient) (string, error) Update(ctx context.Context, id string, catg domain.Ingredient) error Delete(ctx context.Context, id string) error Get(ctx context.Context, id string) (domain.Ingredient, error) GetPaginated( ctx context.Context, limit int, offset int, sortField string, sortDirection enum.SortDirection, ) ([]domain.Ingredient, error) GetAll(ctx context.Context) ([]domain.Ingredient, error) }
type IIngredientService ¶
type IIngredientService interface { Create(ctx context.Context, catg domain.Ingredient) (string, error) Update(ctx context.Context, id string, catg domain.Ingredient) error Delete(ctx context.Context, id string) error Get(ctx context.Context, id string) (domain.Ingredient, error) GetPage( ctx context.Context, page int, pageSize int, sortField string, sortDirection enum.SortDirection, ) ([]domain.Ingredient, error) GetAll(ctx context.Context) ([]domain.Ingredient, error) }
type IKitRepo ¶
type IKitRepo interface { Insert(ctx context.Context, catg domain.Kit) (string, error) Update(ctx context.Context, id string, catg domain.Kit) error UpdatePrice(ctx context.Context, id string, price []domain.Price) error Delete(ctx context.Context, id string) error Get(ctx context.Context, id string) (domain.Kit, error) GetPaginated( ctx context.Context, limit int, offset int, sortField string, sortDirection enum.SortDirection, ) ([]domain.Kit, error) GetAll(ctx context.Context) ([]domain.Kit, error) }
type IKitService ¶
type IKitService interface { Create(ctx context.Context, catg domain.Kit) (string, error) Update(ctx context.Context, id string, catg domain.Kit) error UpdatePrice(ctx context.Context, id string, price domain.Price) error Delete(ctx context.Context, id string) error Get(ctx context.Context, id string) (domain.Kit, error) GetPage( ctx context.Context, page int, pageSize int, sortField string, sortDirection enum.SortDirection, ) ([]domain.Kit, error) GetAll(ctx context.Context) ([]domain.Kit, error) }
type IngredientService ¶
type IngredientService struct {
// contains filtered or unexported fields
}
func NewIngredientService ¶
func NewIngredientService( logger *otelzap.SugaredLogger, ingredRepo IIngredientRepo, ) *IngredientService
func (*IngredientService) Create ¶
func (s *IngredientService) Create(ctx context.Context, catg domain.Ingredient) (string, error)
func (*IngredientService) Delete ¶
func (s *IngredientService) Delete(ctx context.Context, id string) error
func (*IngredientService) Get ¶
func (s *IngredientService) Get(ctx context.Context, id string) (domain.Ingredient, error)
func (*IngredientService) GetAll ¶
func (s *IngredientService) GetAll(ctx context.Context) ([]domain.Ingredient, error)
func (*IngredientService) GetPage ¶
func (s *IngredientService) GetPage( ctx context.Context, page int, pageSize int, sortField string, sortDirection enum.SortDirection, ) ([]domain.Ingredient, error)
func (*IngredientService) Update ¶
func (s *IngredientService) Update(ctx context.Context, id string, catg domain.Ingredient) error
type KitService ¶
type KitService struct {
// contains filtered or unexported fields
}
func NewKitService ¶
func NewKitService( logger *otelzap.SugaredLogger, kitRepo IKitRepo, ) *KitService
func (*KitService) UpdatePrice ¶
Click to show internal directories.
Click to hide internal directories.