# README
gin
Gin is a HTTP web framework
Version = "v1.9.1" // github.com/gin-gonic/gin
# Functions
BasicAuth returns a Basic HTTP Authorization middleware.
BasicAuthForProxy returns a Basic HTTP Proxy-Authorization middleware.
BasicAuthForRealm returns a Basic HTTP Authorization middleware.
Bind is a helper function for given interface object and returns a Gin middleware.
CreateTestContext returns a fresh engine and context for testing purposes.
CreateTestContextOnly returns a fresh context base on the engine for testing purposes.
CustomRecovery returns a middleware that recovers from any panics and calls the provided handle func to handle it.
CustomRecoveryWithWriter returns a middleware for a given writer that recovers from any panics and calls the provided handle func to handle it.
Default returns an Engine instance with the Logger and Recovery middleware already attached.
Dir returns a http.FileSystem that can be used by http.FileServer().
DisableBindValidation closes the default validator.
DisableConsoleColor disables color output in the console.
EnableJsonDecoderDisallowUnknownFields sets true for binding.EnableDecoderDisallowUnknownFields to call the DisallowUnknownFields method on the JSON Decoder instance.
EnableJsonDecoderUseNumber sets true for binding.EnableDecoderUseNumber to call the UseNumber method on the JSON Decoder instance.
ErrorLogger returns a HandlerFunc for any error type.
ErrorLoggerT returns a HandlerFunc for a given error type.
ForceConsoleColor force color output in the console.
IsDebugging returns true if the framework is running in debug mode.
Logger instances a Logger middleware that will write the logs to gin.DefaultWriter.
LoggerWithConfig instance a Logger middleware with config.
LoggerWithFormatter instance a Logger middleware with the specified log format function.
LoggerWithWriter instance a Logger middleware with the specified writer buffer.
Mode returns current gin mode.
New returns a new blank Engine instance without any middleware attached.
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
SetMode sets gin mode according to input string.
WrapF is a helper function for wrapping http.HandlerFunc and returns a Gin middleware.
WrapH is a helper function for wrapping http.Handler and returns a Gin middleware.
# Constants
AuthProxyUserKey is the cookie name for proxy_user credential in basic auth for proxy.
AuthUserKey is the cookie name for user credential in basic auth.
BindKey indicates a default bind key.
BodyBytesKey indicates a default body bytes key.
ContextKey is the key that a Context returns itself for.
No description provided by the author
DebugMode indicates gin mode is debug.
EnvGinMode indicates environment name for gin mode.
ErrorTypeAny indicates any other error.
ErrorTypeBind is used when Context.Bind() fails.
ErrorTypeNu indicates any other error.
ErrorTypePrivate indicates a private error.
ErrorTypePublic indicates a public error.
ErrorTypeRender is used when Context.Render() fails.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
Content-Type MIME of the most common data formats.
PlatformCloudflare when using Cloudflare's CDN.
PlatformFlyIO when running on Fly.io.
PlatformGoogleAppEngine when running on Google App Engine.
ReleaseMode indicates gin mode is release.
TestMode indicates gin mode is test.
No description provided by the author
# Variables
DebugPrintFunc indicates debug log output format.
DebugPrintRouteFunc indicates debug log output format.
DefaultErrorWriter is the default io.Writer used by Gin to debug errors.
DefaultWriter is the default io.Writer used by Gin for debug output and middleware output like Logger() or Recovery().
# Structs
Context is the most important part of gin.
Engine is the framework's instance, it contains the muxer, middleware and configuration settings.
Error represents a error's specification.
LogFormatterParams is the structure any formatter will be handed when time to log comes.
LoggerConfig defines the config for Logger middleware.
Negotiate contains all negotiations data.
Param is a single URL parameter, consisting of a key and a value.
RouteInfo represents a request route's specification which contains method and path and its handler.
RouterGroup is used internally to configure router, a RouterGroup is associated with a prefix and an array of handlers (middleware).
# Interfaces
IRouter defines all router handle interface includes single and group router.
IRoutes defines all router handle interface.
ResponseWriter ...
# Type aliases
Accounts defines a key/value for user/pass list of authorized logins.
No description provided by the author
ErrorType is an unsigned 64-bit error code as defined in the gin spec.
H is a shortcut for map[string]any.
HandlerFunc defines the handler used by gin middleware as return value.
HandlersChain defines a HandlerFunc slice.
LogFormatter gives the signature of the formatter function passed to LoggerWithFormatter.
OptionFunc defines the function to change the default configuration.
Params is a Param-slice, as returned by the router.
RecoveryFunc defines the function passable to CustomRecovery.
RoutesInfo defines a RouteInfo slice.
Skipper is a function to skip logs based on provided Context.