diff options
author | Alexander NeonXP Kiryukhin <i@neonxp.ru> | 2024-07-30 00:45:25 +0300 |
---|---|---|
committer | Alexander NeonXP Kiryukhin <i@neonxp.ru> | 2024-07-30 00:45:25 +0300 |
commit | 623eaf165a4f248681acfec094f2f1ac1e0ff89f (patch) | |
tree | 54a7b7c0be2002b4d9c4d59081e0e9c2bb84628b /middleware/session/store.go | |
parent | c261597b9adb827bfa16de8f21ce47ac63bec138 (diff) |
Пересмотрел механизм сессий
Diffstat (limited to 'middleware/session/store.go')
-rw-r--r-- | middleware/session/store.go | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/middleware/session/store.go b/middleware/session/store.go index b74a8aa..a02ba1e 100644 --- a/middleware/session/store.go +++ b/middleware/session/store.go @@ -1,18 +1,9 @@ package session -import ( - "context" - "errors" -) - -var ( - ErrSessionNotFound = errors.New("session not found") -) - type Store interface { - Load(ctx context.Context, sessionID string) Value - Save(ctx context.Context, sessionID string, value Value) error - Remove(ctx context.Context, sessionID string) error + Load(sessionID string) Values + Save(sessionID string, value Values) error + Remove(sessionID string) error } -type Value map[string]any +type Values map[string]any |