handler

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(handler Handler, logger logger.Logger) echo.HandlerFunc

Build returns HandlerFunc

Types

type Context

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

Context is a server contexts. Just wraps echo.Context.

func NewContext

func NewContext(ec echo.Context, logger logger.Logger) *Context

NewContext returns new Context.

func (*Context) Bind

func (ctx *Context) Bind(i interface{}) error

func (*Context) GetQuery

func (ctx *Context) GetQuery(key string) string

func (*Context) JSON

func (ctx *Context) JSON(status int, v interface{}) error

func (*Context) NoContent

func (ctx *Context) NoContent(status int) error

func (*Context) QueryParams

func (ctx *Context) QueryParams() url.Values

func (*Context) Text added in v1.2.0

func (ctx *Context) Text(status int, b []byte) error

type Handler

type Handler interface {
	Func(ctx *Context) error // Func is http handler
	Description() string     // Description returns API description.
	Methods() []string       // Methods returns allowed http methods
}

Handler is provider of basic handler func

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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