echoadapter

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithRequestSchema  = goas.WithRequestSchema
	WithResponseSchema = goas.WithResponseSchema
	WithSecurity       = goas.WithSecurity
	WithTags           = goas.WithTags
	WithResponses      = goas.WithResponses
	WithQueryParams    = goas.WithQueryParams
	Req                = goas.Req
	MultipartUpload    = goas.MultipartUpload
	Res                = goas.Res
	Tags               = goas.Tags
	Security           = goas.Security
	Query              = goas.Query
	Headers            = goas.Headers
	Status             = goas.Status
	Created            = goas.Created
	NoContent          = goas.NoContent
	Responses          = goas.Responses
	JSONRoute          = goas.JSONRoute
)

Functions

func AutoDocs

func AutoDocs(e *echolib.Echo, cfg goas.Config)

AutoDocs is an alias for Docs.

func Bind

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

func Docs

func Docs(e *echolib.Echo, cfg goas.Config)

Docs mounts OpenAPI JSON and Swagger UI for a native Echo instance. It discovers routes registered directly on Echo, so you can use plain Echo routing and add Goas with a single call.

func JSON

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

func Register

func Register(r *Router, cfg goas.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 = goas.HandlerOption

type Router

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

func New

func New(e ...*echolib.Echo) *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 Wrap

func Wrap(e *echolib.Echo) *Router

Wrap converts an existing Echo instance into an Goas router adapter.

func (*Router) DELETE

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

func (*Router) Docs

func (r *Router) Docs(cfg goas.Config)

Docs mounts the generated OpenAPI JSON document and Swagger UI.

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() []goas.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