Versions in this module Expand all Collapse all v1 v1.0.2 Apr 6, 2022 Changes in this version + var AuthnCtxKey = &ContextKey + var AuthorizationKey = "authorization" + var AuthorizationType = "bearer" + func Bytes(b []byte) string + func CORS(next http.Handler) http.Handler + func CSSResponseWriter(next http.Handler) http.Handler + func CleanPath(next http.Handler) http.Handler + func ContentEncoding(ce string, charsets ...string) bool + func ETag(next http.Handler) http.Handler + func FileResponseWriter(next http.Handler) http.Handler + func GetAuthTokenFromCookie(r *http.Request) (string, error) + func GetAuthTokenFromHeader(r *http.Request) (string, error) + func GetRequestId(r *http.Request) string + func GetUrlFormat(r *http.Request) string + func Gzip(next http.Handler) http.Handler + func HtmlResponseWriter(next http.Handler) http.Handler + func IsPrivateAddress(address string) (bool, error) + func JavascriptResponseWriter(next http.Handler) http.Handler + func JsonResponseWriter(next http.Handler) http.Handler + func KeycloakAuthorization(next http.Handler) http.Handler + func MsgpackResponseWriter(next http.Handler) http.Handler + func NoCache(next http.Handler) http.Handler + func ProtobufResponseWriter(next http.Handler) http.Handler + func RealIP(next http.Handler) http.Handler + func Skip() http.Handler + func String(b string) string + func TextResponseWriter(next http.Handler) http.Handler + func TimeTakenLog(next http.Handler) http.Handler + func TrueIp(r *http.Request) string + func UrlFormat(next http.Handler) http.Handler + func XmlResponseWriter(next http.Handler) http.Handler + func YamlResponseWriter(next http.Handler) http.Handler + type ContextKey struct + Name string + func (k *ContextKey) String() string + type GzipWriter struct + func (w *GzipWriter) Flush() error + func (w *GzipWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (w *GzipWriter) Write(b []byte) (int, error) + type MiddlewareFunc func(next http.Handler) http.Handler + func AllowContentEncoding(contentEncoding ...string) MiddlewareFunc + func AsMiddlewareFunc(handler http.Handler) MiddlewareFunc + func Authorize(tokenMaker token.Builder, ...) MiddlewareFunc + func BasicAuth(realm string, credentials map[string]string) MiddlewareFunc + func CORSWithConfig(config *cors.Config) MiddlewareFunc + func CheckUrlParams(expectedParams []string) MiddlewareFunc + func ContentCharset(charsets ...string) MiddlewareFunc + func ContentType(contentTypes ...string) MiddlewareFunc + func FileServer(urlPrefix, rootPath, defaultFile string, allowDirectoryListing bool) MiddlewareFunc + func GzipLevel(level int) MiddlewareFunc + func Health(endpoint, message string) MiddlewareFunc + func Maybe(mw func(http.Handler) http.Handler, maybeFn func(r *http.Request) bool) MiddlewareFunc + func RateLimiter(limit int, burst int) MiddlewareFunc + func Redirect(status int, path string) MiddlewareFunc + func RequestID(requestIdHeader string) MiddlewareFunc + func Rewrite(old, new string) MiddlewareFunc + func SetHeader(key, value string) MiddlewareFunc + func Static(path string, handler http.Handler) MiddlewareFunc + type Middlewares []MiddlewareFunc + func (m Middlewares) Append(handlers ...MiddlewareFunc) (chain Middlewares) + func (m Middlewares) Then(next http.Handler) http.Handler + func (m Middlewares) ThenFunc(fn http.HandlerFunc) http.Handler