easy

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: MIT Imports: 9 Imported by: 0

README

Easy

Easy is a HTTP web framework written in Go (Golang).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Easy

type Easy struct {
	*mux.Router
	// contains filtered or unexported fields
}

Easy easy

func New

func New(opts ...Option) *Easy

New new easy

func (*Easy) ListenAndServe

func (e *Easy) ListenAndServe(address string) (err error)

ListenAndServe run

func (*Easy) ServeHTTP

func (e *Easy) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option option

func WithMaxHeaderBytes

func WithMaxHeaderBytes(n int) Option

WithMaxHeaderBytes set server max header size

func WithMethodNotAllowedHandler

func WithMethodNotAllowedHandler(h http.Handler) Option

WithMethodNotAllowedHandler set server 405 Handler

func WithNotFoundHandler

func WithNotFoundHandler(h http.Handler) Option

WithNotFoundHandler set server 404 Handler

func WithReadTimeout

func WithReadTimeout(t time.Duration) Option

WithReadTimeout set server read time out

func WithWriteTimeout

func WithWriteTimeout(t time.Duration) Option

WithWriteTimeout set server write time out

Directories

Path Synopsis
middleware

Jump to

Keyboard shortcuts

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