Documentation ¶
Overview ¶
Copyright 2022 chenbo. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2022 chenbo. 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 CORSOption ¶
type CORSOption func(c *CORS)
CORSOption ...
func WithAllowCredentials ¶
func WithAllowCredentials(allowCredentials bool) CORSOption
WithAllowCredentials set AllowCredentials
func WithAllowHeaders ¶
func WithAllowHeaders(allowHeaders []string) CORSOption
WithAllowHeaders set AllowHeaders
func WithAllowMethods ¶
func WithAllowMethods(allowMethods []string) CORSOption
WithAllowMethods set AllowMethods
func WithAllowOrigins ¶
func WithAllowOrigins(allowOrigins []string) CORSOption
WithAllowOrigins set AllowOrigins
func WithExposeHeaders ¶
func WithExposeHeaders(exposeHeaders []string) CORSOption
WithExposeHeaders set ExposeHeaders
type RateLimitOption ¶
type RateLimitOption func(r *RateLimit)
RateLimitOption ...
func WithWaitMaxDuration ¶
func WithWaitMaxDuration(max time.Duration) RateLimitOption
WithWaitMaxDuration set waitMaxDuration
type TimeOut ¶
type TimeOut struct {
// contains filtered or unexported fields
}
TimeOut struct
func (*TimeOut) Func ¶
func (t *TimeOut) Func() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.