Documentation ¶
Overview ¶
Package deep_structs provides primitives to interact with the openapi HTTP API.
Code generated by github.com/KosyanMedia/oapi-codegen/v2 version (devel) DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface, m ...echo.MiddlewareFunc)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string, ...)
- type BarResponse
- type BazResponse
- type Coordinates
- type EchoRouter
- type Entities
- type EntitiesEmbeddedItem
- type Entity
- type EntityEmbedded
- type FooResponse
- type MySlice
- type MySliceItem
- type ResponseEntities
- type ResponseEntity
- type ResponseMySlice
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface, m ...echo.MiddlewareFunc)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string, m ...echo.MiddlewareFunc)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type BarResponse ¶
type BazResponse ¶
type Coordinates ¶
type Coordinates struct { Latitude *float32 `json:"latitude,omitempty"` Longitude *float32 `json:"longitude,omitempty"` }
Coordinates defines model for Coordinates.
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 Entities ¶
type Entities struct {
Embedded []EntitiesEmbeddedItem `json:"embedded,omitempty"`
}
Entities defines model for Entities.
type EntitiesEmbeddedItem ¶
type EntitiesEmbeddedItem struct { Coordinates [][]Coordinates `json:"coordinates,omitempty"` Id int `json:"id" validate:"required"` }
EntitiesEmbeddedItem defines model for EntitiesEmbeddedItem.
type Entity ¶
type Entity struct {
Embedded *EntityEmbedded `json:"embedded,omitempty"`
}
Entity defines model for Entity.
type EntityEmbedded ¶
type EntityEmbedded struct { Coordinate *Coordinates `json:"coordinate,omitempty"` Id int `json:"id" validate:"required"` }
EntityEmbedded defines model for EntityEmbedded.
type FooResponse ¶
type MySliceItem ¶
type MySliceItem struct {
Id int `json:"id" validate:"required"`
}
MySliceItem defines model for MySliceItem.
type ResponseEntities ¶
type ResponseEntities = Entities
ResponseEntities defines model for ResponseEntities.
type ResponseMySlice ¶
type ResponseMySlice = MySlice
ResponseMySlice defines model for ResponseMySlice.
type ServerInterface ¶
type ServerInterface interface { // (GET /bar) Bar(ctx echo.Context) (resp *BarResponse, err error) // (GET /baz) Baz(ctx echo.Context) (resp *BazResponse, err error) // (GET /foo) Foo(ctx echo.Context) (resp *FooResponse, err error) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) Bar ¶
func (w *ServerInterfaceWrapper) Bar(ctx echo.Context) error
Bar converts echo context to params.
func (*ServerInterfaceWrapper) Baz ¶
func (w *ServerInterfaceWrapper) Baz(ctx echo.Context) error
Baz converts echo context to params.
func (*ServerInterfaceWrapper) Foo ¶
func (w *ServerInterfaceWrapper) Foo(ctx echo.Context) error
Foo converts echo context to params.