gospars

package
v0.0.0-...-b1c4f89 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NO_ROUTE_FOUND = "NO_ROUTE_FOUND"

Variables

This section is empty.

Functions

func GetHashPath

func GetHashPath(path string) string

func GetQueryParams

func GetQueryParams(queryString string) map[string]string

func MatchPathAndGetPathParams

func MatchPathAndGetPathParams(configPath string, locationPath string) (bool, map[string]string)

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(errCallback func(error)) *Router

func (*Router) Init

func (r *Router) Init(landingHash string)

func (*Router) On

func (r *Router) On(path string, v ViewController)

type TemplateBody

type TemplateBody struct {
	// contains filtered or unexported fields
}

func (TemplateBody) Render

func (t TemplateBody) Render(data interface{}) string

type ViewController

type ViewController interface {
	Handle(templateBody TemplateBody, params map[string]string)
	GetTemplatePath() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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