Minimalist Go sessions with a secure cookie Store implementation
MIT License
Bot releases are visible (Hide)
Full Changelog: https://github.com/dghubble/sessions/compare/v0.4.0...v0.4.1
Published by dghubble almost 2 years ago
Session
to store values with specified type (V
) (i.e. generics) (#21)
Session
state is now a map[string]V
instead of a map[string]any
Set
, Get
, and GetOk
methods to use generic type V
Session
to Session[V any]
to specify the type of value stored in the SessionStore
to Store[V any]
to specify the type of value stored in sessionsNewCookieStore
to NewCookieStore[V any]
to specify the type of value stored in sessionsPublished by dghubble almost 2 years ago
CookieStore
and its fields to be non-exported (#19)
NewCookieStore
to require a *CookieConfig
and return a Store
Config
struct to CookieConfig
DefaultCookieConfig
and DebugCookieConfig
convenience variablesSession
field Values
to be non-exported (#18)
Session
Set
method to set a key/value pairSession
Get
method to get a value for a given keySession
GetOk
to get a value for a given key and whether the key exists in the mapConfig
field from Session
(#17)Published by dghubble over 5 years ago