Documentation
¶
Index ¶
- func Get[T any](s *Session, c echo.Context, name string) (T, error)
- type Session
- func (s *Session) Del(c echo.Context, name string, uid uuid.UUID) error
- func (s *Session) Flush(ctx context.Context, name string, uid uuid.UUID, data any) error
- func (s *Session) Save(c echo.Context, name string, uid uuid.UUID, data any) (string, error)
- func (s *Session) Trunc(ctx context.Context, name string, uid uuid.UUID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session 基于 Redis Hash 的会话管理 Hash key = {name}:{uid},field = cookie UUID,value = JSON 数据 额外维护 lookup key = lookup:{name}:{cookie} → uid,用于 Get 时反查
Click to show internal directories.
Click to hide internal directories.