из lab2

This commit is contained in:
2026-10-21 17:35:51 +03:00
parent 0ab3a341aa
commit 665c37c0b8
37 changed files with 4442 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package sessionstore
import (
"context"
"errors"
"time"
)
var (
ErrNotFound = errors.New("session not found or expired")
ErrUnavailable = errors.New("session store unavailable")
)
type Store interface {
Create(ctx context.Context, token, userID string, ttl time.Duration) (time.Time, error)
GetUserID(ctx context.Context, token string) (string, error)
Delete(ctx context.Context, token string) (bool, error)
}