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

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