forked from mtusi2026/mtusi2026lab3
Implement lab 3 level 4 failover and idempotency
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user