middleware

package
v0.0.0-...-52cadad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache(handler http.Handler, suffixes ...string) http.Handler

func CacheMiddleware

func CacheMiddleware(suffixes ...string) mux.MiddlewareFunc

func ContentType

func ContentType(handler http.Handler) http.Handler

func ContentTypeOptions

func ContentTypeOptions(handler http.Handler) http.Handler

func FrameOptions

func FrameOptions(handler http.Handler) http.Handler

func Gzip

func Gzip(handler http.Handler) http.Handler

Gzip creates a gzip writer if gzip encoding is accepted.

func NoCache

func NoCache(handler http.Handler) http.Handler

Types

type Chain

type Chain []mux.MiddlewareFunc

func (Chain) Handler

func (m Chain) Handler(handler http.Handler) http.Handler

type ContentTypeWriter

type ContentTypeWriter struct {
	http.ResponseWriter
}

func (ContentTypeWriter) Hijack

func (c ContentTypeWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)

func (ContentTypeWriter) Write

func (c ContentTypeWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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