Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgUserRepository ¶
type PgUserRepository struct {
// contains filtered or unexported fields
}
func NewPgUserRepository ¶
func NewPgUserRepository(db *pgxpool.Pool) *PgUserRepository
func (*PgUserRepository) Login ¶
func (r *PgUserRepository) Login(ctx context.Context, user *UserLoginRequest) (string, error)
func (*PgUserRepository) Register ¶
func (r *PgUserRepository) Register(ctx context.Context, user *UserRegistrationRequest) (int, error)
func (*PgUserRepository) ValidateSessionToken ¶
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(repo UserRepository) *UserHandler
func (*UserHandler) GetMe ¶
func (h *UserHandler) GetMe(w http.ResponseWriter, r *http.Request)
func (*UserHandler) LoginUser ¶
func (h *UserHandler) LoginUser(w http.ResponseWriter, r *http.Request)
func (*UserHandler) RegisterUser ¶
func (h *UserHandler) RegisterUser(w http.ResponseWriter, r *http.Request)
type UserLoginErrorResponse ¶
type UserLoginRequest ¶
type UserRegistrationRequest ¶
Click to show internal directories.
Click to hide internal directories.