Documentation
¶
Index ¶
- type StructuredCollection
- type TemplateTree
- func (t *TemplateTree) Add(path string, value interface{})
- func (t *TemplateTree) CarryForward(keys []string) map[string]interface{}
- func (t *TemplateTree) ChildrenAs(path, delimiter string) string
- func (t *TemplateTree) Get(path string) interface{}
- func (t *TemplateTree) GetField(key string) interface{}
- func (t *TemplateTree) Render(template string) string
- func (t *TemplateTree) SetField(key string, value interface{})
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StructuredCollection ¶
type StructuredCollection struct {
Name string `json:"name"`
Items []interface{} `json:"items"`
Fields []string `json:"fields"`
}
func NewStructuredCollection ¶
func NewStructuredCollection(name string, fields []string) *StructuredCollection
func (*StructuredCollection) Add ¶
func (c *StructuredCollection) Add(item interface{})
func (*StructuredCollection) Render ¶
func (c *StructuredCollection) Render(template string) string
type TemplateTree ¶
type TemplateTree struct {
// contains filtered or unexported fields
}
func NewTemplateTree ¶
func NewTemplateTree() *TemplateTree
func (*TemplateTree) Add ¶
func (t *TemplateTree) Add(path string, value interface{})
func (*TemplateTree) CarryForward ¶
func (t *TemplateTree) CarryForward(keys []string) map[string]interface{}
func (*TemplateTree) ChildrenAs ¶
func (t *TemplateTree) ChildrenAs(path, delimiter string) string
func (*TemplateTree) Get ¶
func (t *TemplateTree) Get(path string) interface{}
func (*TemplateTree) GetField ¶
func (t *TemplateTree) GetField(key string) interface{}
func (*TemplateTree) Render ¶
func (t *TemplateTree) Render(template string) string
func (*TemplateTree) SetField ¶
func (t *TemplateTree) SetField(key string, value interface{})
Click to show internal directories.
Click to hide internal directories.