package engine

import "github.com/labstack/echo/engine"

Index

Types

type Config

type Config struct {
	Address      string
	TLSCertfile  string
	TLSKeyfile   string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Config defines engine configuration.

type Engine

type Engine interface {
	SetHandler(Handler)
	SetLogger(*log.Logger)
	Start()
}

Engine defines an interface for HTTP server.

type Handler

type Handler interface {
	ServeHTTP(Request, Response)
}

type HandlerFunc

type HandlerFunc func(Request, Response)

func (HandlerFunc) ServeHTTP

func (h HandlerFunc) ServeHTTP(req Request, res Response)
type Header interface {
	Add(string, string)
	Del(string)
	Get(string) string
	Set(string, string)
}

Header defines an interface for HTTP header.

type Request

type Request interface {
	TLS() bool
	Scheme() string
	Host() string
	URI() string
	URL() URL
	Header() Header
	// Proto() string
	// ProtoMajor() int
	// ProtoMinor() int
	RemoteAddress() string
	Method() string
	Body() io.ReadCloser
	FormValue(string) string
}

Request defines an interface for HTTP request.

type Response

type Response interface {
	Header() Header
	WriteHeader(int)
	Write(b []byte) (int, error)
	Status() int
	Size() int64
	Committed() bool
	SetWriter(io.Writer)
	Writer() io.Writer
}

Response defines an interface for HTTP response.

type URL

type URL interface {
	SetPath(string)
	Path() string
	QueryValue(string) string
}

URL defines an interface for HTTP request url.

Source Files

engine.go

Directories

PathSynopsis
engine/fasthttp
engine/standard
Version
v2.0.0-beta.1+incompatible
Published
Mar 11, 2016
Platform
js/wasm
Imports
3 packages
Last checked
4 hours ago

Tools for package owners.