18 lines
551 B
Go
18 lines
551 B
Go
package authentication
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
|
)
|
|
|
|
type UserStore interface {
|
|
GetUserByEmailPhone(ctx context.Context, email, phone string) (domain.User, error)
|
|
}
|
|
type TokenStore interface {
|
|
CreateRefreshToken(ctx context.Context, rt domain.RefreshToken) error
|
|
GetRefreshToken(ctx context.Context, token string) (domain.RefreshToken, error)
|
|
GetRefreshTokenByUserID(ctx context.Context, id int64) (domain.RefreshToken, error)
|
|
RevokeRefreshToken(ctx context.Context, token string) error
|
|
}
|