implement JWT tokens, regenerate docs and sqlc

This commit is contained in:
zardzul
2026-03-14 18:46:48 +01:00
parent 131aee8638
commit d5e608feeb
18 changed files with 441 additions and 82 deletions
+5
View File
@@ -10,6 +10,7 @@ import (
type UserRepository interface {
CreateUser(ctx context.Context, arg db.CreateUserParams) (pgtype.UUID, error)
GetUsernameByID(ctx context.Context, id pgtype.UUID) (string, error)
GetUserAuthByEmail(ctx context.Context, mail string) (db.GetUserAuthByEmailRow, error)
}
type SQLCUserRepository struct {
@@ -27,3 +28,7 @@ func (r *SQLCUserRepository) CreateUser(ctx context.Context, arg db.CreateUserPa
func (r *SQLCUserRepository) GetUsernameByID(ctx context.Context, id pgtype.UUID) (string, error) {
return r.q.GetUsernameByID(ctx, id)
}
func (r *SQLCUserRepository) GetUserAuthByEmail(ctx context.Context, email string) (db.GetUserAuthByEmailRow, error) {
return r.q.GetUserAuthByEmail(ctx, email)
}