Documentation ¶
Index ¶
- func New(params ServiceParams) service.LanguageService
- type Service
- func (s *Service) Create(ctx context.Context, data *service.CreateLanguageData) (*entity.Language, error)
- func (s *Service) Delete(ctx context.Context, id uint) error
- func (s *Service) GetAll(ctx context.Context) ([]entity.Language, error)
- func (s *Service) GetByID(ctx context.Context, id uint) (*entity.Language, error)
- func (s *Service) GetByIDs(ctx context.Context, ids []uint) ([]entity.Language, error)
- func (s *Service) GetByLanguage(ctx context.Context, lng string) (*entity.Language, error)
- func (s *Service) GetByLanguageOrDefault(ctx context.Context, lng string) (*entity.Language, error)
- func (s *Service) GetExistByID(ctx context.Context, id uint) (*entity.Language, error)
- func (s *Service) Update(ctx context.Context, data *service.UpdateLanguageData) (*entity.Language, error)
- type ServiceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(params ServiceParams) service.LanguageService
Types ¶
type Service ¶
type Service struct {
LanguageRepository repository.LanguageRepository
}
func (*Service) GetByLanguage ¶
func (*Service) GetByLanguageOrDefault ¶
func (*Service) GetExistByID ¶
type ServiceParams ¶
type ServiceParams struct { fx.In LanguageRepository repository.LanguageRepository }
Click to show internal directories.
Click to hide internal directories.