Documentation ¶
Index ¶
- type AdminService
- func (s *AdminService) CreateCategory(ctx context.Context, req *requests.CategoryRequest) (trans transformer.CategoryTransformer, err error)
- func (s *AdminService) CreateFasting(ctx context.Context, req *requests.FastingCreateUpdateRequest) (trans transformer.FastingTransformer, err error)
- func (s *AdminService) CreateSource(ctx context.Context, req *requests.SourceRequest) (trans transformer.SourceTransformer, err error)
- func (s *AdminService) CreateType(ctx context.Context, req *requests.TypeRequest) (trans transformer.TypeTransformer, err error)
- func (s *AdminService) DeleteCategory(ctx context.Context, id uint) (err error)
- func (s *AdminService) DeleteFasting(ctx context.Context, id uint) (err error)
- func (s *AdminService) DeleteSource(ctx context.Context, id uint) (err error)
- func (s *AdminService) DeleteType(ctx context.Context, id uint) (err error)
- func (s *AdminService) UpdateCategory(ctx context.Context, id uint, req *requests.CategoryRequest) (trans transformer.CategoryTransformer, err error)
- func (s *AdminService) UpdateFasting(ctx context.Context, req *requests.FastingCreateUpdateRequest, id uint) (trans transformer.FastingTransformer, err error)
- func (s *AdminService) UpdateSource(ctx context.Context, id uint, req *requests.SourceRequest) (trans transformer.SourceTransformer, err error)
- func (s *AdminService) UpdateType(ctx context.Context, id uint, req *requests.TypeRequest) (trans transformer.TypeTransformer, err error)
- type CategoryService
- type FastingService
- type SourceService
- type TypesService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminService ¶ added in v1.1.0
type AdminService struct { CategoryRepo *repository.CategoryRepository SourceRepo *repository.SourceRepository TypeRepo *repository.TypesRepository FastingRepo *repository.FastingRepository }
func NewAdminService ¶ added in v1.1.0
func NewAdminService( categoryRepo *repository.CategoryRepository, sourceRepo *repository.SourceRepository, typeRepo *repository.TypesRepository, fastingRepo *repository.FastingRepository, ) *AdminService
func (*AdminService) CreateCategory ¶ added in v1.1.0
func (s *AdminService) CreateCategory(ctx context.Context, req *requests.CategoryRequest) (trans transformer.CategoryTransformer, err error)
func (*AdminService) CreateFasting ¶ added in v1.1.0
func (s *AdminService) CreateFasting(ctx context.Context, req *requests.FastingCreateUpdateRequest) (trans transformer.FastingTransformer, err error)
func (*AdminService) CreateSource ¶ added in v1.1.0
func (s *AdminService) CreateSource(ctx context.Context, req *requests.SourceRequest) (trans transformer.SourceTransformer, err error)
func (*AdminService) CreateType ¶ added in v1.1.0
func (s *AdminService) CreateType(ctx context.Context, req *requests.TypeRequest) (trans transformer.TypeTransformer, err error)
func (*AdminService) DeleteCategory ¶ added in v1.2.2
func (s *AdminService) DeleteCategory(ctx context.Context, id uint) (err error)
func (*AdminService) DeleteFasting ¶ added in v1.2.2
func (s *AdminService) DeleteFasting(ctx context.Context, id uint) (err error)
func (*AdminService) DeleteSource ¶ added in v1.2.2
func (s *AdminService) DeleteSource(ctx context.Context, id uint) (err error)
func (*AdminService) DeleteType ¶ added in v1.2.2
func (s *AdminService) DeleteType(ctx context.Context, id uint) (err error)
func (*AdminService) UpdateCategory ¶ added in v1.1.0
func (s *AdminService) UpdateCategory(ctx context.Context, id uint, req *requests.CategoryRequest) (trans transformer.CategoryTransformer, err error)
func (*AdminService) UpdateFasting ¶ added in v1.1.0
func (s *AdminService) UpdateFasting(ctx context.Context, req *requests.FastingCreateUpdateRequest, id uint) (trans transformer.FastingTransformer, err error)
func (*AdminService) UpdateSource ¶ added in v1.1.0
func (s *AdminService) UpdateSource(ctx context.Context, id uint, req *requests.SourceRequest) (trans transformer.SourceTransformer, err error)
func (*AdminService) UpdateType ¶ added in v1.1.0
func (s *AdminService) UpdateType(ctx context.Context, id uint, req *requests.TypeRequest) (trans transformer.TypeTransformer, err error)
type CategoryService ¶
type CategoryService struct {
CategoryRepo *repository.CategoryRepository
}
func NewCategoryService ¶
func NewCategoryService(categoryRepo *repository.CategoryRepository) *CategoryService
func (*CategoryService) GetAll ¶
func (s *CategoryService) GetAll(ctx context.Context) (res []transformer.CategoryTransformer, err error)
type FastingService ¶
type FastingService struct { FastingRepo *repository.FastingRepository CategoryRepo *repository.CategoryRepository TypesRepo *repository.TypesRepository }
func NewFastingService ¶
func NewFastingService(fastingRepo *repository.FastingRepository, categoryRepo *repository.CategoryRepository, typesRepo *repository.TypesRepository) *FastingService
func (*FastingService) GetAll ¶
func (s *FastingService) GetAll(ctx context.Context, req *requests.FastingRequest) (res []transformer.FastingTransformer, err error)
type SourceService ¶
type SourceService struct {
SourceRepo *repository.SourceRepository
}
func NewSourceService ¶
func NewSourceService(sourceRepo *repository.SourceRepository) *SourceService
func (*SourceService) GetAll ¶
func (s *SourceService) GetAll(ctx context.Context) (res []transformer.SourceTransformer, err error)
type TypesService ¶
type TypesService struct {
TypesRepo *repository.TypesRepository
}
func NewTypesService ¶
func NewTypesService(typesRepo *repository.TypesRepository) *TypesService
func (*TypesService) GetAll ¶
func (s *TypesService) GetAll(ctx context.Context) (res []transformer.TypeTransformer, err error)
Click to show internal directories.
Click to hide internal directories.