Documentation ¶
Index ¶
- Constants
- Variables
- func AssertErr(err error) bool
- func Init()
- func LoadWasm(urlfetch string) (fetch.Fetch, promise.Promise, error)
- func LoadWasm_(urlfetch string) (fetch.Fetch, promise.Promise, error)
- type KeyObservableFunc
- type Observable
- type Rendering
- type RouteMap
- func (r *RouteMap) Add(route string, obj Rendering) error
- func (r *RouteMap) DefaultRendering(obj Rendering)
- func (r *RouteMap) Go(newroute string)
- func (r *RouteMap) LoadRendering(obj Rendering)
- func (r *RouteMap) Route() string
- func (r *RouteMap) SetRoute(route string)
- func (r *RouteMap) Start(mode int)
Constants ¶
View Source
const ( //STDROUTE STDROUTE = iota //HASHROUTE HASHROUTE )
Variables ¶
View Source
var ( //ErrKeyNotFound ErrKeyNotFound error ErrKeyNotFound = errors.New("Key not found") )
View Source
var ( //ErrRoutingAlreadyPresent ErrRoutingAlreadyPresent err ErrRoutingAlreadyPresent = errors.New("This route is already present") )
Functions ¶
Types ¶
type KeyObservableFunc ¶
type KeyObservableFunc func(value interface{})
type Observable ¶
type Observable struct {
// contains filtered or unexported fields
}
KeyObservable struct
func KeyObservable ¶
func KeyObservable() *Observable
func (*Observable) Get ¶
func (ko *Observable) Get(key string) (interface{}, error)
Get Get key in persist array . return error if key is not found
func (*Observable) RegisterFunc ¶
func (ko *Observable) RegisterFunc(key string, f KeyObservableFunc)
func (*Observable) Set ¶
func (ko *Observable) Set(key string, value interface{}, persist bool)
func (*Observable) UnRegisterFunc ¶
func (ko *Observable) UnRegisterFunc(key string, f KeyObservableFunc)
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 (*RouteMap) DefaultRendering ¶
func (*RouteMap) LoadRendering ¶
Click to show internal directories.
Click to hide internal directories.