Documentation ¶
Index ¶
- func CustomWrapHandler(config *Config, handler *webdav.Handler) stgin.API
- func DeepLinking(deepLinking bool) func(*Config)
- func DefaultModelsExpandDepth(depth int) func(*Config)
- func DisablingCustomWrapHandler(config *Config, handler *webdav.Handler, envName string) stgin.API
- func DisablingWrapHandler(handler *webdav.Handler, envName string) stgin.API
- func DocExpansion(docExpansion string) func(*Config)
- func InstanceName(name string) func(*Config)
- func Oauth2DefaultClientID(oauth2DefaultClientID string) func(*Config)
- func PersistAuthorization(persistAuthorization bool) func(*Config)
- func ServedOnPrefix(prefix string, server *stgin.Server, options ...func(*Config))
- func URL(url string) func(*Config)
- func WrapHandler(handler *webdav.Handler, options ...func(*Config)) stgin.API
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomWrapHandler ¶
CustomWrapHandler wraps `http.Handler` into `stgin.API`.
func DeepLinking ¶
DeepLinking set the swagger deep linking configuration.
func DefaultModelsExpandDepth ¶
DefaultModelsExpandDepth set the default expansion depth for models (set to -1 completely hide the models).
func DisablingCustomWrapHandler ¶
DisablingCustomWrapHandler turn handler off if specified environment variable passed.
func DisablingWrapHandler ¶
DisablingWrapHandler turn handler off if specified environment variable passed.
func DocExpansion ¶
DocExpansion list, full, none.
func InstanceName ¶
InstanceName set the instance name that was used to generate the swagger documents Defaults to swag.Name ("swagger").
func Oauth2DefaultClientID ¶
Oauth2DefaultClientID set the default client ID used for OAuth2
func PersistAuthorization ¶
PersistAuthorization Persist authorization information over browser close/refresh. Defaults to false.
func ServedOnPrefix ¶
Types ¶
type Config ¶
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 }
Config stores stginSwagger configuration variables.