Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/lzurbriggen/oapi-codegen version (devel) DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type GetPets200JSONResponse
- type GetPetsRequestObject
- type GetPetsResponseObject
- type GinServerOptions
- type MiddlewareFunc
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type GetPets200JSONResponse ¶
type GetPets200JSONResponse externalRef0.Pet
func (GetPets200JSONResponse) VisitGetPetsResponse ¶
func (response GetPets200JSONResponse) VisitGetPetsResponse(w http.ResponseWriter) error
type GetPetsRequestObject ¶
type GetPetsRequestObject struct { }
type GetPetsResponseObject ¶
type GetPetsResponseObject interface {
VisitGetPetsResponse(w http.ResponseWriter) error
}
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶
type ServerInterface ¶
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetPets ¶
func (siw *ServerInterfaceWrapper) GetPets(c *gin.Context)
GetPets operation middleware
type StrictHandlerFunc ¶
type StrictHandlerFunc = runtime.StrictGinHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = runtime.StrictGinMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // (GET /pets) GetPets(ctx context.Context, request GetPetsRequestObject) (GetPetsResponseObject, error) }
StrictServerInterface represents all server handlers.