Documentation ¶
Index ¶
- func BrotliDecode(buf []byte) ([]byte, error)
- func BrotliEncode(buf []byte, quality int) ([]byte, error)
- func CheckAndGetValueFromEnv(value string) (result string)
- func GetHeaderValue(header http.Header, name string) (value []string)
- func GetHumanReadableSize(size int) string
- func GetIdentity(req *http.Request) []byte
- func GetRewriteRegexp(rewrites []string) map[*regexp.Regexp]string
- func GetTimeConsuming(startedAt time.Time) int
- func Gunzip(buf []byte) ([]byte, error)
- func Gzip(buf []byte, level int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrotliEncode ¶
BrotliEncode brotli压缩
func CheckAndGetValueFromEnv ¶
CheckAndGetValueFromEnv 检查并从env中获取值
func GetHeaderValue ¶
GetHeaderValue 获取 http header的值
func GetHumanReadableSize ¶
GetHumanReadableSize 获取便于阅读的数据大小
func GetRewriteRegexp ¶
GetRewriteRegexp 获取rewrite的正式匹配表
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.