Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
Text string
}
func (*Block) Parse ¶
func (b *Block) Parse() *ParsedBlock
type BlockToken ¶
type BlockToken struct { Text string `json:"text"` Kind BlockTokenKind `json:"kind"` }
type BlockTokenKind ¶
type BlockTokenKind string
const BlockTokenKindLiter BlockTokenKind = "liter"
const BlockTokenKindReservedQuota BlockTokenKind = "reserved_quota"
const BlockTokenKindScript BlockTokenKind = "script"
const BlockTokenKindVar BlockTokenKind = "var"
func (BlockTokenKind) String ¶
func (b BlockTokenKind) String() string
type CompiledFile ¶
type CompiledFile struct { Info FileInfo Conf *Conf Prompts []CompiledPrompt CompiledVars map[string]string }
type CompiledPrompt ¶
type File ¶
type File struct { FileInfo Conf *Conf `json:"conf"` Prompts []string `json:"prompts"` Vars map[string]string `json:"vars"` ParsedVars map[string]interfaces.Variable `json:"-"` ParsedPrompt []*ParsedBlock `json:"-"` }
type ParsedBlock ¶
type ParsedBlock struct { Text string `json:"-"` VarList []string `json:"-"` Tokens []BlockToken `json:"tokens"` Extra map[string]any `json:"extra"` }
func (*ParsedBlock) ToJson ¶
func (p *ParsedBlock) ToJson() ([]byte, error)
func (*ParsedBlock) ToMap ¶
func (p *ParsedBlock) ToMap() map[string]any
Click to show internal directories.
Click to hide internal directories.