Documentation ¶
Index ¶
- func CustomWrapHandler(config *Config, h *webdav.Handler) gin.HandlerFunc
- func DeepLinking(deepLinking bool) func(c *Config)
- func DisablingCustomWrapHandler(config *Config, h *webdav.Handler, envName string) gin.HandlerFunc
- func DisablingWrapHandler(h *webdav.Handler, envName string) gin.HandlerFunc
- func OAuth(oauth *OAuthConfig) func(c *Config)
- func OAuth2RedirectURL(url string) func(c *Config)
- func URL(url string) func(c *Config)
- func WrapHandler(h *webdav.Handler, confs ...func(c *Config)) gin.HandlerFunc
- type Config
- type OAuthConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomWrapHandler ¶
func CustomWrapHandler(config *Config, h *webdav.Handler) gin.HandlerFunc
CustomWrapHandler wraps `http.Handler` into `gin.HandlerFunc`
func DeepLinking ¶
DeepLinking set the swagger deeplinking configuration
func DisablingCustomWrapHandler ¶
DisablingCustomWrapHandler turn handler off if specified environment variable passed
func DisablingWrapHandler ¶
func DisablingWrapHandler(h *webdav.Handler, envName string) gin.HandlerFunc
DisablingWrapHandler turn handler off if specified environment variable passed
func OAuth ¶
func OAuth(oauth *OAuthConfig) func(c *Config)
OAuth set the swagger oauth configuration
func OAuth2RedirectURL ¶
func WrapHandler ¶
func WrapHandler(h *webdav.Handler, confs ...func(c *Config)) gin.HandlerFunc
WrapHandler wraps `http.Handler` into `gin.HandlerFunc`.
Types ¶
type Config ¶
type Config struct { //The url pointing to API definition (normally swagger.json or swagger.yaml). Default is `doc.json`. URL string DeepLinking bool OAuth *OAuthConfig OAuth2RedirectURL string }
Config stores ginSwagger configuration variables.
type OAuthConfig ¶
type OAuthConfig struct { // The ID of the client sent to the OAuth2 IAM provider. ClientId string // 🚨 Never use this parameter in your production environment. It exposes cruicial security information. This feature is intended for dev/test environments only. 🚨 // Default clientSecret. MUST be a string ClientSecret string // The OAuth2 realm that the client should operate in. If not applicable, use empty string. Realm string // The name to display for the application in the authentication popup. AppName string }
Configuration for Swagger UI OAuth2 integration. See https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/ for further details.
Click to show internal directories.
Click to hide internal directories.