Documentation ¶
Index ¶
- type CategoryRepository
- func (r *CategoryRepository) Delete(ctx context.Context, id string) error
- func (r *CategoryRepository) Get(ctx context.Context, id string) (domain.Category, error)
- func (r *CategoryRepository) GetAll(ctx context.Context) ([]domain.Category, error)
- func (r *CategoryRepository) Insert(ctx context.Context, catg domain.Category) (string, error)
- func (r *CategoryRepository) Update(ctx context.Context, id string, catg domain.Category) error
- type IngredientRepository
- func (r *IngredientRepository) Delete(ctx context.Context, id string) error
- func (r *IngredientRepository) Get(ctx context.Context, id string) (domain.Ingredient, error)
- func (r *IngredientRepository) GetAll(ctx context.Context) ([]domain.Ingredient, error)
- func (r *IngredientRepository) GetPaginated(ctx context.Context, limit int, offset int, sortField string, ...) ([]domain.Ingredient, error)
- func (r *IngredientRepository) Insert(ctx context.Context, ingred domain.Ingredient) (string, error)
- func (r *IngredientRepository) Update(ctx context.Context, id string, ingred domain.Ingredient) error
- type KitRepository
- func (r *KitRepository) Delete(ctx context.Context, id string) error
- func (r *KitRepository) Get(ctx context.Context, id string) (domain.Kit, error)
- func (r *KitRepository) GetAll(ctx context.Context) ([]domain.Kit, error)
- func (r *KitRepository) GetPaginated(ctx context.Context, limit int, offset int, sortField string, ...) ([]domain.Kit, error)
- func (r *KitRepository) Insert(ctx context.Context, kit domain.Kit) (string, error)
- func (r *KitRepository) Update(ctx context.Context, id string, kit domain.Kit) error
- func (r *KitRepository) 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 CategoryRepository ¶
type CategoryRepository struct {
// contains filtered or unexported fields
}
func NewCategoryRepository ¶
func NewCategoryRepository(logger *otelzap.SugaredLogger, db *mongo.Database) *CategoryRepository
func (*CategoryRepository) Delete ¶
func (r *CategoryRepository) Delete(ctx context.Context, id string) error
type IngredientRepository ¶
type IngredientRepository struct {
// contains filtered or unexported fields
}
func NewIngredientRepository ¶
func NewIngredientRepository(logger *otelzap.SugaredLogger, db *mongo.Database) *IngredientRepository
func (*IngredientRepository) Delete ¶
func (r *IngredientRepository) Delete(ctx context.Context, id string) error
func (*IngredientRepository) Get ¶
func (r *IngredientRepository) Get(ctx context.Context, id string) (domain.Ingredient, error)
func (*IngredientRepository) GetAll ¶
func (r *IngredientRepository) GetAll(ctx context.Context) ([]domain.Ingredient, error)
func (*IngredientRepository) GetPaginated ¶
func (r *IngredientRepository) GetPaginated( ctx context.Context, limit int, offset int, sortField string, sortDirection enum.SortDirection, ) ([]domain.Ingredient, error)
func (*IngredientRepository) Insert ¶
func (r *IngredientRepository) Insert(ctx context.Context, ingred domain.Ingredient) (string, error)
func (*IngredientRepository) Update ¶
func (r *IngredientRepository) Update(ctx context.Context, id string, ingred domain.Ingredient) error
type KitRepository ¶
type KitRepository struct {
// contains filtered or unexported fields
}
func NewKitRepository ¶
func NewKitRepository(logger *otelzap.SugaredLogger, db *mongo.Database) *KitRepository
func (*KitRepository) GetPaginated ¶
func (*KitRepository) UpdatePrice ¶
Updates the prices of the kit
Click to show internal directories.
Click to hide internal directories.