Documentation ¶
Overview ¶
Copyright 2021 jianfengye. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2021 jianfengye. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Index ¶
- type CORS
- type CORSOption
- func WithAllowCredentials(allowCredentials bool) CORSOption
- func WithAllowHeaders(allowHeaders []string) CORSOption
- func WithAllowMethods(allowMethods []string) CORSOption
- func WithAllowOrigins(allowOrigins []string) CORSOption
- func WithExposeHeaders(exposeHeaders []string) CORSOption
- func WithMaxAge(maxAge string) CORSOption
- type Cost
- type RateLimit
- type RateLimitOption
- type TimeOut
- type TimeOutOption
- type Trace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORS ¶ added in v1.0.3
type CORS struct {
// contains filtered or unexported fields
}
CORS cors
type CORSOption ¶ added in v1.0.3
type CORSOption func(c *CORS)
CORSOption ...
func WithAllowCredentials ¶ added in v1.0.3
func WithAllowCredentials(allowCredentials bool) CORSOption
WithAllowCredentials set AllowCredentials
func WithAllowHeaders ¶ added in v1.0.3
func WithAllowHeaders(allowHeaders []string) CORSOption
WithAllowHeaders set AllowHeaders
func WithAllowMethods ¶ added in v1.0.3
func WithAllowMethods(allowMethods []string) CORSOption
WithAllowMethods set AllowMethods
func WithAllowOrigins ¶ added in v1.0.3
func WithAllowOrigins(allowOrigins []string) CORSOption
WithAllowOrigins set AllowOrigins
func WithExposeHeaders ¶ added in v1.0.3
func WithExposeHeaders(exposeHeaders []string) CORSOption
WithExposeHeaders set ExposeHeaders
type RateLimit ¶ added in v1.0.3
type RateLimit struct {
// contains filtered or unexported fields
}
RateLimit ...
func NewRateLimit ¶ added in v1.0.3
func NewRateLimit(opts ...RateLimitOption) *RateLimit
NewRateLimit ...
type RateLimitOption ¶ added in v1.0.3
type RateLimitOption func(r *RateLimit)
RateLimitOption ...
func WithWaitMaxDuration ¶ added in v1.0.3
func WithWaitMaxDuration(max time.Duration) RateLimitOption
WithWaitMaxDuration set waitMaxDuration
type TimeOut ¶ added in v1.0.3
type TimeOut struct {
// contains filtered or unexported fields
}
TimeOut struct
func (*TimeOut) Func ¶ added in v1.0.3
func (t *TimeOut) Func() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.