Documentation
¶
Index ¶
- Variables
- type UserRepo
- func (repo *UserRepo) AddRoles(ctx context.Context, roleNames []string, id uuid.UUID) error
- func (repo *UserRepo) ChangePassword(ctx context.Context, req *user.ChangePasswordRequest) error
- func (repo *UserRepo) Create(ctx context.Context, u *user.User) error
- func (repo *UserRepo) DeleteById(ctx context.Context, id uuid.UUID) error
- func (repo *UserRepo) EnableDisable(ctx context.Context, id uuid.UUID) error
- func (repo *UserRepo) GetById(ctx context.Context, id uuid.UUID) (*user.User, error)
- func (repo *UserRepo) GetByUsername(ctx context.Context, username string) (*user.User, error)
- func (repo *UserRepo) GetPage(ctx context.Context, p domain.Pageable) (domain.Page[user.User], error)
- func (repo *UserRepo) RemoveRoles(ctx context.Context, roleNames []string, id uuid.UUID) error
- func (repo *UserRepo) Update(ctx context.Context, u *user.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilEntity = errors.New("entity can not be nil")
Functions ¶
This section is empty.
Types ¶
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
UserRepo is implementation of ports.UserRepo interface.
func (*UserRepo) ChangePassword ¶
ChangePassword updates users password.
func (*UserRepo) DeleteById ¶
DeleteById remove user entity by specified id.
func (*UserRepo) EnableDisable ¶
EnableDisable enables user if it is disabled or vice versa.
func (*UserRepo) GetByUsername ¶
GetByUsername returns user by username.
func (*UserRepo) GetPage ¶
func (repo *UserRepo) GetPage(ctx context.Context, p domain.Pageable) (domain.Page[user.User], error)
GetPage respond with a page of users.
func (*UserRepo) RemoveRoles ¶
RemoveRoles from existing user.
Click to show internal directories.
Click to hide internal directories.