plug

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 20 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 AuthGRPC added in v0.0.32

func AuthGRPC(ctx context.Context) (context.Context, error)

func AuthGRPCBasic added in v0.0.32

func AuthGRPCBasic(ctx context.Context) (context.Context, error)

func AuthGRPCBasicSelector added in v0.0.32

func AuthGRPCBasicSelector(_ context.Context, c interceptors.CallMeta) bool

func AuthGRPCSelector added in v0.0.32

func AuthGRPCSelector(_ context.Context, c interceptors.CallMeta) bool

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 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