Documentation ¶
Overview ¶
Package swagger provides swagger UI resource files for swagger API service.
Should be used with gf cli tool: gf pack public boot/data-packed.go -n boot -p=swagger -y
Index ¶
Constants ¶
View Source
const ( Name = "gf-swagger" Author = "john@goframe.org" Version = "v1.0.3" Description = "gf-swagger provides swagger API document feature for GoFrame project. https://github.com/gogf/gf-swagger" MaxAuthAttempts = 10 // Max authentication count for failure try. AuthFailedInterval = time.Minute // Authentication retry interval after last failed. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Swagger ¶
type Swagger struct { Info SwaggerInfo // Swagger information. Schemes []string // Supported schemes of the swagger API like "http", "https". Host string // The host of the swagger APi like "127.0.0.1", "www.mydomain.com" BasicPath string // The URI for the swagger API like "/", "v1", "v2". BasicAuthUser string `c:"user"` // HTTP basic authentication username. BasicAuthPass string `c:"pass"` // HTTP basic authentication password. }
Swagger is the struct for swagger feature management.
func (*Swagger) Description ¶
Description returns the description of the plugin.
func (*Swagger) Install ¶
Install installs the swagger to server as a plugin. It implements the interface ghttp.Plugin.
Click to show internal directories.
Click to hide internal directories.