Documentation ¶
Index ¶
- func NewAuthRepo(conf *config.Config) domain.AuthRepo
- func NewBlogRepo(conf *config.Config, client *pgxpool.Pool) domain.BlogRepo
- func NewDatabaseRepo(conf *config.Config, client *pgxpool.Pool, userRepo domain.UserRepo) domain.DatabaseRepo
- func NewUserRepo(conf *config.Config, client *pgxpool.Pool, sessionRepo domain.AuthRepo) domain.UserRepo
- type AuthRepo
- type BlogRepo
- type DatabaseRepo
- type UserRepo
- func (r *UserRepo) AssignRoles(ctx context.Context, userID int64, roleIDs ...int64) error
- func (r *UserRepo) Create(ctx context.Context, newUser *domain.User) (*domain.User, error)
- func (r *UserRepo) GetRoleByName(ctx context.Context, roleName string) (*domain.Role, error)
- func (r *UserRepo) GetUserByUsername(ctx context.Context, uname string) (*domain.User, error)
- func (r *UserRepo) Login(ctx context.Context, username string, password string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabaseRepo ¶
Types ¶
type BlogRepo ¶
type BlogRepo struct {
// contains filtered or unexported fields
}
type DatabaseRepo ¶
type DatabaseRepo struct {
// contains filtered or unexported fields
}
DatabaseRepo functionalities of this repo is very specific to the initialization of the database tables creating roles and an admin user.
func (*DatabaseRepo) Initialize ¶
func (r *DatabaseRepo) Initialize(ctx context.Context) error
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func (*UserRepo) AssignRoles ¶
func (*UserRepo) GetRoleByName ¶
func (*UserRepo) GetUserByUsername ¶
Click to show internal directories.
Click to hide internal directories.