session

package
v0.0.0-...-89f216e Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID(r *http.Request) (id string)

func NewMiddleware

func NewMiddleware(next http.Handler, opts ...MiddlewareOpts) http.Handler

Types

type Middleware

type Middleware struct {
	Next     http.Handler
	Secure   bool
	HTTPOnly bool
}

func (Middleware) ServeHTTP

func (mw Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MiddlewareOpts

type MiddlewareOpts func(*Middleware)

func WithHTTPOnly

func WithHTTPOnly(httpOnly bool) MiddlewareOpts

func WithSecure

func WithSecure(secure bool) MiddlewareOpts

Jump to

Keyboard shortcuts

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