handler

package
v0.0.0-...-e3aeae6 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRoutes = []Route{}
)

Functions

func CachedResolverMiddleware

func CachedResolverMiddleware(r Resolver) echo.MiddlewareFunc

func HandleHTTPStatus

func HandleHTTPStatus(ec echo.Context) error

func HandleIP

func HandleIP(c echo.Context) error

func NewServer

func NewServer(debug bool) *echo.Echo

func NoCacheHeaderMiddleware

func NoCacheHeaderMiddleware() echo.MiddlewareFunc

func Wrap

func Wrap(c echo.Context) *ctx

Types

type Context

type Context interface {
	echo.Context
}

Context is wrapped echo.Context

type HTTPStatusResponse

type HTTPStatusResponse struct {
	Message string `json:"message" xml:"Message" codec:"message"`
}

type IPResponse

type IPResponse struct {
	Host string `json:"host"`
	IP   string `json:"ip"`
}

func (IPResponse) String

func (r IPResponse) String() string

type Resolver

type Resolver interface {
	LookupAddr(ctx context.Context, in string) (names []string, err error)
}

func ResolverFromEcho

func ResolverFromEcho(ctx echo.Context) Resolver

type Route

type Route struct {
	Methods []string
	Path    string
	Handler echo.HandlerFunc
}

Jump to

Keyboard shortcuts

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