mux/middleware/session/store.go

19 lines
333 B
Go
Raw Normal View History

2024-07-29 02:38:17 +03:00
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