plug

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptJSON

func AcceptJSON(h http.Handler) http.Handler

func Auth

func Auth(h http.Handler) http.Handler

func NOOP

func NOOP(w http.ResponseWriter, r *http.Request)

func PutSecureBrowserHeaders

func PutSecureBrowserHeaders(h http.Handler) http.Handler

Types

type Pipeline

type Pipeline []Plug

func API

func API() Pipeline

func APIProtected added in v0.0.24

func APIProtected() Pipeline

func Browser

func Browser() Pipeline

func (Pipeline) And

func (p Pipeline) And(n ...Plug) Pipeline

func (Pipeline) Pass

func (p Pipeline) Pass(h http.HandlerFunc) http.Handler

func (Pipeline) Path

func (p Pipeline) Path(method, path string, handler func(w http.ResponseWriter, r *http.Request)) Plug

func (Pipeline) PathDELETE

func (p Pipeline) PathDELETE(path string, handler func(w http.ResponseWriter, r *http.Request)) Plug

func (Pipeline) PathGET

func (p Pipeline) PathGET(path string, handler func(w http.ResponseWriter, r *http.Request)) Plug

func (Pipeline) PathPOST

func (p Pipeline) PathPOST(path string, handler func(w http.ResponseWriter, r *http.Request)) Plug

func (Pipeline) PathPUT

func (p Pipeline) PathPUT(path string, handler func(w http.ResponseWriter, r *http.Request)) Plug

func (Pipeline) Prefix

func (p Pipeline) Prefix(path string, handler func(w http.ResponseWriter, r *http.Request)) Plug

type Plug

type Plug func(http.Handler) http.Handler

func Ok

func Ok(ok bool, pipe Plug) Plug

func PREFIX

func PREFIX(prefix string, pipe ...Plug) Plug

func Track

func Track() Plug

Jump to

Keyboard shortcuts

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