Documentation ¶
Index ¶
- type UserService
- type UserValidator
- func (u UserValidator) ValidateToCreate(ctx context.Context, user *entities.User) error
- func (u UserValidator) ValidateToDelete(ctx context.Context, user *entities.User) error
- func (u UserValidator) ValidateToUpdate(ctx context.Context, origin *entities.User, updated *entities.User) error
- func (u UserValidator) WithTx(tx *gorm.DB) validation.EntityValidator[entities.User]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService interface { WithTx(tx *gorm.DB) UserService FindOneUserByID(ctx context.Context, id uint) (user *entities.User, err error) FindOneUserByIDForUpdate(ctx context.Context, id uint) (*entities.User, error) FindAllUsers(ctx context.Context, pagination *models.Pagination) (users *models.Page[*entities.User], err error) FindAllUsersByCriteria( ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[repository.FindAllCriteria], ) (users *models.Page[*entities.User], err error) Overview( ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[repository.OverviewCriteria], ) (users *models.Page[*userModels.SenderOverview], err error) CreateUser(ctx context.Context, toBeCreated entities.User) (user *entities.User, err error) UpdateUser(ctx context.Context, updated *entities.User) (user *entities.User, err error) DeleteUserByID(ctx context.Context, id uint) error }
func NewUserService ¶
func NewUserService( userValidator *UserValidator, logger logger.Logger, repository repository.UserRepository, eventDispatcher *event.Dispatcher, ) UserService
NewUserService creates a new UserService.
type UserValidator ¶
type UserValidator struct {
// contains filtered or unexported fields
}
func NewUserValidator ¶
func NewUserValidator(userRepository repository.UserRepository) *UserValidator
func (UserValidator) ValidateToCreate ¶
func (UserValidator) ValidateToDelete ¶
func (UserValidator) ValidateToUpdate ¶
func (UserValidator) WithTx ¶
func (u UserValidator) WithTx(tx *gorm.DB) validation.EntityValidator[entities.User]
Click to show internal directories.
Click to hide internal directories.