summaryrefslogtreecommitdiff
path: root/middleware/session/store.go
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-29 02:38:17 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-29 02:38:17 +0300
commit2916082d5ed94ef86ad58bdb7256ae07b214c4f3 (patch)
tree322a0e9172c07457a892f9737839843b8c584864 /middleware/session/store.go
Начальный коммит
Diffstat (limited to 'middleware/session/store.go')
-rw-r--r--middleware/session/store.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/middleware/session/store.go b/middleware/session/store.go
new file mode 100644
index 0000000..b74a8aa
--- /dev/null
+++ b/middleware/session/store.go
@@ -0,0 +1,18 @@
+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
+}
+
+type Value map[string]any