app

package
v0.0.0-...-f89287e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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) Create

func (s *CategoryService) Create(ctx context.Context, catg domain.Category) (string, error)

func (*CategoryService) Delete

func (s *CategoryService) Delete(ctx context.Context, id string) error

func (*CategoryService) Get

func (*CategoryService) GetAll

func (s *CategoryService) GetAll(ctx context.Context) ([]domain.Category, error)

func (*CategoryService) Update

func (s *CategoryService) Update(ctx context.Context, id string, catg domain.Category) 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 (*IngredientService) GetAll

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) Create

func (s *KitService) Create(ctx context.Context, catg domain.Kit) (string, error)

func (*KitService) Delete

func (s *KitService) Delete(ctx context.Context, id string) error

func (*KitService) Get

func (s *KitService) Get(ctx context.Context, id string) (domain.Kit, error)

func (*KitService) GetAll

func (s *KitService) GetAll(ctx context.Context) ([]domain.Kit, error)

func (*KitService) GetPage

func (s *KitService) GetPage(
	ctx context.Context, page int, pageSize int, sortField string, sortDirection enum.SortDirection,
) ([]domain.Kit, error)

func (*KitService) Update

func (s *KitService) Update(ctx context.Context, id string, catg domain.Kit) error

func (*KitService) UpdatePrice

func (s *KitService) UpdatePrice(ctx context.Context, id string, prices []domain.Price) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL