service

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 (*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 (*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

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

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)

Jump to

Keyboard shortcuts

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