srv

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithExcludedExtensions  = gzip.WithExcludedExtensions
	WithExcludedPaths       = gzip.WithExcludedPaths
	WithExcludedPathsRegexs = gzip.WithExcludedPathsRegexs
	WithDecompressFn        = gzip.WithDecompressFn
)
View Source
var MaxLoggerBodySize = 1024 * 1024

Functions

func GetContentType

func GetContentType(h http.Header) string

func PrintRoutes

func PrintRoutes(e *Engine)

func TestHandle added in v0.0.12

func TestHandle(handler http.Handler, method, path string, headers map[string]string) *httptest.ResponseRecorder

func TestHandleWithBody added in v0.0.12

func TestHandleWithBody(handler http.Handler, method, path string, body io.Reader, headers map[string]string) *httptest.ResponseRecorder

Types

type CORSConfig

type CORSConfig = cors.Config

type Context

type Context = gin.Context

type Engine

type Engine = gin.Engine

func Default

func Default() *Engine

func New

func New() *Engine

type HandlerFunc

type HandlerFunc = gin.HandlerFunc

func Auth

func Auth(skipPaths ...string) HandlerFunc

func CORS

func CORS() HandlerFunc

func CORSWithConfig

func CORSWithConfig(config CORSConfig) HandlerFunc

func GZIP

func GZIP(options ...gzip.Option) HandlerFunc

func GZIPWithLevel

func GZIPWithLevel(level int, options ...gzip.Option) HandlerFunc

func Init

func Init() HandlerFunc

func Logger

func Logger(skipPaths ...string) HandlerFunc

func Recovery

func Recovery() HandlerFunc

type RouterGroup

type RouterGroup = gin.RouterGroup

Jump to

Keyboard shortcuts

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