Files
mtusi2026lab3/internal/repository/session.go
T

14 lines
380 B
Go

package repository
import (
"context"
"highload/internal/model"
"time"
)
type SessionRepository interface {
Create(ctx context.Context, tokenHash []byte, userID string, sessionTTL time.Duration) (*model.Session, error)
GetSessionByTokenHash(ctx context.Context, tokenHash []byte) (*model.Session, error)
RevokeSession(ctx context.Context, tokenHash []byte) (int, error)
}