goserver

package module
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2017 License: MIT Imports: 6 Imported by: 2

README

Vardius - goserver

Build Status Coverage Status

The fastest Go Server/API micro framwework, HTTP request router, multiplexer, mux.

ABOUT

Contributors:

Want to contribute ? Feel free to send pull requests!

Have problems, bugs, feature ideas? We are using the github issue tracker to manage them.

HOW TO USE

GoDoc

Usage

License

This package is released under the MIT license. See the complete license in the package:

LICENSE

Documentation

Index

Constants

View Source
const (
	GET     = "GET"
	POST    = "POST"
	PUT     = "PUT"
	DELETE  = "DELETE"
	PATCH   = "PATCH"
	OPTIONS = "OPTIONS"
)

HTTP methods constants

Variables

This section is empty.

Functions

This section is empty.

Types

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type Params

type Params map[string]string

Params type returned from request context

func ParamsFromContext

func ParamsFromContext(ctx context.Context) (Params, bool)

type Server

type Server interface {
	POST(path string, f http.HandlerFunc)
	GET(path string, f http.HandlerFunc)
	PUT(path string, f http.HandlerFunc)
	DELETE(path string, f http.HandlerFunc)
	PATCH(path string, f http.HandlerFunc)
	OPTIONS(path string, f http.HandlerFunc)
	USE(method, path string, fs ...MiddlewareFunc)
	ServeHTTP(http.ResponseWriter, *http.Request)
	ServeFiles(path string, strip bool)
	NotFound(http.Handler)
	NotAllowed(http.Handler)
}

func New

func New(fs ...MiddlewareFunc) Server

Jump to

Keyboard shortcuts

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