router

package
v2.2.1-0...-4212778 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Routable

type Routable interface {
	Routings() []RoutePair
}

type RoutePair

type RoutePair struct {
	Path  string
	Thing interface{}
}

type Router

type Router struct {
	*tview.Pages
	// contains filtered or unexported fields
}

func New

func New() *Router

func (*Router) AddRoute

func (R *Router) AddRoute(path string, thing interface{}) error

func (*Router) AddRouteHandler

func (R *Router) AddRouteHandler(path string, handler mux.Handler) error

func (*Router) AddRouteHandlerFunc

func (R *Router) AddRouteHandlerFunc(path string, handler mux.HandlerFunc) error

func (*Router) AddRouteLayout

func (R *Router) AddRouteLayout(path string, layout tview.Primitive) error

func (*Router) SetActive

func (R *Router) SetActive(path string, context map[string]interface{})

func (*Router) SetNotFound

func (R *Router) SetNotFound(layout tview.Primitive)

Jump to

Keyboard shortcuts

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