router

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TPugComponent

type TPugComponent struct {
	Router TRouter
	Route  struct {
		Parameters map[string]js.Value
	}
}

type TRoute

type TRoute struct {
	Path      string
	Component reflect.Type
	Meta      interface{}
}

type TRouter

type TRouter struct {
	Routes       map[string]TRoute
	TagMain      *js.Value
	CurrentRoute struct {
		Name       string
		Parameters map[string]js.Value
	}
	NotFoundRouteName string
}

func GetRouter

func GetRouter() *TRouter

func (*TRouter) Add

func (_this *TRouter) Add(Routes map[string]TRoute)

func (*TRouter) CheckRoute

func (_this *TRouter) CheckRoute()

func (*TRouter) Push

func (_this *TRouter) Push(Name string, Parameters map[string]js.Value)

func (*TRouter) Render

func (_this *TRouter) Render(Component reflect.Type)

Jump to

Keyboard shortcuts

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