middleware

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestID

func RequestID(ctx context.Context) string

Types

type Chain

type Chain struct {
	// contains filtered or unexported fields
}

A Chain is a middleware chain use for http request processing.

func NewChain

func NewChain(middlewares ...Middleware) Chain

NewChain creates a new Middleware chain. The chain will call the Middleware in the order provided.

func (Chain) Handler

func (c Chain) Handler(h http.Handler) http.Handler

Handler returns an http.Handler for this chain.

type GenerateIDFunc

type GenerateIDFunc func() string

type Middleware

type Middleware func(http.Handler) http.Handler

func RequireCert

func RequireCert() Middleware

RequireCert is used to ensure that a verified TLS client certificate was used for authentication.

func WithRequestID

func WithRequestID(generator GenerateIDFunc) Middleware

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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