session

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package session re-exports the session storage interface and controls.

Session storage provides secure, backend-agnostic server-side session management with size limits, JSON validation, and observability hooks.

Index

Constants

View Source
const (
	ErrCodeInvalidSession       = session.ErrCodeInvalidSession
	ErrCodeSizeLimitExceeded    = session.ErrCodeSizeLimitExceeded
	ErrCodeNotSerializable      = session.ErrCodeNotSerializable
	ErrCodeNotFound             = session.ErrCodeNotFound
	ErrCodeExpired              = session.ErrCodeExpired
	ErrCodeStoreClosed          = session.ErrCodeStoreClosed
	ErrCodeSessionLimitExceeded = session.ErrCodeSessionLimitExceeded
	ErrCodeSiteMismatch         = session.ErrCodeSiteMismatch
)

Re-export error codes.

View Source
const (
	ViolationSizeExceeded         = session.ViolationSizeExceeded
	ViolationNotSerializable      = session.ViolationNotSerializable
	ViolationInvalidSession       = session.ViolationInvalidSession
	ViolationSessionLimitExceeded = session.ViolationSessionLimitExceeded
	ViolationSiteMismatch         = session.ViolationSiteMismatch
)

Re-export violation types.

View Source
const SessionIDLength = session.SessionIDLength

Re-export constants.

Variables

View Source
var (
	ErrNotFound             = session.ErrNotFound
	ErrExpired              = session.ErrExpired
	ErrInvalidSession       = session.ErrInvalidSession
	ErrSizeLimitExceeded    = session.ErrSizeLimitExceeded
	ErrSessionLimitExceeded = session.ErrSessionLimitExceeded
	ErrSiteMismatch         = session.ErrSiteMismatch
	ErrClosed               = session.ErrClosed
)

Re-export errors.

View Source
var (
	NewSession           = session.NewSession
	GenerateSessionID    = session.GenerateSessionID
	DefaultConfig        = session.DefaultConfig
	WithControls         = session.WithControls
	WithLogger           = session.WithLogger
	WithViolationHandler = session.WithViolationHandler
	NewSessionError      = session.NewSessionError
	ErrorCode            = session.ErrorCode
	ErrorDetails         = session.ErrorDetails
)

Re-export functions.

Functions

This section is empty.

Types

type Config

type Config = session.Config

Re-export types.

type ControlOption

type ControlOption = session.ControlOption

Re-export types.

type ControlledStore

type ControlledStore = session.ControlledStore

Re-export types.

type Session

type Session = session.Session

Re-export types.

type SessionError

type SessionError = session.SessionError

Re-export types.

type SessionLister

type SessionLister = session.SessionLister

Re-export types.

type Store

type Store = session.Store

Re-export types.

type ViolationEvent

type ViolationEvent = session.ViolationEvent

Re-export types.

type ViolationHandler

type ViolationHandler = session.ViolationHandler

Re-export types.

type ViolationType

type ViolationType = session.ViolationType

Re-export types.

Directories

Path Synopsis
backend
kvs
Package kvs re-exports the KVS-backed session storage backend.
Package kvs re-exports the KVS-backed session storage backend.
memory
Package memory re-exports the in-memory session storage backend.
Package memory re-exports the in-memory session storage backend.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL