Documentation ¶
Index ¶
- Constants
- func Render(component *Element, data ...map[string]any) string
- func RenderToBytes(component *Element, data ...map[string]any) []byte
- func RenderToBytesWithStats(component *Element, data ...map[string]any) []byte
- func RenderWithStats(component *Element, data ...map[string]any) string
- type ComponentFunc
- type ComponentStruct
- type Context
- func (c *Context) CountNode()
- func (c *Context) Get(key string, defaultValue ...any) any
- func (c *Context) GetBool(key string, defaultValue ...bool) bool
- func (c *Context) GetString(key string, defaultValue ...string) string
- func (c *Context) Has(key string) bool
- func (c *Context) Set(key string, data any) *Context
- func (c *Context) SetData(data map[string]any)
- func (c *Context) Stats()
- func (c *Context) Unset(key string) *Context
- type DocumentProps
- type Element
- func A(props Props, children ...*Element) *Element
- func Abbr(props Props, children ...*Element) *Element
- func Address(props Props, children ...*Element) *Element
- func Area(props Props, children ...*Element) *Element
- func Article(props Props, children ...*Element) *Element
- func Aside(props Props, children ...*Element) *Element
- func Audio(props Props, children ...*Element) *Element
- func B(props Props, children ...*Element) *Element
- func Base(props Props, children ...*Element) *Element
- func Bdi(props Props, children ...*Element) *Element
- func Bdo(props Props, children ...*Element) *Element
- func Blockquote(props Props, children ...*Element) *Element
- func Body(props Props, children ...*Element) *Element
- func Br() *Element
- func Button(props Props, children ...*Element) *Element
- func CSS(css template.CSS) *Element
- func CSSString(css string, args ...any) *Element
- func Canvas(props Props, children ...*Element) *Element
- func Caption(props Props, children ...*Element) *Element
- func Cite(props Props, children ...*Element) *Element
- func Code(props Props, children ...*Element) *Element
- func Col(props Props, children ...*Element) *Element
- func Colgroup(props Props, children ...*Element) *Element
- func Comment(comment string, args ...any) *Element
- func Component(component any) *Element
- func CreateElement(tag string, props Props, childs ...*Element) *Element
- func CreateFragment(childs ...*Element) *Element
- func Data(props Props, children ...*Element) *Element
- func Datalist(props Props, children ...*Element) *Element
- func Dd(props Props, children ...*Element) *Element
- func Del(props Props, children ...*Element) *Element
- func Details(props Props, children ...*Element) *Element
- func Dfn(props Props, children ...*Element) *Element
- func Dialog(props Props, children ...*Element) *Element
- func Div(props Props, children ...*Element) *Element
- func Dl(props Props, children ...*Element) *Element
- func Doctype(doctype ...any) *Element
- func Document(documentProps *DocumentProps, props Props) *Element
- func Dt(props Props, children ...*Element) *Element
- func Em(props Props, children ...*Element) *Element
- func Embed(props Props, children ...*Element) *Element
- func Fieldset(props Props, children ...*Element) *Element
- func Figure(props Props, children ...*Element) *Element
- func Footer(props Props, children ...*Element) *Element
- func Form(props Props, children ...*Element) *Element
- func Fragment(childs ...*Element) *Element
- func H1(props Props, children ...*Element) *Element
- func H2(props Props, children ...*Element) *Element
- func H3(props Props, children ...*Element) *Element
- func H4(props Props, children ...*Element) *Element
- func H5(props Props, children ...*Element) *Element
- func H6(props Props, children ...*Element) *Element
- func HTML(html template.HTML) *Element
- func HTMLString(html string, args ...any) *Element
- func Head(props Props, children ...*Element) *Element
- func Header(props Props, children ...*Element) *Element
- func Hgroup(props Props, children ...*Element) *Element
- func Hr(props ...Props) *Element
- func Html(props Props, children ...*Element) *Element
- func I(props Props, children ...*Element) *Element
- func Iframe(props Props, children ...*Element) *Element
- func Img(source any, alt string, props ...Props) *Element
- func Input(props Props) *Element
- func Ins(props Props, children ...*Element) *Element
- func JS(js template.JS) *Element
- func JSString(js string, args ...any) *Element
- func Kbd(props Props, children ...*Element) *Element
- func Keygen(props Props, children ...*Element) *Element
- func Label(props Props, children ...*Element) *Element
- func Legend(props Props, children ...*Element) *Element
- func Li(props Props, children ...*Element) *Element
- func Link(rel string, href any, props Props) *Element
- func Main(props Props, children ...*Element) *Element
- func Map(props Props, children ...*Element) *Element
- func Mark(props Props, children ...*Element) *Element
- func Menu(props Props, children ...*Element) *Element
- func Menuitem(props Props, children ...*Element) *Element
- func Meta(name, content string, props Props) *Element
- func MetaCharset(charset ...string) *Element
- func MetaItemProp(name, content string, props Props) *Element
- func MetaProperty(name, content string, props Props) *Element
- func Meter(props Props, children ...*Element) *Element
- func Nav(props Props, children ...*Element) *Element
- func Noscript(children ...*Element) *Element
- func Object(props Props, children ...*Element) *Element
- func Ol(props Props, children ...*Element) *Element
- func Optgroup(props Props, children ...*Element) *Element
- func Option(props Props, children ...*Element) *Element
- func Output(props Props, children ...*Element) *Element
- func P(props Props, children ...*Element) *Element
- func Param(props Props, children ...*Element) *Element
- func Pre(props Props, children ...*Element) *Element
- func Progress(props Props, children ...*Element) *Element
- func Q(props Props, children ...*Element) *Element
- func Rb(props Props, children ...*Element) *Element
- func Rp(props Props, children ...*Element) *Element
- func Rt(props Props, children ...*Element) *Element
- func Rtc(props Props, children ...*Element) *Element
- func Ruby(props Props, children ...*Element) *Element
- func S(props Props, children ...*Element) *Element
- func Samp(props Props, children ...*Element) *Element
- func Script(source any, props Props) *Element
- func Section(props Props, children ...*Element) *Element
- func Select(props Props, children ...*Element) *Element
- func Small(props Props, children ...*Element) *Element
- func Source(props Props, children ...*Element) *Element
- func Span(props Props, children ...*Element) *Element
- func Strong(props Props, children ...*Element) *Element
- func StyleTag(style template.CSS, props ...Props) *Element
- func Sub(props Props, children ...*Element) *Element
- func Summary(props Props, children ...*Element) *Element
- func Sup(props Props, children ...*Element) *Element
- func Table(props Props, children ...*Element) *Element
- func Tbody(props Props, children ...*Element) *Element
- func Td(props Props, children ...*Element) *Element
- func Template(props Props, children ...*Element) *Element
- func Text(text string) *Element
- func Textarea(props Props, children ...*Element) *Element
- func Textf(format string, args ...any) *Element
- func Tfoot(props Props, children ...*Element) *Element
- func Th(props Props, children ...*Element) *Element
- func Thead(props Props, children ...*Element) *Element
- func Time(props Props, children ...*Element) *Element
- func Title(title string, args ...any) *Element
- func Tr(props Props, children ...*Element) *Element
- func Track(props Props, children ...*Element) *Element
- func U(props Props, children ...*Element) *Element
- func Ul(props Props, children ...*Element) *Element
- func Var(props Props, children ...*Element) *Element
- func Video(props Props, children ...*Element) *Element
- func Wbr(props Props, children ...*Element) *Element
- type Props
- type Renderer
- type Style
Constants ¶
View Source
const ( TYPE_ELEMENT = iota TYPE_FRAGMENT TYPE_COMPONENT TYPE_COMPONENT_STRUCT TYPE_TEXT TYPE_JS TYPE_CSS TYPE_HTML )
noinspection GoSnakeCaseUsage
Variables ¶
This section is empty.
Functions ¶
func RenderToBytes ¶ added in v0.2.2
func RenderToBytesWithStats ¶ added in v0.2.2
Types ¶
type ComponentFunc ¶
type ComponentStruct ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func NewContextWithData ¶
type DocumentProps ¶
type Element ¶
type Element struct { Type int Tag string Props Props Childs []*Element Text string CSS template.CSS JS template.JS HTML template.HTML // contains filtered or unexported fields }
func Blockquote ¶
func CreateFragment ¶
func Document ¶
func Document(documentProps *DocumentProps, props Props) *Element
func HTMLString ¶
func MetaCharset ¶
func MetaItemProp ¶
func MetaProperty ¶
Click to show internal directories.
Click to hide internal directories.