Fold follow-up migrations into init, expose GET /users/clients and /users/staff, and refresh seed data. Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
956 B
Go
Executable File
19 lines
956 B
Go
Executable File
package auth
|
|
|
|
import "context"
|
|
|
|
type Repository interface {
|
|
Login(ctx context.Context, dto LoginDTO) (UserCredentials, error)
|
|
GetUserByID(ctx context.Context, id int) (UserCredentials, error)
|
|
GetProfile(ctx context.Context, id int) (UserProfileDTO, error)
|
|
UpdateProfile(ctx context.Context, id int, dto UpdateProfileDTO) (UserProfileDTO, error)
|
|
UserExists(ctx context.Context, username, phone string) (bool, error)
|
|
UsernameTaken(ctx context.Context, username, exceptPhone string) (bool, error)
|
|
UpsertVerification(ctx context.Context, v Verification) error
|
|
GetVerificationByPhone(ctx context.Context, phone string) (Verification, error)
|
|
IncrementVerifyAttempts(ctx context.Context, id int64) error
|
|
CompleteRegistration(ctx context.Context, v Verification) (int, error)
|
|
GetUserByName(ctx context.Context, name string) (UserIdentity, error)
|
|
CompletePasswordReset(ctx context.Context, userID int, verificationID int64, passwordHash string) error
|
|
}
|