Documentation ¶
Index ¶
- func PrettyB(t BType) string
- func PrettyE(t EType) string
- func PrettyP(t PType) string
- type BType
- type Block
- type Content
- func (con *Content) Add(blk *Block)
- func (con *Content) Append(blk *Block)
- func (con *Content) Insert(e *Element)
- func (con *Content) Int(key, val string)
- func (con *Content) Merge(ncon *Content)
- func (con *Content) Sect(sect *Section)
- func (con *Content) Set(key, val string)
- func (con *Content) Target(key string, data *Content)
- type Document
- type EType
- type Element
- type PType
- type Path
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶ added in v0.1.1
type Content ¶ added in v0.1.1
type Content struct { Inline []*Element `json:"inline_elements,omitempty" bson:"inline_elements,omitempty"` Meta map[string]string `json:"metadata_user,omitempty" bson:metadata_user,omitempty"` Internal map[string]string `json:"metadata_internal,omitempty" bson:"metadata_internal,omitempty"` Data []*Block `json:"data,omitempty" bson:"data,omitempty"` Targets map[string]*Content `json:"targets,omitempty" bson:"targets,omitempty"` Sections []*Section `json:"sections" bson:"sections,omitempty"` }
func NewContent ¶ added in v0.1.1
func NewContent() *Content
type Document ¶ added in v0.1.2
type Document struct { Valid bool `json:"-"` Path *Path `json:"path"` Content *Content `json:"content"` }
func NewDocument ¶ added in v0.1.2
type Element ¶
type Element struct { Type EType `json:"element_type" bson:"element_type"` Text string `json:"text" bson:"text"` File string `json:"file" bson:"file"` Line int `json:"line" bson:"line"` Pos int `json:"position" bson:"position"` Dom string `json:"domain,omitempty" bson:"domain,omitempty"` Role string `json:"role,omitempty" bson:"role,omitempty"` Key string `json:"key,omitempty" bson:"key,omitempty"` }
func NewElement ¶
type Path ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.