Documentation ¶
Index ¶
- Variables
- func Cors(c *gin.Context, config *CorsConfig)
- func DefaultCors(c *gin.Context)
- func ParseGlob(tpl *template.Template, dir string, pattern string) (t *template.Template, err error)
- func RandStringBytes(n int) string
- func UUID() (_uuid string, err error)
- type CorsConfig
- type TemplateRenderer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAllowHeaders = []string{"authorization", "token", "content-type", "x-requested-with"} DefaultAllowMethods = []string{http.MethodPost, http.MethodGet, http.MethodPut, http.MethodDelete, http.MethodOptions, http.MethodPatch} )
Functions ¶
func DefaultCors ¶
Types ¶
type CorsConfig ¶
type CorsConfig struct { AllowOrigins []string AllowAnyOrigin bool AllowMethods []string AllowHeaders []string AllowCredentials bool }
func DefaultCorsConfig ¶
func DefaultCorsConfig() *CorsConfig
type TemplateRenderer ¶
TemplateRenderer is a custom html/template renderer for Echo framework
Click to show internal directories.
Click to hide internal directories.