deep_structs

package
v2.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

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

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 BarResponse struct {
	Code    int
	JSON200 *Entity
}

type BazResponse

type BazResponse struct {
	Code    int
	JSON200 MySlice
}

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 FooResponse struct {
	Code    int
	JSON200 *Entities
}

type Kek404JSONResponseBodySchema added in v2.1.15

type Kek404JSONResponseBodySchema struct {
	Numfield *int `json:"numfield,omitempty"`
}

Kek404JSONResponseBodySchema defines model for Kek404JSONResponseBodySchema.

type KekResponse added in v2.1.15

type KekResponse struct {
	Code    int
	JSON200 interface{}
	JSON404 *Kek404JSONResponseBodySchema
}

type MySlice

type MySlice = []MySliceItem

MySlice defines model for MySlice.

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 ResponseEntity

type ResponseEntity = Entity

ResponseEntity defines model for ResponseEntity.

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)

	// (GET /kek)
	Kek(ctx echo.Context) (resp *KekResponse, 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.

func (*ServerInterfaceWrapper) Kek added in v2.1.15

func (w *ServerInterfaceWrapper) Kek(ctx echo.Context) error

Kek converts echo context to params.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL