Documentation ¶
Overview ¶
Package ast defines AST nodes that represents Obsidian's markdown elements.
Index ¶
- Variables
- type BlockID
- type PlugTasksCancelled
- type PlugTasksCreated
- type PlugTasksDependsOn
- type PlugTasksDone
- type PlugTasksDue
- type PlugTasksID
- type PlugTasksOnCompletion
- type PlugTasksOnCompletionAction
- type PlugTasksPrio
- type PlugTasksPriority
- type PlugTasksRecurring
- type PlugTasksScheduled
- type PlugTasksStart
- type PlugTasksStatus
- type PlugTasksStatusType
Constants ¶
This section is empty.
Variables ¶
var KindBlockID = gast.NewNodeKind("BlockID") // Const.
KindBlockID is a NodeKind of the BlockID node.
var KindPlugTasksCancelled = gast.NewNodeKind("PlugTasksCancelled") // Const.
KindPlugTasksCancelled is a NodeKind of the PlugTasksCancelled node.
var KindPlugTasksCreated = gast.NewNodeKind("PlugTasksCreated") // Const.
KindPlugTasksCreated is a NodeKind of the PlugTasksCreated node.
var KindPlugTasksDependsOn = gast.NewNodeKind("PlugTasksDependsOn") // Const.
KindPlugTasksDependsOn is a NodeKind of the PlugTasksDependsOn node.
var KindPlugTasksDone = gast.NewNodeKind("PlugTasksDone") // Const.
KindPlugTasksDone is a NodeKind of the PlugTasksDone node.
var KindPlugTasksDue = gast.NewNodeKind("PlugTasksDue") // Const.
KindPlugTasksDue is a NodeKind of the PlugTasksDue node.
var KindPlugTasksID = gast.NewNodeKind("PlugTasksID") // Const.
KindPlugTasksID is a NodeKind of the PlugTasksID node.
var KindPlugTasksOnCompletion = gast.NewNodeKind("PlugTasksOnCompletion") // Const.
KindPlugTasksOnCompletion is a NodeKind of the PlugTasksOnCompletion node.
var KindPlugTasksPrio = gast.NewNodeKind("PlugTasksPrio") // Const.
KindPlugTasksPrio is a NodeKind of the PlugTasksPrio node.
var KindPlugTasksRecurring = gast.NewNodeKind("PlugTasksRecurring") // Const.
KindPlugTasksRecurring is a NodeKind of the PlugTasksRecurring node.
var KindPlugTasksScheduled = gast.NewNodeKind("PlugTasksScheduled") // Const.
KindPlugTasksScheduled is a NodeKind of the PlugTasksScheduled node.
var KindPlugTasksStart = gast.NewNodeKind("PlugTasksStart") // Const.
KindPlugTasksStart is a NodeKind of the PlugTasksStart node.
var KindPlugTasksStatus = gast.NewNodeKind("PlugTasksStatus") // Const.
KindPlugTasksStatus is a NodeKind of the PlugTasksStatus node.
Functions ¶
This section is empty.
Types ¶
type BlockID ¶
type BlockID struct { gast.BaseInline ID []byte // Invalid means this block id can't be used as a reference target. // This is how Obsidian works, so we are just following it behaviour. Invalid bool }
A BlockID struct represents an Obsidian block id. https://help.obsidian.md/Linking+notes+and+files/Internal+links#Link+to+a+block+in+a+note
func NewInvalidBlockID ¶
NewInvalidBlockID returns a new invalid BlockID node.
type PlugTasksCancelled ¶
type PlugTasksCancelled struct { gast.BaseInline Date time.Time }
A PlugTasksCancelled represents an Obsidian plugin Tasks's task cancelled date.
func NewPlugTasksCancelled ¶
func NewPlugTasksCancelled(date time.Time) *PlugTasksCancelled
NewPlugTasksCancelled returns a new PlugTasksCancelled node.
func (*PlugTasksCancelled) Dump ¶
func (n *PlugTasksCancelled) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksCancelled) IsValid ¶
func (n *PlugTasksCancelled) IsValid() bool
IsValid reports whether date is valid.
type PlugTasksCreated ¶
type PlugTasksCreated struct { gast.BaseInline Date time.Time }
A PlugTasksCreated represents an Obsidian plugin Tasks's task created date.
func NewPlugTasksCreated ¶
func NewPlugTasksCreated(date time.Time) *PlugTasksCreated
NewPlugTasksCreated returns a new PlugTasksCreated node.
func (*PlugTasksCreated) Dump ¶
func (n *PlugTasksCreated) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksCreated) IsValid ¶
func (n *PlugTasksCreated) IsValid() bool
IsValid reports whether date is valid.
type PlugTasksDependsOn ¶
type PlugTasksDependsOn struct { gast.BaseInline IDs []string }
A PlugTasksDependsOn represents an Obsidian plugin Tasks's task dependencies.
func NewPlugTasksDependsOn ¶
func NewPlugTasksDependsOn(ids []string) *PlugTasksDependsOn
NewPlugTasksDependsOn returns a new PlugTasksDependsOn node.
type PlugTasksDone ¶
type PlugTasksDone struct { gast.BaseInline Date time.Time }
A PlugTasksDone represents an Obsidian plugin Tasks's task done date.
func NewPlugTasksDone ¶
func NewPlugTasksDone(date time.Time) *PlugTasksDone
NewPlugTasksDone returns a new PlugTasksDone node.
func (*PlugTasksDone) Dump ¶
func (n *PlugTasksDone) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksDone) IsValid ¶
func (n *PlugTasksDone) IsValid() bool
IsValid reports whether date is valid.
type PlugTasksDue ¶
type PlugTasksDue struct { gast.BaseInline Date time.Time }
A PlugTasksDue represents an Obsidian plugin Tasks's task due date.
func NewPlugTasksDue ¶
func NewPlugTasksDue(date time.Time) *PlugTasksDue
NewPlugTasksDue returns a new PlugTasksDue node.
func (*PlugTasksDue) Dump ¶
func (n *PlugTasksDue) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksDue) IsValid ¶
func (n *PlugTasksDue) IsValid() bool
IsValid reports whether date is valid.
type PlugTasksID ¶
type PlugTasksID struct { gast.BaseInline ID string }
A PlugTasksID represents an Obsidian plugin Tasks's task ID.
func NewPlugTasksID ¶
func NewPlugTasksID(id string) *PlugTasksID
NewPlugTasksID returns a new PlugTasksID node.
type PlugTasksOnCompletion ¶
type PlugTasksOnCompletion struct { gast.BaseInline Action PlugTasksOnCompletionAction }
A PlugTasksOnCompletion represents an Obsidian plugin Tasks's task action on completion.
func NewPlugTasksOnCompletion ¶
func NewPlugTasksOnCompletion(action PlugTasksOnCompletionAction) *PlugTasksOnCompletion
NewPlugTasksOnCompletion returns a new PlugTasksOnCompletion node.
func (*PlugTasksOnCompletion) Dump ¶
func (n *PlugTasksOnCompletion) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksOnCompletion) IsValid ¶
func (n *PlugTasksOnCompletion) IsValid() bool
IsValid reports whether action is valid.
type PlugTasksOnCompletionAction ¶
type PlugTasksOnCompletionAction int
PlugTasksOnCompletionAction is an Obsidian plugin Tasks's action on completion. See https://publish.obsidian.md/tasks/Getting+Started/On+Completion.
const ( PlugTasksOnCompletionKeep PlugTasksOnCompletionAction = iota + 1 PlugTasksOnCompletionDelete )
Obsidian plugin Tasks's action on completion.
func (PlugTasksOnCompletionAction) String ¶
func (t PlugTasksOnCompletionAction) String() string
String implements fmt.Stringer.
type PlugTasksPrio ¶
type PlugTasksPrio struct { gast.BaseInline Prio PlugTasksPriority }
A PlugTasksPrio represents an Obsidian plugin Tasks's task priority.
func NewPlugTasksPrio ¶
func NewPlugTasksPrio(prio PlugTasksPriority) *PlugTasksPrio
NewPlugTasksPrio returns a new PlugTasksPrio node.
type PlugTasksPriority ¶
type PlugTasksPriority int
PlugTasksPriority is an Obsidian plugin Tasks's priority.
const ( PlugTasksPrioLowest PlugTasksPriority = iota - 2 PlugTasksPrioLow PlugTasksPrioDefault PlugTasksPrioMedium PlugTasksPrioHigh PlugTasksPrioHighest )
Obsidian plugin Tasks's priorities.
func (PlugTasksPriority) String ¶
func (t PlugTasksPriority) String() string
String implements fmt.Stringer.
type PlugTasksRecurring ¶
type PlugTasksRecurring struct { gast.BaseInline Rule string }
A PlugTasksRecurring represents an Obsidian plugin Tasks's recurring task.
Rule is not validated and may be invalid.
func NewPlugTasksRecurring ¶
func NewPlugTasksRecurring(rule string) *PlugTasksRecurring
NewPlugTasksRecurring returns a new PlugTasksRecurring node.
type PlugTasksScheduled ¶
type PlugTasksScheduled struct { gast.BaseInline Date time.Time }
A PlugTasksScheduled represents an Obsidian plugin Tasks's task scheduled date.
func NewPlugTasksScheduled ¶
func NewPlugTasksScheduled(date time.Time) *PlugTasksScheduled
NewPlugTasksScheduled returns a new PlugTasksScheduled node.
func (*PlugTasksScheduled) Dump ¶
func (n *PlugTasksScheduled) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksScheduled) IsValid ¶
func (n *PlugTasksScheduled) IsValid() bool
IsValid reports whether date is valid.
type PlugTasksStart ¶
type PlugTasksStart struct { gast.BaseInline Date time.Time }
A PlugTasksStart represents an Obsidian plugin Tasks's task start date.
func NewPlugTasksStart ¶
func NewPlugTasksStart(date time.Time) *PlugTasksStart
NewPlugTasksStart returns a new PlugTasksStart node.
func (*PlugTasksStart) Dump ¶
func (n *PlugTasksStart) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksStart) IsValid ¶
func (n *PlugTasksStart) IsValid() bool
IsValid reports whether date is valid.
type PlugTasksStatus ¶
type PlugTasksStatus struct { gast.BaseInline Symbol rune StatusType PlugTasksStatusType }
A PlugTasksStatus represents a checkbox of an Obsidian plugin Tasks's task.
func NewPlugTasksStatus ¶
func NewPlugTasksStatus(symbol rune, statusType PlugTasksStatusType) *PlugTasksStatus
NewPlugTasksStatus returns a new PlugTasksStatus node.
func (*PlugTasksStatus) Dump ¶
func (n *PlugTasksStatus) Dump(source []byte, level int)
Dump implements ast.Node.
func (*PlugTasksStatus) IsChecked ¶
func (n *PlugTasksStatus) IsChecked() bool
IsChecked reports whether Symbol != ' '.
type PlugTasksStatusType ¶
type PlugTasksStatusType int
PlugTasksStatusType represents Obsidian plugin Tasks's status type.
const ( PlugTasksStatusTypeTODO PlugTasksStatusType = iota + 1 PlugTasksStatusTypeInProgress PlugTasksStatusTypeDone PlugTasksStatusTypeCancelled PlugTasksStatusTypeNonTask )
Obsidian plugin Tasks's status types.
func (PlugTasksStatusType) IsDone ¶
func (t PlugTasksStatusType) IsDone() bool
IsDone reports whether the task is considered "done" (has status Done, Cancelled or NonTask).
func (PlugTasksStatusType) String ¶
func (t PlugTasksStatusType) String() string
String implements fmt.Stringer.