router

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = fmt.Errorf("not found")
View Source
var JSON = &jsonpb.Marshaler{
	EnumsAsInts: false,
	Indent:      "  ",
}

Functions

func NotFound

func NotFound(rw http.ResponseWriter)

func Proto

func Proto(rw http.ResponseWriter, pb proto.Message) error

Types

type Module

type Module struct {
	*router.Module
	Logger *logger.Module
}

func (*Module) Init

func (m *Module) Init(c *service.Config)

func (*Module) InternalError

func (m *Module) InternalError(rw http.ResponseWriter, err error)

func (*Module) ServeHTTP

func (m *Module) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (*Module) Subrouter

func (m *Module) Subrouter(path string) *httprouter.Router

Directories

Path Synopsis
middleware

Jump to

Keyboard shortcuts

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