Documentation ¶
Index ¶
- Variables
- func Chain(h http.Handler, middleware ...func(http.Handler) http.Handler) http.Handler
- func DevProxy(mux *http.ServeMux, service http.Handler, isDev bool, proxyAddr string, ...) error
- func GetCookie(key CookieKey, r *http.Request) (string, error)
- func ReadBodyLimiter(size int64, w http.ResponseWriter, r *http.Request) ([]byte, error)
- func ReadLimter(size int64, w http.ResponseWriter, r *http.Request)
- func ReverseProxy(rawURL string) (http.HandlerFunc, error)
- func ServeFile(fs fs.FS) http.Handler
- func SetCookie(w http.ResponseWriter, key CookieKey, value string, maxAge time.Duration, ...)
- func WithLogging(next http.Handler) http.Handler
- func WithSessionContext[T any](cookieKey CookieKey, ctxKey ContextKey, ...) func(next http.Handler) http.Handler
- type ContextKey
- type CookieKey
- type Jwt
- type JwtClaims
- type JwtMapClaims
- type JwtRegisteredClaims
- type JwtToken
- type TokenParser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( JwtParseRSAPrivateKeyFromPEM = jwtgo.ParseRSAPrivateKeyFromPEM JwtNewWithClaims = jwtgo.NewWithClaims JwtSigningMethodRS256 = jwtgo.SigningMethodRS256 JwtNewNumericDate = jwtgo.NewNumericDate )
View Source
var (
ErrParsingCookie = errors.New("parsing cookie")
)
Functions ¶
func DevProxy ¶
func DevProxy(mux *http.ServeMux, service http.Handler, isDev bool, proxyAddr string, exceptions []string) error
DevProxy is for serving static files in development mode. mainly used for UI development with a separate server.
func ReadBodyLimiter ¶
func ReadLimter ¶
func ReadLimter(size int64, w http.ResponseWriter, r *http.Request)
func ReverseProxy ¶
func ReverseProxy(rawURL string) (http.HandlerFunc, error)
Types ¶
type ContextKey ¶
type ContextKey string
type JwtMapClaims ¶
type JwtRegisteredClaims ¶
type JwtRegisteredClaims = jwtgo.RegisteredClaims
type TokenParser ¶
Click to show internal directories.
Click to hide internal directories.