implement JWT tokens, regenerate docs and sqlc
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user