web

package
v0.0.0-...-ee68831 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapt

func Adapt(h http.Handler, adapters ...Adapter) http.Handler

Adapt h with all specified adapters.

func GracefulStartServer

func GracefulStartServer(port int, router *mux.Router)

Types

type Adapter

type Adapter func(http.Handler) http.Handler

func WideOpenCORS

func WideOpenCORS() Adapter

EnableCORS is a middleware

type Module

type Module interface {
	SetRoutes(*mux.Router) *mux.Router
	Run()
	Async()
}

type Modules

type Modules []Module

func (Modules) Init

func (modules Modules) Init() *mux.Router

func (Modules) InitWithRouter

func (modules Modules) InitWithRouter(baseRouter *mux.Router) *mux.Router

Jump to

Keyboard shortcuts

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