18 lines
280 B
Go
18 lines
280 B
Go
|
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
|