Documentation ¶
Index ¶
- Constants
- func AccessLogMiddleware(logSuccessfulRequests, excludeRemoteAddr bool, excludedHeaderPatterns []string, ...) http.Handler
- func CORSMiddleware(allowedOrigins []string, allowedMethods []string, allowedHeaders []string, ...) http.HandlerFunc
- func CommonHeadersMiddleware(next http.Handler) http.Handler
- func GetRequestID(ctx context.Context) string
- func LoggerMiddleware(next http.Handler) http.Handler
- func PathVariablesLoggerMiddleware(next http.Handler, pathVariableNames ...string) http.Handler
- func PostgresMiddleware(pool *pgxpool.Pool, mode pgx.TxAccessMode, next http.Handler) http.Handler
- func PreventCachingMiddleware(next http.Handler) http.HandlerFunc
- func RequestIDMiddleware(next http.Handler) http.HandlerFunc
- type Handlers
Constants ¶
View Source
const RequestIDHeaderName = "X-Request-ID"
Variables ¶
This section is empty.
Functions ¶
func AccessLogMiddleware ¶
func CORSMiddleware ¶
func GetRequestID ¶
func PostgresMiddleware ¶
func PreventCachingMiddleware ¶
func PreventCachingMiddleware(next http.Handler) http.HandlerFunc
func RequestIDMiddleware ¶
func RequestIDMiddleware(next http.Handler) http.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.