Documentation ¶
Index ¶
- Constants
- func NewAuthMiddleware(paths conf.Paths, applicationServices services.Services) func(next http.HandlerFunc) http.HandlerFunc
- func ToHttpHandler(middleware Middleware) func(http.Handler) http.HandlerFunc
- type Middleware
- func NewAnalyticsRecorderMiddleware(analyticsService analytics.Service) Middleware
- func NewCORSMiddleware(applicationServices services.Services, cacheControlMiddleware Middleware) Middleware
- func NewCacheControlMiddleware(configService config.Service) Middleware
- func NewGzipMiddleware(configService config.Service) Middleware
- type Middlewares
- type Token
Constants ¶
View Source
const ( // DefaultMaxAge provides a 2592000 second (30-day) cache max-age setting DefaultMaxAge = int64(60 * 60 * 24 * 30) )
Variables ¶
This section is empty.
Functions ¶
func NewAuthMiddleware ¶
func NewAuthMiddleware(paths conf.Paths, applicationServices services.Services) func(next http.HandlerFunc) http.HandlerFunc
func ToHttpHandler ¶
func ToHttpHandler(middleware Middleware) func(http.Handler) http.HandlerFunc
Types ¶
type Middleware ¶
type Middleware func(next http.HandlerFunc) http.HandlerFunc
func NewAnalyticsRecorderMiddleware ¶
func NewAnalyticsRecorderMiddleware(analyticsService analytics.Service) Middleware
func NewCORSMiddleware ¶
func NewCORSMiddleware( applicationServices services.Services, cacheControlMiddleware Middleware) Middleware
func NewCacheControlMiddleware ¶
func NewCacheControlMiddleware(configService config.Service) Middleware
func NewGzipMiddleware ¶
func NewGzipMiddleware(configService config.Service) Middleware
type Middlewares ¶
type Middlewares map[Token]Middleware
func (Middlewares) Get ¶
func (middlewares Middlewares) Get(token Token) Middleware
Click to show internal directories.
Click to hide internal directories.