Documentation ¶
Index ¶
- Variables
- func AfterScript(js string) func(*Config)
- func BeforeScript(js string) func(*Config)
- func DeepLinking(deepLinking bool) func(*Config)
- func DefaultModelsExpandDepth(defaultModelsExpandDepth ModelsExpandDepthType) func(*Config)
- func DocExpansion(docExpansion string) func(*Config)
- func DomID(domID string) func(*Config)
- func Handler(configFns ...func(*Config)) http.HandlerFunc
- func InstanceName(name string) func(*Config)
- func Layout(layout SwaggerLayout) func(*Config)
- func PersistAuthorization(persistAuthorization bool) func(*Config)
- func Plugins(plugins []string) func(*Config)
- func UIConfig(props map[string]string) func(*Config)
- func URL(url string) func(*Config)
- type Config
- type ModelsExpandDepthType
- type SwaggerLayout
Constants ¶
This section is empty.
Variables ¶
var WrapHandler = Handler()
WrapHandler wraps swaggerFiles.Handler and returns http.HandlerFunc.
Functions ¶
func AfterScript ¶
AfterScript holds JavaScript to be run right after the Swagger UI object is created and set on the window.
func BeforeScript ¶
BeforeScript holds JavaScript to be run right before the Swagger UI object is created.
func DefaultModelsExpandDepth ¶
func DefaultModelsExpandDepth(defaultModelsExpandDepth ModelsExpandDepthType) func(*Config)
DefaultModelsExpandDepth presents the model of response and request. set the default expansion depth for models
func DocExpansion ¶
DocExpansion list, full, none.
func Handler ¶
func Handler(configFns ...func(*Config)) http.HandlerFunc
Handler wraps `http.Handler` into `http.HandlerFunc`.
func InstanceName ¶
InstanceName set the instance name that was used to generate the swagger documents Defaults to swag.Name ("swagger").
func Layout ¶
func Layout(layout SwaggerLayout) func(*Config)
Define Layout options are BaseLayout or StandaloneLayout
func PersistAuthorization ¶
PersistAuthorization Persist authorization information over browser close/refresh. Defaults to false.
Types ¶
type Config ¶
type Config struct { UIConfig map[template.JS]template.JS URL string DocExpansion string DomID string InstanceName string BeforeScript template.JS AfterScript template.JS Layout SwaggerLayout Plugins []template.JS DefaultModelsExpandDepth ModelsExpandDepthType DeepLinking bool PersistAuthorization bool }
Config stores httpSwagger configuration variables.
type ModelsExpandDepthType ¶
type ModelsExpandDepthType int
const ( ShowModel ModelsExpandDepthType = 1 HideModel ModelsExpandDepthType = -1 )
type SwaggerLayout ¶
type SwaggerLayout string
const ( BaseLayout SwaggerLayout = "BaseLayout" StandaloneLayout SwaggerLayout = "StandaloneLayout" )