contract

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Session(sessionId string) Session

	NewSession() Session

	SaveSession(session Session) error

	DeleteSession(sessionId string) error

	Close() error
}

type Session

type Session interface {
	Id() string

	Get(key string) any

	String(key string) string

	Set(key string, value any)

	Has(key string) bool

	Delete(key string)

	Clear()

	All() map[string]any

	IsModified() bool

	IsCleared() bool
}

type Storage

type Storage interface {
	Load(sessionId string) (map[string]any, bool, error)

	Save(sessionId string, data map[string]any, ttl time.Duration) error

	Delete(sessionId string) error

	Close() error
}

Jump to

Keyboard shortcuts

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