router

package
v0.0.0-...-c381765 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRouter

type APIRouter struct {
	RequestHandler *http.ServeMux
	Router         Router
}

APIRouter is the base implementation for routers

type HalRouter

type HalRouter APIRouter

HalRouter is the main router to use with the HalClient

func (HalRouter) AddRoute

func (r HalRouter) AddRoute(url string, handler http.Handler)

AddRoute creates a new api endpoint

type Router

type Router interface {
	AddRoute(url string, handler http.Handler)
}

Router is the interface for implementing new routers

Jump to

Keyboard shortcuts

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