Files
mtusi2026lab2/service/internal/service/auth/interface.go
T
2026-11-05 14:24:40 +03:00

22 lines
627 B
Go

package auth
import (
"context"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"gitea.privcloud.tech/mtusi2026/internal/dto"
)
type userRepo interface {
GetCredentialsByUsername(ctx context.Context, username string) (*dto.UserCredentials, error)
}
type refreshTokensRepo interface {
GetByID(ctx context.Context, id uuid.UUID) (*dto.StoredRefreshToken, error)
GetByIDForUpdateTx(ctx context.Context, tx pgx.Tx, id uuid.UUID) (*dto.StoredRefreshToken, error)
CreateTx(ctx context.Context, tx pgx.Tx, req dto.StoredRefreshToken) error
RevokeTx(ctx context.Context, tx pgx.Tx, req dto.RevokeRefreshToken) error
}