middlewares

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package middlewares 提供一系列中间

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCompress

func AddCompress(name string, f compress.WriterFunc) error

AddCompress 添加压缩方法。框架本身已经指定了 gzip 和 deflate 两种方法。

func Handler

func Handler(h http.Handler, conf *webconfig.WebConfig) http.Handler

Handler 将所有配置文件中指定的中间件应用于 h,并返回新的 http.Handler 实例

func SetCompress

func SetCompress(name string, f compress.WriterFunc)

SetCompress 修改或是添加压缩方法。

Types

This section is empty.

Jump to

Keyboard shortcuts

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