Versions in this module Expand all Collapse all v1 v1.1.0 Jul 31, 2020 Changes in this version + const BestCompression + const BestSpeed + const DefaultCompression + const NoCompression + type Cors struct + Log *log.Logger + func NewCors(options Options) *Cors + func (cors *Cors) Invoke(c *napnap.Context, next napnap.HandlerFunc) + type GzipMiddleware struct + func NewGzip(level int) *GzipMiddleware + func (h *GzipMiddleware) Invoke(c *napnap.Context, next napnap.HandlerFunc) + type Health struct + func NewHealth() *Health + func (h *Health) Invoke(c *napnap.Context, next napnap.HandlerFunc) + type Options struct + AllowCredentials bool + AllowOriginFunc func(origin string) bool + AllowedHeaders []string + AllowedMethods []string + AllowedOrigins []string + Debug bool + ExposedHeaders []string + MaxAge int + OptionsPassthrough bool + type PPROF struct + func NewPPROF() *PPROF + func (p *PPROF) Invoke(c *napnap.Context, next napnap.HandlerFunc) + type Static struct + Dir http.FileSystem + IndexFile string + Prefix string + func NewStatic(dir string) *Static + func (s *Static) Invoke(c *napnap.Context, next napnap.HandlerFunc)