summaryrefslogtreecommitdiff
path: root/middleware/session/store.go
blob: b74a8aaaf90e1af12f63afebead037afd7f888f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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