Documentation ¶
Index ¶
- func BasePath(v string) swag.Option
- func ContactEmail(v string) swag.Option
- func Description(v string) swag.Option
- func Endpoints(endpoints ...*swag.Endpoint) swag.Option
- func Host(v string) swag.Option
- func License(name, url string) swag.Option
- func Schemes(v ...string) swag.Option
- func Security(scheme string, scopes ...string) swag.Option
- func SecurityScheme(name string, options ...SecuritySchemeOption) swag.Option
- func Tag(name, description string, options ...TagOption) swag.Option
- func TermsOfService(v string) swag.Option
- func Title(v string) swag.Option
- func Version(v string) swag.Option
- type SecuritySchemeOption
- func APIKeySecurity(name, in string) SecuritySchemeOption
- func BasicSecurity() SecuritySchemeOption
- func BearerAuth(name, in string) SecuritySchemeOption
- func OAuth2Scope(scope, description string) SecuritySchemeOption
- func OAuth2Security(flow, authorizationURL, tokenURL string) SecuritySchemeOption
- func SecuritySchemeDescription(description string) SecuritySchemeOption
- type TagOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecurityScheme ¶
func SecurityScheme(name string, options ...SecuritySchemeOption) swag.Option
SecurityScheme creates a new security definition for the API.
func TermsOfService ¶
TermsOfService sets info.termsOfService
Types ¶
type SecuritySchemeOption ¶
type SecuritySchemeOption func(securityScheme *swag.SecurityScheme)
SecuritySchemeOption provides additional customizations to the SecurityScheme.
func APIKeySecurity ¶
func APIKeySecurity(name, in string) SecuritySchemeOption
APIKeySecurity defines a security scheme for API key authentication. "in" is the location of the API key (query or header). "name" is the name of the header or query parameter to be used.
func BasicSecurity ¶
func BasicSecurity() SecuritySchemeOption
BasicSecurity defines a security scheme for HTTP Basic authentication.
func BearerAuth ¶
func BearerAuth(name, in string) SecuritySchemeOption
BearerAuth defines a security scheme for Bearer authentication. "in" is the location of the token (query or header). "name" is the name of the header or query parameter to be used.
func OAuth2Scope ¶
func OAuth2Scope(scope, description string) SecuritySchemeOption
OAuth2Scope adds a new scope to the security scheme.
func OAuth2Security ¶
func OAuth2Security(flow, authorizationURL, tokenURL string) SecuritySchemeOption
OAuth2Security defines a security scheme for OAuth2 authentication. Flow can be one of implicit, password, application, or accessCode.
func SecuritySchemeDescription ¶
func SecuritySchemeDescription(description string) SecuritySchemeOption
SecuritySchemeDescription sets the security scheme's description.
type TagOption ¶
TagOption provides additional customizations to the #Tag option
func TagDescription ¶
TagDescription sets externalDocs.description on the tag field