Versions in this module Expand all Collapse all v0 v0.10.2 Jun 24, 2020 Changes in this version + const DefaultMaxBodyBytes + const DefaultTag + const EnumTag + const ExplodeTag + const HeaderTag + const PathTag + const QueryTag + const RequiredTag + const ValidationTag + func CustomValidatorFunc(f func(v *validator.Validate) error) error + func DefaultErrorHook(c *gin.Context, e error) (int, interface{}) + func DefaultExecHook(c *gin.Context, h gin.HandlerFunc, fname string) + func DefaultRenderHook(c *gin.Context, statusCode int, payload interface{}) + func Deprecated(b bool) func(*Route) + func Description(s string) func(*Route) + func GetRoutes() map[string]*Route + func Handler(h interface{}, status int, options ...func(*Route)) gin.HandlerFunc + func ListenAndServe(handler http.Handler, errorHandler func(error), opt ...ListenOptFunc) + func MediaType() string + func ParseTagKey(tag string) (string, error) + func SetBindHook(bh BindHook) + func SetErrorHook(eh ErrorHook) + func SetExecHook(eh ExecHook) + func SetRenderHook(rh RenderHook, mt string) + func Summary(s string) func(*Route) + func Tags(tags []string) func(*Route) + type BindError struct + func (be BindError) Error() string + func (be BindError) ValidationErrors() validator.ValidationErrors + type BindHook func(*gin.Context, interface{}) error + var DefaultBindingHook BindHook = DefaultBindingHookMaxBodyBytes(DefaultMaxBodyBytes) + func DefaultBindingHookMaxBodyBytes(maxBodyBytes int64) BindHook + func GetBindHook() BindHook + type ErrorHook func(*gin.Context, error) (int, interface{}) + func GetErrorHook() ErrorHook + type ExecHook func(*gin.Context, gin.HandlerFunc, string) + func GetExecHook() ExecHook + type ListenOpt struct + Server *http.Server + ShutdownTimeout time.Duration + Signals []os.Signal + type ListenOptFunc func(*ListenOpt) error + func CatchSignals(sig ...os.Signal) ListenOptFunc + func KeepAliveTimeout(t time.Duration) ListenOptFunc + func ListenAddr(addr string) ListenOptFunc + func ReadHeaderTimeout(t time.Duration) ListenOptFunc + func ReadTimeout(t time.Duration) ListenOptFunc + func ShutdownTimeout(t time.Duration) ListenOptFunc + func WriteTimeout(t time.Duration) ListenOptFunc + type RenderHook func(*gin.Context, int, interface{}) + func GetRenderHook() RenderHook + type Route struct + func GetRouteByHandler(h gin.HandlerFunc) (*Route, error) + func (r *Route) GetDefaultStatusCode() int + func (r *Route) GetDeprecated() bool + func (r *Route) GetDescription() string + func (r *Route) GetHandler() reflect.Value + func (r *Route) GetPath() string + func (r *Route) GetSummary() string + func (r *Route) GetTags() []string + func (r *Route) GetVerb() string + func (r *Route) HandlerName() string + func (r *Route) HandlerNameWithPackage() string + func (r *Route) InputType() reflect.Type + func (r *Route) OutputType() reflect.Type