Documentation ¶
Index ¶
- func Disable(h *webdav.Handler, configurators ...Configurator) iris.Handler
- func DisablingHandler(h *webdav.Handler, envName string, configurators ...Configurator) iris.Handler
- func Handler(h *webdav.Handler, configurators ...Configurator) iris.Handler
- type Config
- type Configurator
- type ConfiguratorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Disable ¶
func Disable(h *webdav.Handler, configurators ...Configurator) iris.Handler
Disable turns handler off if called.
func DisablingHandler ¶
func DisablingHandler(h *webdav.Handler, envName string, configurators ...Configurator) iris.Handler
DisablingHandler turns handler off if specified environment variable passed.
func Handler ¶
func Handler(h *webdav.Handler, configurators ...Configurator) iris.Handler
Handler wraps the webdav http handler into an Iris Handler one.
Usage:
swaggerUI := swagger.Handler(swaggerFiles.Handler, swagger.URL("http://localhost:8080/swagger/doc.json"), // The url pointing to API definition)) swagger.DeepLinking(true), swagger.Prefix("/swagger"), ) app.Get("/swagger", swaggerUI) app.Get("/swagger/{any:path}", swaggerUI)
OR
swaggerUI := swagger.Handler(swaggerFiles.Handler, swagger.Config{ URL: ..., Prefix: ..., DeepLinking: ..., DocExpansion: ..., DomID: ..., }
Types ¶
type Config ¶
type Config struct { // The URL pointing to API definition (normally swagger.json or swagger.yaml). // Default is `doc.json`. URL string // The prefix url which this swagger ui is registered on. // Defaults to "/swagger". It can be a "." too. Prefix string DeepLinking bool DocExpansion string DomID string }
Config stores swagger configuration variables.
type Configurator ¶
type Configurator interface {
Configure(*Config)
}
Configurator represents a configuration setter.
type ConfiguratorFunc ¶
type ConfiguratorFunc func(*Config)
ConfiguratorFunc implements the Configuration as a function type.
func DeepLinking ¶
func DeepLinking(deepLinking bool) ConfiguratorFunc
DeepLinking set the swagger deeplinking configuration.
func DocExpansion ¶
func DocExpansion(docExpansion string) ConfiguratorFunc
DocExpansion list, full, none.
func Prefix ¶
func Prefix(prefix string) ConfiguratorFunc
Prefix presents the URL prefix of this swagger UI (normally "/swagger" or ".").
func URL ¶
func URL(url string) ConfiguratorFunc
URL presents the URL pointing to API definition (normally swagger.json or swagger.yaml).
func (ConfiguratorFunc) Configure ¶
func (fn ConfiguratorFunc) Configure(config *Config)
Configure calls itself and modifies the default config.
Directories ¶
Path | Synopsis |
---|---|
_examples
|
|
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 |