Documentation ¶
Index ¶
- func DisplayChunks(prefix string, chunks orgTree)
- func SetVerbosity(level int)
- type BasicChunk
- type Block
- type Chunk
- type ChunkChanges
- type ChunkRef
- type ComparableChunk
- type DataBlock
- type Headline
- type Jsonable
- type Keyword
- type OrgChunks
- func (chunks *OrgChunks) GetChunk(id string) ChunkRef
- func (chunks *OrgChunks) GetChunkNamed(name string) ChunkRef
- func (chunks *OrgChunks) LocateChunkNamed(name string) (int, ChunkRef)
- func (chunks *OrgChunks) MarshalJSON() ([]byte, error)
- func (chunks *OrgChunks) RelinkHierarchy(changes *ChunkChanges)
- func (chunks *OrgChunks) Replace(offset, len int, text string) *ChunkChanges
- func (chunks *OrgChunks) Sort(chunkList []Chunk)
- type OrgId
- type OrgMeasure
- type OrgStorage
- type OrgType
- type SourceBlock
- type TableBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayChunks ¶ added in v0.0.2
func DisplayChunks(prefix string, chunks orgTree)
func SetVerbosity ¶ added in v0.0.2
func SetVerbosity(level int)
Types ¶
type BasicChunk ¶
OrgBlocks are self-contained and offer an alternative to text updates Concatenating the text of all blocks produces the complete document
func (*BasicChunk) AsOrgChunk ¶
func (ch *BasicChunk) AsOrgChunk() *BasicChunk
type Block ¶
type Block struct { BasicChunk Label int LabelEnd int Content int End int // start of last line }
type Chunk ¶
type Chunk interface { Jsonable AsOrgChunk() *BasicChunk // contains filtered or unexported methods }
type ChunkChanges ¶
type ChunkChanges struct { Changed idSet Added idSet Removed []OrgId Linked map[OrgId]doc.Set[string] }
func (*ChunkChanges) DataChanges ¶
func (ch *ChunkChanges) DataChanges(chunks *OrgChunks) map[string]any
func (*ChunkChanges) IsEmpty ¶
func (ch *ChunkChanges) IsEmpty() bool
func (*ChunkChanges) Merge ¶
func (ch *ChunkChanges) Merge(more *ChunkChanges)
func (*ChunkChanges) Order ¶
func (ch *ChunkChanges) Order(chunks *OrgChunks) []OrgId
type ChunkRef ¶
func (ChunkRef) MarshalJSON ¶
type ComparableChunk ¶
type ComparableChunk interface { comparable Chunk }
type Headline ¶
type Headline struct { BasicChunk Level int }
type OrgChunks ¶
type OrgChunks struct { ChunkIds map[OrgId]Chunk Chunks orgTree PendingText *strings.Builder MaxId int Next map[OrgId]OrgId Prev map[OrgId]OrgId Parent map[OrgId]OrgId Children map[OrgId][]OrgId }
func NewOrgChunks ¶
func NewOrgChunks() *OrgChunks
func (*OrgChunks) GetChunkNamed ¶
func (*OrgChunks) LocateChunkNamed ¶
func (*OrgChunks) MarshalJSON ¶
func (*OrgChunks) RelinkHierarchy ¶
func (chunks *OrgChunks) RelinkHierarchy(changes *ChunkChanges)
type OrgMeasure ¶
type OrgStorage ¶
type SourceBlock ¶
type SourceBlock struct { Block Options []string Value any // parsed value for supported data types // these are relevant only if there is a preceding name element NameStart int NameEnd int // this is 0 if there is no name SrcStart int // this is 0 if there is no name }
if this has children, the last one will be a results block
func (*SourceBlock) IsData ¶
func (ch *SourceBlock) IsData() bool
func (*SourceBlock) IsNamedData ¶
func (ch *SourceBlock) IsNamedData() bool
func (*SourceBlock) Language ¶
func (ch *SourceBlock) Language() string
func (*SourceBlock) Name ¶
func (ch *SourceBlock) Name() string
type TableBlock ¶
type TableBlock struct { BasicChunk Cells [][]string // 2D array of cell strings Value any // 2D array of JSON-compatible values // these are relevant only if there is a preceding name element NameStart int NameEnd int // this is 0 if there is no name TblStart int // this is 0 if there is no name }
func (*TableBlock) Name ¶
func (ch *TableBlock) Name() string
Click to show internal directories.
Click to hide internal directories.