Documentation ¶
Index ¶
- Constants
- func ConvertObjectToSwaggerParameter(params map[string]interface{}, object interface{}, subObj bool) parameters.SwaggParameter
- func NewArrayParameterConfig(in, name, description string, required bool, minItems, maxItems int, ...) structures.Config
- func NewBasicParameterConfig(in, name, description string, required bool) structures.Config
- func NewIntegerParameterConfig(in, name, description string, required bool, ...) structures.Config
- func NewMainConfig(version, title, description, host, basePath string) structures.Config
- func NewNumberParameterConfig(in, name, description string, required bool, ...) structures.Config
- func NewRequestConfig(description, operationId, summary string, ...) structures.Config
- func NewRequiredMainConfig(version, title string) structures.Config
- func NewRequiredParameterConfig(in, name string) structures.Config
- func NewStringParameterConfig(in, name, description string, required bool, format string, ...) structures.Config
- func ReturnNonStructureObject(params map[string]interface{}, object interface{}) parameters.SwaggParameter
- type Parameter
- type Response
- type SwaggerGroupWrapper
- type SwaggerPathWrapper
- type SwaggerRouterWrapper
Constants ¶
View Source
const ( InBody = "body" InPath = "path" InQuery = "query" InHeader = "header" InFromData = "fromData" SecurityBearer = "Bearer" SecurityName = "Authorization" TypesJson = "json" TypesBson = "bson" )
Variables ¶
This section is empty.
Functions ¶
func ConvertObjectToSwaggerParameter ¶
func ConvertObjectToSwaggerParameter(params map[string]interface{}, object interface{}, subObj bool) parameters.SwaggParameter
func NewArrayParameterConfig ¶
func NewBasicParameterConfig ¶
func NewBasicParameterConfig(in, name, description string, required bool) structures.Config
func NewMainConfig ¶
func NewMainConfig(version, title, description, host, basePath string) structures.Config
func NewRequestConfig ¶
func NewRequestConfig(description, operationId, summary string, security, consumes, produces, tags []string) structures.Config
func NewRequiredMainConfig ¶
func NewRequiredMainConfig(version, title string) structures.Config
func NewRequiredParameterConfig ¶
func NewRequiredParameterConfig(in, name string) structures.Config
func ReturnNonStructureObject ¶
func ReturnNonStructureObject(params map[string]interface{}, object interface{}) parameters.SwaggParameter
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
func NewParameter ¶
func NewParameter(params structures.Config, obj interface{}) Parameter
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewResponse ¶
type SwaggerGroupWrapper ¶
type SwaggerGroupWrapper interface { Use(middleware ...gin.HandlerFunc) Path(path string) SwaggerPathWrapper Group(path, tag string) SwaggerGroupWrapper GET(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) POST(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) DELETE(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) HEAD(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) OPTIONS(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) PATCH(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) PUT(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) // contains filtered or unexported methods }
type SwaggerPathWrapper ¶
type SwaggerPathWrapper interface { GET(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) POST(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) DELETE(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) HEAD(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) OPTIONS(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) PATCH(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) PUT(config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) // contains filtered or unexported methods }
type SwaggerRouterWrapper ¶
type SwaggerRouterWrapper interface { Group(path, tag string) SwaggerGroupWrapper Use(middleware ...gin.HandlerFunc) GenerateFiles(filepath string) error GenerateBasePath(pathUrl string) error NewBasicSecurityDefinition(title string) NewApiKeySecurityDefinition(title, name string, inHeader bool) NewOauth2ImplicitSecurityDefinition(title, authorizationUrl string) NewOauth2PasswordSecurityDefinition(title, tokenURL string) NewOauth2ApplicationSecurityDefinition(title, tokenURL string) NewOauth2AccessCodeSecurityDefinition(title, authorizationUrl, tokenURL string) GET(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) POST(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) DELETE(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) HEAD(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) OPTIONS(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) PATCH(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) PUT(path string, config structures.Config, parameters []Parameter, requests map[int]Response, handlerFunc ...gin.HandlerFunc) // contains filtered or unexported methods }
func NewSwaggerRouterWrapper ¶
func NewSwaggerRouterWrapper(config structures.Config, r *gin.Engine) SwaggerRouterWrapper
Click to show internal directories.
Click to hide internal directories.