middleware

package
v0.0.0-...-69c2794 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationHeaderKey = "Authorization"
	AuthorizationType      = "Bearer"
)

Variables

This section is empty.

Functions

func BuildChain

func BuildChain(h http.Handler, m ...func(http.Handler) http.Handler) http.Handler

Types

type Middleware

type Middleware interface {
	// KeyCloakOAuth はKeyCloakのOAuth認証を行うミドルウェアを返す
	KeyCloakOAuth(h http.HandlerFunc) http.HandlerFunc
	// Integrate は環境に応じたミドルウェアを返す
	Integrate(h http.HandlerFunc) http.Handler
	// Recover はpanicをrecoverするミドルウェアを返す
	Recover(h http.Handler) http.Handler
	// AccessLogger はアクセスログを出力するミドルウェアを返す
	AccessLogger(h http.Handler) http.Handler
	// AllowAllOrigins は全てのオリジンからのリクエストを許可するミドルウェアを返す
	AllowAllOrigins(h http.Handler) http.Handler
	// CorsWithEnv は環境に応じたCORS設定を行うミドルウェアを返す
	CorsWithEnv(h http.Handler) http.Handler
}

func NewMiddleware

func NewMiddleware() Middleware

Jump to

Keyboard shortcuts

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