Documentation ¶
Index ¶
- Constants
- Variables
- func PruneActions(doc goldast.Node)
- func PruneDocumentToRoot(doc goldast.Node)
- func PruneDocumentToSection(doc goldast.Node, sectionName string)
- func PruneSectionFromNode(node goldast.Node)
- type DescriptionBlock
- type EnvironmentSubstitution
- type ExecutionBlock
- type IgnoreBlock
- type ImportBlock
- type InvisibleBlock
- type OnFailure
- type OptionType
- type RundownBlock
- type SaveCodeBlock
- type SectionEnd
- type SectionOption
- type SectionPointer
- type SpinnerMode
- type StopFail
- type StopOk
- type SubEnvBlock
- type TypeBoolean
- type TypeEnum
- type TypeFilename
- type TypeString
Constants ¶
const DefaultSpinnerName string = "Running..."
Variables ¶
var KindDescriptionBlock = goldast.NewNodeKind("DescriptionBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindEnvironmentSubstitution = goldast.NewNodeKind("EnvironmentSubstitution")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindExecutionBlock = goldast.NewNodeKind("ExecutionBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindIgnoreBlock = goldast.NewNodeKind("IgnoreBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindImportBlock = goldast.NewNodeKind("ImportBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindInvisibleBlock = goldast.NewNodeKind("InvisibleBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindOnFailure = goldast.NewNodeKind("OnFailure")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindRundownBlock = goldast.NewNodeKind("RundownBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindSaveCodeBlock = goldast.NewNodeKind("SaveCodeBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindSectionEnd = goldast.NewNodeKind("SectionEnd")
var KindSectionOption = goldast.NewNodeKind("SectionOption")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindSectionPointer = goldast.NewNodeKind("SectionPointer")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindStopFail = goldast.NewNodeKind("StopFail")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindStopOk = goldast.NewNodeKind("StopOk")
KindRundownBlock is a NodeKind of the RundownBlock node.
var KindSubEnvBlock = goldast.NewNodeKind("SubEnvBlock")
KindRundownBlock is a NodeKind of the RundownBlock node.
Functions ¶
func PruneActions ¶
func PruneDocumentToRoot ¶
func PruneDocumentToSection ¶
Reduces the document to just the requested section.
func PruneSectionFromNode ¶
Removes everything from the current node through to either SectionEnd or no more nodes.
Types ¶
type DescriptionBlock ¶
func NewDescriptionBlock ¶
func NewDescriptionBlock() *DescriptionBlock
NewRundownBlock returns a new RundownBlock node.
func (*DescriptionBlock) Dump ¶
func (n *DescriptionBlock) Dump(source []byte, level int)
func (*DescriptionBlock) Kind ¶
func (n *DescriptionBlock) Kind() goldast.NodeKind
Kind implements Node.Kind.
type EnvironmentSubstitution ¶
func NewSubEnvInline ¶
func NewSubEnvInline(contents string) *EnvironmentSubstitution
NewRundownBlock returns a new RundownBlock node.
func (*EnvironmentSubstitution) Dump ¶
func (n *EnvironmentSubstitution) Dump(source []byte, level int)
func (*EnvironmentSubstitution) Kind ¶
func (n *EnvironmentSubstitution) Kind() goldast.NodeKind
Kind implements Node.Kind.
type ExecutionBlock ¶
type ExecutionBlock struct { goldast.BaseBlock CodeBlock *goldast.FencedCodeBlock ID string ShowStdout bool ShowStderr bool CaptureStdoutInto string Reveal bool Execute bool CaptureEnvironment []string SubstituteEnvironment bool SpinnerName string SpinnerMode SpinnerMode With string ReplaceProcess bool SkipOnSuccess bool SkipOnFailure bool }
func NewExecutionBlock ¶
func NewExecutionBlock(fcb *goldast.FencedCodeBlock) *ExecutionBlock
NewRundownBlock returns a new RundownBlock node.
func (*ExecutionBlock) Dump ¶
func (n *ExecutionBlock) Dump(source []byte, level int)
func (*ExecutionBlock) Kind ¶
func (n *ExecutionBlock) Kind() goldast.NodeKind
Kind implements Node.Kind.
type IgnoreBlock ¶
func NewIgnoreBlock ¶
func NewIgnoreBlock() *IgnoreBlock
NewRundownBlock returns a new RundownBlock node.
func (*IgnoreBlock) Dump ¶
func (n *IgnoreBlock) Dump(source []byte, level int)
type ImportBlock ¶
func NewImportBlock ¶
func NewImportBlock() *ImportBlock
NewRundownBlock returns a new RundownBlock node.
func ProcessImportBlocks ¶
func ProcessImportBlocks(doc goldast.Node) []*ImportBlock
func (*ImportBlock) Dump ¶
func (n *ImportBlock) Dump(source []byte, level int)
func (*ImportBlock) GetFilename ¶
func (n *ImportBlock) GetFilename() string
func (*ImportBlock) IngestChildren ¶
func (n *ImportBlock) IngestChildren(doc goldast.Node)
type InvisibleBlock ¶
func NewInvisibleBlock ¶
func NewInvisibleBlock() *InvisibleBlock
NewRundownBlock returns a new RundownBlock node.
func (*InvisibleBlock) Dump ¶
func (n *InvisibleBlock) Dump(source []byte, level int)
func (*InvisibleBlock) Kind ¶
func (n *InvisibleBlock) Kind() goldast.NodeKind
Kind implements Node.Kind.
type OnFailure ¶
func GetOnFailureNodes ¶
Searches the current node's section for OnFailure nodes and returns them.
func (*OnFailure) ConvertToParagraph ¶
func (*OnFailure) MatchesError ¶
type OptionType ¶
type OptionType interface { Validate(input string) error Normalise(input string) string Describe() string }
func BuildOptionType ¶
func BuildOptionType(optionType string) OptionType
type RundownBlock ¶
func NewRundownBlock ¶
func NewRundownBlock() *RundownBlock
NewRundownBlock returns a new RundownBlock node.
func (*RundownBlock) Dump ¶
func (n *RundownBlock) Dump(source []byte, level int)
Dump implements Node.Dump.
func (*RundownBlock) GetAttr ¶
func (r *RundownBlock) GetAttr(name string) null.String
func (*RundownBlock) HasAttr ¶
func (r *RundownBlock) HasAttr(names ...string) bool
func (*RundownBlock) Kind ¶
func (n *RundownBlock) Kind() goldast.NodeKind
Kind implements Node.Kind.
type SaveCodeBlock ¶
type SaveCodeBlock struct { goldast.BaseBlock CodeBlock *goldast.FencedCodeBlock SaveToVariable string }
func NewSaveCodeBlock ¶
func NewSaveCodeBlock(fcb *goldast.FencedCodeBlock, saveToVariable string) *SaveCodeBlock
NewRundownBlock returns a new RundownBlock node.
func (*SaveCodeBlock) Dump ¶
func (n *SaveCodeBlock) Dump(source []byte, level int)
func (*SaveCodeBlock) Kind ¶
func (n *SaveCodeBlock) Kind() goldast.NodeKind
Kind implements Node.Kind.
type SectionEnd ¶
type SectionEnd struct { goldast.BaseBlock SectionPointer *SectionPointer }
func (*SectionEnd) Dump ¶
func (n *SectionEnd) Dump(source []byte, level int)
type SectionOption ¶
type SectionOption struct { goldast.BaseInline OptionName string OptionType OptionType OptionTypeString string OptionDescription string OptionPrompt null.String OptionDefault null.String OptionRequired bool OptionAs string }
func NewSectionOption ¶
func NewSectionOption(name string) *SectionOption
NewRundownBlock returns a new RundownBlock node.
func (*SectionOption) Dump ¶
func (n *SectionOption) Dump(source []byte, level int)
func (*SectionOption) Kind ¶
func (n *SectionOption) Kind() goldast.NodeKind
Kind implements Node.Kind.
type SectionPointer ¶
type SectionPointer struct { goldast.BaseBlock SectionName string StartNode goldast.Node Options []*SectionOption DescriptionShort string DescriptionLong string }
func FindSectionInDocument ¶
func FindSectionInDocument(parent goldast.Node, name string) *SectionPointer
func GetSectionForNode ¶
func GetSectionForNode(node goldast.Node) *SectionPointer
func GetSections ¶
func GetSections(doc goldast.Node) []*SectionPointer
func NewSectionPointer ¶
func NewSectionPointer(name string) *SectionPointer
NewRundownBlock returns a new RundownBlock node.
func (*SectionPointer) AddOption ¶
func (n *SectionPointer) AddOption(option *SectionOption)
func (*SectionPointer) Dump ¶
func (n *SectionPointer) Dump(source []byte, level int)
func (*SectionPointer) Kind ¶
func (n *SectionPointer) Kind() goldast.NodeKind
Kind implements Node.Kind.
type SpinnerMode ¶
type SpinnerMode int
const ( SpinnerModeVisible SpinnerMode = iota SpinnerModeHidden SpinnerModeInlineAll SpinnerModeInlineFirst )
type SubEnvBlock ¶
func NewSubEnvBlock ¶
func NewSubEnvBlock(innerBlock goldast.Node) *SubEnvBlock
NewRundownBlock returns a new RundownBlock node.
func (*SubEnvBlock) Dump ¶
func (n *SubEnvBlock) Dump(source []byte, level int)
type TypeBoolean ¶
type TypeBoolean struct{}
func (*TypeBoolean) Describe ¶
func (t *TypeBoolean) Describe() string
func (*TypeBoolean) Normalise ¶
func (t *TypeBoolean) Normalise(input string) string
func (*TypeBoolean) Validate ¶
func (t *TypeBoolean) Validate(string) error
type TypeFilename ¶
func (*TypeFilename) Describe ¶
func (t *TypeFilename) Describe() string
func (*TypeFilename) Normalise ¶
func (t *TypeFilename) Normalise(input string) string
func (*TypeFilename) Validate ¶
func (t *TypeFilename) Validate(string) error
type TypeString ¶
type TypeString struct{}
func (*TypeString) Describe ¶
func (t *TypeString) Describe() string
func (*TypeString) Normalise ¶
func (t *TypeString) Normalise(string) string
func (*TypeString) Validate ¶
func (t *TypeString) Validate(string) error