middleware

package
v0.0.0-...-d45fff1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(provider *security.UserProvider, manager *security.TokenManager, expectedScopes []security.Scope) mux.MiddlewareFunc

Types

type Cors

type Cors struct {
	AllowedMethods []string
	AllowedHeaders []string
}

func NewCors

func NewCors() *Cors

func (*Cors) Middleware

func (m *Cors) Middleware(next http.Handler) http.Handler

type Logging

type Logging struct {
	Logger *zap.Logger
}

func NewLogging

func NewLogging(logger *zap.Logger) *Logging

func (*Logging) Middleware

func (m *Logging) Middleware(next http.Handler) http.Handler

type LoggingResponseWriter

type LoggingResponseWriter struct {
	http.ResponseWriter
	StatusCode int
}

func (*LoggingResponseWriter) WriteHeader

func (w *LoggingResponseWriter) WriteHeader(statusCode int)

type Recovery

type Recovery struct{}

func NewRecovery

func NewRecovery() *Recovery

func (*Recovery) Middleware

func (m *Recovery) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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