routing

package
v0.0.0-...-0b688d9 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	File = iota
	Directory
	Ws
	NotFound
)
View Source
const STATIC_DIR = "/static/"

Variables

This section is empty.

Functions

func HTTPLogger

func HTTPLogger(inner http.Handler) http.Handler

func NewRouter

func NewRouter() *mux.Router

Types

type Route

type Route struct {
	Type                   RouteType
	AuthenticationRequired bool
	Method                 string
	Path                   string
	PathPrefix             string
	SocketHandler          ws.SocketHandler
	HandlerFunc            http.HandlerFunc
}

type RouteHandler

type RouteHandler struct{}

func (RouteHandler) Db

func (RouteHandler) Index

func (h RouteHandler) Index(w http.ResponseWriter, r *http.Request)

func (RouteHandler) Login

func (h RouteHandler) Login(w http.ResponseWriter, r *http.Request)

func (RouteHandler) Logout

func (h RouteHandler) Logout(w http.ResponseWriter, r *http.Request)

func (RouteHandler) NotFound

func (h RouteHandler) NotFound(w http.ResponseWriter, r *http.Request)

func (RouteHandler) Signup

func (h RouteHandler) Signup(w http.ResponseWriter, r *http.Request)

func (RouteHandler) Static

func (h RouteHandler) Static(w http.ResponseWriter, r *http.Request)

func (RouteHandler) WebsocketConnect

func (h RouteHandler) WebsocketConnect(so socketio.Socket, i interface{})

type RouteType

type RouteType int

type Routes

type Routes []Route

Jump to

Keyboard shortcuts

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