Documentation ¶
Index ¶
- Variables
- func NewPool(dsn string) *pgxpool.Pool
- func NewRolesRepository(db *pgxpool.Pool) repository.RolesRepository
- func NewUsersRepository(db *pgxpool.Pool) repository.UsersRepository
- type RolesRepository
- type UsersRepository
- func (r *UsersRepository) AssignRoleById(ctx context.Context, id string, role string) error
- func (r *UsersRepository) Delete(ctx context.Context, id string) error
- func (r *UsersRepository) FindByEmail(ctx context.Context, email string) (*entities.User, error)
- func (r *UsersRepository) FindById(ctx context.Context, id string) (*entities.User, error)
- func (r *UsersRepository) RevokeRoleById(ctx context.Context, id string, role string) error
- func (r *UsersRepository) Save(ctx context.Context, user *entities.User) error
- func (r *UsersRepository) Update(ctx context.Context, user *entities.User) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewRolesRepository ¶
func NewRolesRepository(db *pgxpool.Pool) repository.RolesRepository
func NewUsersRepository ¶
func NewUsersRepository(db *pgxpool.Pool) repository.UsersRepository
Types ¶
type RolesRepository ¶
type RolesRepository struct {
// contains filtered or unexported fields
}
func (*RolesRepository) RolesPermissions ¶
type UsersRepository ¶
type UsersRepository struct {
// contains filtered or unexported fields
}
func (*UsersRepository) AssignRoleById ¶
func (*UsersRepository) Delete ¶
func (r *UsersRepository) Delete(ctx context.Context, id string) error
SOFT-DELETION METHOD
func (*UsersRepository) FindByEmail ¶
func (*UsersRepository) RevokeRoleById ¶
Click to show internal directories.
Click to hide internal directories.