Documentation
¶
Overview ¶
Shell text, dialect and source mapping supplied to a checker for one occurrence. Normative profile: shell-preparation-0.3.0.md in the protocol JSON directory. The host supplies source mapping and interpreter facts. A guest interprets its own directives and chooses its diagnostic exclusions.
Shell text, dialect and source mapping supplied to a checker for one occurrence. Normative profile: shell-preparation-0.3.0.md in the protocol JSON directory. The host supplies source mapping and interpreter facts. A guest interprets its own directives and chooses its diagnostic exclusions.
Shell text, dialect and source mapping supplied to a checker for one occurrence. Normative profile: shell-preparation-0.3.0.md in the protocol JSON directory. The host supplies source mapping and interpreter facts. A guest interprets its own directives and chooses its diagnostic exclusions.
Index ¶
Constants ¶
const InterfaceName = "kjanat:actionlint-script/shell-script-inputs@0.3.0"
InterfaceName is the canonical WIT id of the interface this binding was generated from.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct{}
Deps groups the cross-component dependencies required to instantiate ShellScriptInputs. Pass a populated value via NewInstance.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory builds host-side instances of the ShellScriptInputs interface from a Go implementation.
func NewFactory ¶
NewFactory creates a Factory bound to e. A single Factory may be reused to build multiple instances backed by different implementations.
func (*Factory) Close ¶
Close releases resources shared by the Factory. Existing instances remain callable until each is closed individually.
func (*Factory) NewInstance ¶
func (f *Factory) NewInstance(ctx context.Context, impl ShellScriptInputs, deps *Deps, opts ...host.InstantiateOption) (*host.ComponentInstance, error)
NewInstance creates a fresh component instance backed by impl. Pass inst.Core() to wacogo.WithInstanceImport to wire the instance into a composite world. deps may be nil only when ShellScriptInputs has no imports.
type Input ¶
type Input struct {
// Engine input, including attached directives and synthesized startup.
Text string
// Original script text with substitutions masked, before inserted lines.
MaskedText string
// Inferred interpreter dialect, or the override requested by the caller.
Dialect OptionString
Shell string
ShellSetup string
// One entry per physical input line; script indices refer to the raw
// input script and comment positions to its declaring document.
Lines []Line
// Additional diagnostic numbers supplied by a custom preparation builder.
// The default host builder supplies an empty list.
Excluded []uint32
}
Input corresponds to the WIT record input.
type Line ¶
type Line interface {
// contains filtered or unexported methods
}
Line corresponds to the WIT variant line. Sealed: only the case structs below satisfy this interface.
type LineComment ¶
type LineComment struct {
Value Position
}
LineComment is the "comment" case of Line.
type OptionInput ¶
OptionInput corresponds to a WIT option<...> type.
func NoneInput ¶
func NoneInput() OptionInput
func SomeInput ¶
func SomeInput(v Input) OptionInput
type OptionString ¶
OptionString corresponds to a WIT option<...> type.
func NoneString ¶
func NoneString() OptionString
func SomeString ¶
func SomeString(v string) OptionString
type ResultOptionInputString ¶
type ResultOptionInputString interface {
// contains filtered or unexported methods
}
ResultOptionInputString corresponds to a WIT result<...> type.
type ResultOptionInputStringErr ¶
type ResultOptionInputStringErr struct{ Value string }
ResultOptionInputString corresponds to a WIT result<...> type.
type ResultOptionInputStringOk ¶
type ResultOptionInputStringOk struct{ Value OptionInput }
ResultOptionInputString corresponds to a WIT result<...> type.
type ShellScriptInputs ¶
type ShellScriptInputs interface {
// Only run occurrences with supplied text in this analyze call are accepted.
// Every other ID returns an error, including known unselected occurrences,
// action inputs, calls and the entry. None means an invalid interpreter invocation.
// Line numbers and positions are one-based Unicode character coordinates.
ForScript(ctx context.Context, occurrence string, dialect OptionString) (ResultOptionInputString, error)
}
Shell text, dialect and source mapping supplied to a checker for one occurrence. Normative profile: shell-preparation-0.3.0.md in the protocol JSON directory. The host supplies source mapping and interpreter facts. A guest interprets its own directives and chooses its diagnostic exclusions.
func WrapInstance ¶
func WrapInstance(caller *host.ComponentInstance, callee *wacogo.ComponentInstance) ShellScriptInputs
WrapInstance returns a ShellScriptInputs that forwards method calls to callee. caller is a Factory-built host instance whose state hosts any handles minted by callee during those calls.