summaryrefslogtreecommitdiff
path: root/middleware/session/store.go
diff options
context:
space:
mode:
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