echoadapter

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithRequestSchema  = openapi.WithRequestSchema
	WithResponseSchema = openapi.WithResponseSchema
	WithSecurity       = openapi.WithSecurity
	WithTags           = openapi.WithTags
	WithResponses      = openapi.WithResponses
	WithQueryParams    = openapi.WithQueryParams
	JSONRoute          = openapi.JSONRoute
)

Functions

func Bind

func Bind(c echolib.Context, v interface{}) error

func JSON

func JSON(c echolib.Context, code int, v interface{}) error

func Register

func Register(r *Router, cfg openapi.Config)

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group allows applying shared options (e.g., tags/security) and a common path prefix.

func (*Group) DELETE

func (g *Group) DELETE(p string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Group) GET

func (g *Group) GET(p string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Group) Handle

func (g *Group) Handle(method, p string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Group) PATCH

func (g *Group) PATCH(p string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Group) POST

func (g *Group) POST(p string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Group) PUT

func (g *Group) PUT(p string, h echolib.HandlerFunc, opts ...HandlerOption)

type HandlerOption

type HandlerOption = openapi.HandlerOption

type Router

type Router struct {
	Echo *echolib.Echo
	// contains filtered or unexported fields
}

func New

func New() *Router

func NewEchoAdapters

func NewEchoAdapters(e *echolib.Echo) *Router

NewEchoAdapters wraps an existing *echo.Echo into the adapter Router so callers who create their own echo server (e.g., echo.New() or echo.Default()) can use the adapter.

func (*Router) DELETE

func (r *Router) DELETE(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) GET

func (r *Router) GET(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) Group

func (r *Router) Group(prefix string, opts ...HandlerOption) *Group

func (*Router) HEAD

func (r *Router) HEAD(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) Handle

func (r *Router) Handle(method, path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) OPTIONS

func (r *Router) OPTIONS(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) PATCH

func (r *Router) PATCH(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) POST

func (r *Router) POST(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) PUT

func (r *Router) PUT(path string, h echolib.HandlerFunc, opts ...HandlerOption)

func (*Router) Routes

func (r *Router) Routes() []openapi.RouteMeta

type SecurityRequirement

type SecurityRequirement = openapi3.SecurityRequirement

Jump to

Keyboard shortcuts

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