Documentation ¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type CreateEmployeeJSONBody
- type CreateEmployeeJSONRequestBody
- type EchoRouter
- type Employee
- type EmployeeList
- type Error
- type NewEmployee
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateEmployee(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteEmployee(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) FindEmployeeByID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetAllEmployees(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Greet(ctx echo.Context) error
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 EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type CreateEmployeeJSONBody ¶
type CreateEmployeeJSONBody NewEmployee
CreateEmployeeJSONBody defines parameters for CreateEmployee.
type CreateEmployeeJSONRequestBody ¶
type CreateEmployeeJSONRequestBody CreateEmployeeJSONBody
CreateEmployeeJSONRequestBody defines body for CreateEmployee for application/json ContentType.
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type Employee ¶
type Employee struct { // Embedded struct due to allOf(#/components/schemas/NewEmployee) NewEmployee `yaml:",inline"` // Embedded fields due to inline allOf schema Id int64 `json:"id"` }
Employee defines model for Employee.
type NewEmployee ¶
NewEmployee defines model for NewEmployee.
type ServerInterface ¶
type ServerInterface interface { // (PUT /example/employee) CreateEmployee(ctx echo.Context) error // (GET /example/employee/all) GetAllEmployees(ctx echo.Context) error // (DELETE /example/employee/{id}) DeleteEmployee(ctx echo.Context, id int64) error // (GET /example/employee/{id}) FindEmployeeByID(ctx echo.Context, id int64) error // (GET /example/hello) Greet(ctx echo.Context) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateEmployee ¶
func (w *ServerInterfaceWrapper) CreateEmployee(ctx echo.Context) error
CreateEmployee converts echo context to params.
func (*ServerInterfaceWrapper) DeleteEmployee ¶
func (w *ServerInterfaceWrapper) DeleteEmployee(ctx echo.Context) error
DeleteEmployee converts echo context to params.
func (*ServerInterfaceWrapper) FindEmployeeByID ¶
func (w *ServerInterfaceWrapper) FindEmployeeByID(ctx echo.Context) error
FindEmployeeByID converts echo context to params.
func (*ServerInterfaceWrapper) GetAllEmployees ¶
func (w *ServerInterfaceWrapper) GetAllEmployees(ctx echo.Context) error
GetAllEmployees converts echo context to params.
func (*ServerInterfaceWrapper) Greet ¶
func (w *ServerInterfaceWrapper) Greet(ctx echo.Context) error
Greet converts echo context to params.