middleware/session/store.go

18 lines
280 B
Go
Raw Permalink Normal View History

2024-07-28 19:32:33 +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
}
type Value map[string]any