Documentation ¶
Index ¶
- Constants
- type Base
- func (base *Base) AddClass(class string)
- func (base Base) Attrs() string
- func (base *Base) RemoveClass(class string)
- func (base *Base) RemoveData(key string)
- func (base *Base) RemoveStyle(key string)
- func (base *Base) SetData(key string, value string)
- func (base *Base) SetStyle(key string, value string)
- type Break
- type Button
- type Container
- type Element
- type Heading1
- type Heading2
- type Heading3
- type Heading4
- type HorizontalRule
- type Image
- type InputPassword
- type InputText
- type Link
- type List
- type ListItem
- type Panel
- type Paragraph
- type RawElement
- type Span
- type Sparkline
- type TextArea
Constants ¶
const ( //SparklineLine is a flag for an chart type using lines SparklineLine = iota //SparklineBar is a flag for an chart type using bar SparklineBar //SparklineTristate is a flag for an chart type using tristate SparklineTristate //SparklineDiscrete is a flag for an chart type using discrete SparklineDiscrete //SparklineBullet is a flag for an chart type using Bullet SparklineBullet //SparklinePie is a flag for an chart type using pie SparklinePie //SparklineBox is a flag for an chart type using box SparklineBox )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
Base is an type base for all elements. This means that all Elements can use the attributes listed below.
func (*Base) RemoveClass ¶
RemoveClass delete an class string in Classes slice
func (*Base) RemoveData ¶
RemoveData delete a value in Data map
func (*Base) RemoveStyle ¶
RemoveStyle delete a value in Style map
type Container ¶
type Container struct {
Body []Element
}
Container is an base to elements with body
func (*Container) AddElement ¶
AddElement put a new element on Body
type Element ¶
type Element interface {
String() string
}
Element is an interface for html components
type HorizontalRule ¶
type HorizontalRule struct {
Base
}
HorizontalRule produce the hr tag
func (HorizontalRule) String ¶
func (hr HorizontalRule) String() string
String implements element interface into HorizontalRule
type InputPassword ¶ added in v0.1.2
type InputPassword struct {
Base
}
InputPassword element produces an HTML password input
func (InputPassword) String ¶ added in v0.1.2
func (pass InputPassword) String() string
String return a string with input password
type Link ¶
type Link struct { Base Container Text string HTMLEncode bool URL string NewWindow bool PostBack []string }
Link produce the html anchor
type RawElement ¶ added in v0.1.3
type RawElement struct {
Raw string
}
RawElement is an elementa to return raw html code
func (*RawElement) String ¶ added in v0.1.3
func (raw *RawElement) String() string
String emit html text for RawElement