Documentation ¶
Index ¶
- type Cors
- type CorsOption
- func WithAllHeaders(allowHeaders []string) CorsOption
- func WithAllOrigins(allowOrigins []string) CorsOption
- func WithAllowCredentials(allowCredentials bool) CorsOption
- func WithAllowMethods(allowMethods []string) CorsOption
- func WithExposeHeaders(exposeHeaders []string) CorsOption
- func WithMaxAge(maxAge string) CorsOption
- type Timeout
- type TimeoutOption
- type Trace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cors ¶
type Cors struct {
// contains filtered or unexported fields
}
func NewCors ¶
func NewCors(opts ...CorsOption) *Cors
func (*Cors) Func ¶
func (c *Cors) Func() gin.HandlerFunc
type CorsOption ¶
type CorsOption func(c *Cors)
func WithAllHeaders ¶
func WithAllHeaders(allowHeaders []string) CorsOption
func WithAllOrigins ¶
func WithAllOrigins(allowOrigins []string) CorsOption
func WithAllowCredentials ¶
func WithAllowCredentials(allowCredentials bool) CorsOption
func WithAllowMethods ¶
func WithAllowMethods(allowMethods []string) CorsOption
func WithExposeHeaders ¶
func WithExposeHeaders(exposeHeaders []string) CorsOption
func WithMaxAge ¶
func WithMaxAge(maxAge string) CorsOption
type Timeout ¶
type Timeout struct {
// contains filtered or unexported fields
}
func NewTimeout ¶
func NewTimeout(opts ...TimeoutOption) *Timeout
func (*Timeout) Func ¶
func (t *Timeout) Func() gin.HandlerFunc
type TimeoutOption ¶
type TimeoutOption func(t *Timeout)
func WithTimeout ¶
func WithTimeout(d time.Duration) TimeoutOption
Click to show internal directories.
Click to hide internal directories.