routing

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//STDROUTE
	STDROUTE = iota
	//HASHROUTE
	HASHROUTE
)

Variables

View Source
var (
	//ErrRoutingAlreadyPresent ErrRoutingAlreadyPresent err
	ErrRoutingAlreadyPresent = errors.New("This route is already present")
)

Functions

This section is empty.

Types

type Rendering

type Rendering interface {
	OnLoad(d document.Document, n node.Node, route string) (*promise.Promise, []Rendering)
	OnEndChildsRendering()
	OnEndChildRendering(r Rendering)
	//Node attach childs to this node
	Node(r Rendering) node.Node
	OnUnload()
}

Rendering interface

type RouteMap

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

Router struct

func Router

func Router() *RouteMap

Router

func (*RouteMap) Add

func (r *RouteMap) Add(route string, obj Rendering) error

func (*RouteMap) DefaultRendering

func (r *RouteMap) DefaultRendering(obj Rendering)

func (*RouteMap) Go

func (r *RouteMap) Go(newroute string)

func (*RouteMap) LoadRendering

func (r *RouteMap) LoadRendering(obj Rendering)

func (*RouteMap) Route

func (r *RouteMap) Route() string

func (*RouteMap) SetRoute

func (r *RouteMap) SetRoute(route string)

func (*RouteMap) Start

func (r *RouteMap) Start(mode int)

Jump to

Keyboard shortcuts

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