Documentation ¶
Index ¶
- func Generate(c Component) string
- func GenerateChild(c Component, key string) string
- func ReRender(c Component) error
- type BaseComponent
- func (bc *BaseComponent) AddChild(child Component)
- func (bc *BaseComponent) Callback(event string, args ...interface{}) Component
- func (bc *BaseComponent) GetAttribute(key string) string
- func (bc *BaseComponent) GetAttributes() map[string]string
- func (bc *BaseComponent) GetCallback(key string) interface{}
- func (bc *BaseComponent) GetCallbacks() map[string]interface{}
- func (bc *BaseComponent) GetChild(key string) Component
- func (bc *BaseComponent) GetChildren() map[string]Component
- func (bc *BaseComponent) GetChildrenList() []Component
- func (bc *BaseComponent) GetId() string
- func (bc *BaseComponent) GetKey() string
- func (bc *BaseComponent) GetParent() Component
- func (bc *BaseComponent) GetPostValue() string
- func (bc *BaseComponent) GetTag() string
- func (bc *BaseComponent) GetValue() string
- func (bc *BaseComponent) HasChildren() bool
- func (bc *BaseComponent) IsSelfClosing() bool
- func (bc *BaseComponent) OnMessage(message *Message) Component
- func (bc *BaseComponent) RegisterOnClick(callback interface{}) Component
- func (bc *BaseComponent) Render() string
- func (bc *BaseComponent) SetAttribute(key, value string)
- func (bc *BaseComponent) SetCallback(key string, callback interface{})
- func (bc *BaseComponent) SetChild(key string, child Component)
- func (bc *BaseComponent) SetKey(key string)
- func (bc *BaseComponent) SetParent(c Component)
- func (bc *BaseComponent) SetPostValue(value string)
- func (bc *BaseComponent) SetSelfClosing(value bool)
- func (bc *BaseComponent) SetTag(tag string)
- func (bc *BaseComponent) SetValue(value string)
- type Component
- type JsBase
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateChild ¶
Types ¶
type BaseComponent ¶
type BaseComponent struct { JsBase Key string Tag string Value string PostValue string Parent Component Children map[string]Component ChildrenIndexMap []string Iterator uint Callbacks map[string]interface{} Attributes map[string]string SelfClosing bool }
func (*BaseComponent) AddChild ¶
func (bc *BaseComponent) AddChild(child Component)
func (*BaseComponent) Callback ¶
func (bc *BaseComponent) Callback(event string, args ...interface{}) Component
func (*BaseComponent) GetAttribute ¶
func (bc *BaseComponent) GetAttribute(key string) string
func (*BaseComponent) GetAttributes ¶
func (bc *BaseComponent) GetAttributes() map[string]string
func (*BaseComponent) GetCallback ¶
func (bc *BaseComponent) GetCallback(key string) interface{}
func (*BaseComponent) GetCallbacks ¶
func (bc *BaseComponent) GetCallbacks() map[string]interface{}
func (*BaseComponent) GetChild ¶
func (bc *BaseComponent) GetChild(key string) Component
func (*BaseComponent) GetChildren ¶
func (bc *BaseComponent) GetChildren() map[string]Component
func (*BaseComponent) GetChildrenList ¶ added in v0.0.2
func (bc *BaseComponent) GetChildrenList() []Component
func (*BaseComponent) GetId ¶
func (bc *BaseComponent) GetId() string
func (*BaseComponent) GetKey ¶
func (bc *BaseComponent) GetKey() string
func (*BaseComponent) GetParent ¶
func (bc *BaseComponent) GetParent() Component
func (*BaseComponent) GetPostValue ¶ added in v0.0.2
func (bc *BaseComponent) GetPostValue() string
func (*BaseComponent) GetTag ¶
func (bc *BaseComponent) GetTag() string
func (*BaseComponent) GetValue ¶ added in v0.0.2
func (bc *BaseComponent) GetValue() string
func (*BaseComponent) HasChildren ¶
func (bc *BaseComponent) HasChildren() bool
func (*BaseComponent) IsSelfClosing ¶ added in v0.0.2
func (bc *BaseComponent) IsSelfClosing() bool
func (*BaseComponent) OnMessage ¶
func (bc *BaseComponent) OnMessage(message *Message) Component
func (*BaseComponent) RegisterOnClick ¶
func (bc *BaseComponent) RegisterOnClick(callback interface{}) Component
func (*BaseComponent) Render ¶
func (bc *BaseComponent) Render() string
func (*BaseComponent) SetAttribute ¶
func (bc *BaseComponent) SetAttribute(key, value string)
func (*BaseComponent) SetCallback ¶
func (bc *BaseComponent) SetCallback(key string, callback interface{})
func (*BaseComponent) SetChild ¶
func (bc *BaseComponent) SetChild(key string, child Component)
func (*BaseComponent) SetKey ¶
func (bc *BaseComponent) SetKey(key string)
func (*BaseComponent) SetParent ¶
func (bc *BaseComponent) SetParent(c Component)
func (*BaseComponent) SetPostValue ¶ added in v0.0.2
func (bc *BaseComponent) SetPostValue(value string)
func (*BaseComponent) SetSelfClosing ¶ added in v0.0.2
func (bc *BaseComponent) SetSelfClosing(value bool)
func (*BaseComponent) SetTag ¶
func (bc *BaseComponent) SetTag(tag string)
func (*BaseComponent) SetValue ¶ added in v0.0.2
func (bc *BaseComponent) SetValue(value string)
type Component ¶
type Component interface { GetId() string GetKey() string SetKey(string) GetTag() string SetTag(string) SetParent(c Component) GetParent() Component GetChildren() map[string]Component GetChildrenList() []Component HasChildren() bool SetChild(key string, child Component) GetChild(key string) Component AddChild(child Component) SetProperty(key string, value interface{}) SetPropertyWithId(id string, key string, value interface{}) Render() string OnMessage(message *Message) Component RegisterOnClick(callback interface{}) Component SetCallback(key string, callback interface{}) GetCallback(key string) interface{} GetCallbacks() map[string]interface{} Callback(event string, args ...interface{}) Component Register(c Component) SetAttribute(key, value string) GetAttribute(key string) string GetAttributes() map[string]string GetValue() string SetValue(value string) GetPostValue() string SetPostValue(value string) IsSelfClosing() bool SetSelfClosing(bool) }
func NewBaseComponent ¶
func NewBaseComponent() Component
func NewComponent ¶
Click to show internal directories.
Click to hide internal directories.