func RequestID(ctx context.Context) string
A Chain is a middleware chain use for http request processing.
type Chain struct {
// contains filtered or unexported fields
}
func NewChain(middlewares ...Middleware) Chain
NewChain creates a new Middleware chain. The chain will call the Middleware in the order provided.
func (c Chain) Handler(h http.Handler) http.Handler
Handler returns an http.Handler for this chain.
type GenerateIDFunc func() string
type Middleware func(http.Handler) http.Handler
func RequireCert() Middleware
RequireCert is used to ensure that a verified TLS client certificate was used for authentication.
func WithRequestID(generator GenerateIDFunc) Middleware