Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSessionTypes ¶
func RegisterSessionTypes(types ...any)
RegisterSessionTypes registers those custom types that will be stored in the session.
Types ¶
type Option ¶
type Option func(*sessions.CookieStore)
Option for the session middleware
func WithDomain ¶
Set the domain for the application session This is useful when you want to share the session between subdomains.
func WithHTTPOnly ¶
WithHTTPOnly sets the HttpOnly flag on the session cookie.
func WithMaxAge ¶
WithMaxAge sets the maximum age for the session cookie. A negative value means that the cookie is deleted when the browser is closed.
func WithSameSite ¶
WithSameSite value for the SameSite option on the session cookie.
func WithSecure ¶
WithSecure value for the Secure flag on the session cookie.
func WithSecureFlag ¶
WithSecure sets the Secure flag on the session cookie.
Click to show internal directories.
Click to hide internal directories.