Documentation
¶
Index ¶
- func CustomFavicon16(favicon string) func(*Config)
- func CustomFavicon32(favicon string) func(*Config)
- func CustomLogo(logoBase64 string) func(*Config)
- func CustomWrapHandler(config *Config, handler *webdav.Handler) gin.HandlerFunc
- func DeepLinking(deepLinking bool) func(*Config)
- func DefaultModelsExpandDepth(depth int) func(*Config)
- func DisablingCustomWrapHandler(config *Config, handler *webdav.Handler, envName string) gin.HandlerFunc
- func DisablingWrapHandler(handler *webdav.Handler, envName string) gin.HandlerFunc
- func DocExpansion(docExpansion string) func(*Config)
- func InstanceName(name string) func(*Config)
- func LogoAspectRatio(ratio string) func(*Config)
- func LogoHeight(height string) func(*Config)
- func Oauth2DefaultClientID(oauth2DefaultClientID string) func(*Config)
- func PersistAuthorization(persistAuthorization bool) func(*Config)
- func SetDarkMode(isDarkMode bool) func(*Config)
- func URL(url string) func(*Config)
- func WrapHandler(handler *webdav.Handler, options ...func(*Config)) gin.HandlerFunc
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomFavicon16 ¶ added in v1.7.4
CustomFavicon16 sets a custom 16x16 favicon using base64 encoded image string or URL.
func CustomFavicon32 ¶ added in v1.7.4
CustomFavicon32 sets a custom 32x32 favicon using base64 encoded image string or URL.
func CustomLogo ¶ added in v1.7.3
CustomLogo sets a custom logo using base64 encoded image string.
func CustomWrapHandler ¶ added in v1.6.4
func CustomWrapHandler(config *Config, handler *webdav.Handler) gin.HandlerFunc
CustomWrapHandler wraps `http.Handler` into `gin.HandlerFunc`.
func DeepLinking ¶ added in v1.6.4
DeepLinking set the swagger deep linking configuration.
func DefaultModelsExpandDepth ¶ added in v1.6.4
DefaultModelsExpandDepth set the default expansion depth for models (set to -1 completely hide the models).
func DisablingCustomWrapHandler ¶ added in v1.6.4
func DisablingCustomWrapHandler(config *Config, handler *webdav.Handler, envName string) gin.HandlerFunc
DisablingCustomWrapHandler turn handler off if specified environment variable passed.
func DisablingWrapHandler ¶ added in v1.6.4
func DisablingWrapHandler(handler *webdav.Handler, envName string) gin.HandlerFunc
DisablingWrapHandler turn handler off if specified environment variable passed.
func DocExpansion ¶ added in v1.6.4
DocExpansion list, full, none.
func InstanceName ¶ added in v1.6.4
InstanceName set the instance name that was used to generate the swagger documents Defaults to swag.Name ("swagger").
func LogoAspectRatio ¶ added in v1.7.3
LogoAspectRatio sets the aspect ratio for the custom logo (e.g., "16 / 9", "4 / 3", "658 / 141"). Default is "1 / 1" (square) if not specified.
func LogoHeight ¶ added in v1.7.6
LogoHeight sets the height of the custom logo (e.g., "40px", "50px", "3rem"). Default is "35px" if not specified. Width is calculated automatically based on aspect ratio.
func Oauth2DefaultClientID ¶ added in v1.6.4
Oauth2DefaultClientID set the default client ID used for OAuth2
func PersistAuthorization ¶ added in v1.6.4
PersistAuthorization Persist authorization information over browser close/refresh. Defaults to false.
func SetDarkMode ¶ added in v1.6.5
func URL ¶ added in v1.6.4
URL presents the url pointing to API definition (normally swagger.json or swagger.yaml).
func WrapHandler ¶
func WrapHandler(handler *webdav.Handler, options ...func(*Config)) gin.HandlerFunc
WrapHandler wraps `http.Handler` into `gin.HandlerFunc`.
Types ¶
type Config ¶ added in v1.6.4
type Config struct {
// The url pointing to API definition (normally swagger.json or swagger.yaml). Default is `doc.json`.
URL string
DocExpansion string
InstanceName string
Title string
DefaultModelsExpandDepth int
DeepLinking bool
PersistAuthorization bool
Oauth2DefaultClientID string
IsDarkMode bool
CustomLogo string
LogoAspectRatio string
LogoHeight string
CustomFavicon16 string
CustomFavicon32 string
}
Config stores ginSwagger configuration variables.
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
basic
command
|
|
|
basic/docs
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag |
|
gzipped
command
|
|
|
gzipped/docs
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag |
|
multiple
command
|
|
|
multiple/docs
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag |