Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrewCmd ¶ added in v0.0.4
type BrewCmd struct {
// contains filtered or unexported fields
}
func NewBrewCmd ¶ added in v0.0.4
type EncryptCmd ¶ added in v0.2.0
type EncryptCmd struct {
// contains filtered or unexported fields
}
func NewEncryptCmd ¶ added in v0.2.0
func NewEncryptCmd(coreFlags *core.Flags) *EncryptCmd
type ExecuteArgs ¶ added in v0.3.0
type ExecuteArgs struct {
Types []RunnerType
TerminalWidth int // Width of the Terminal
Expr string // Evaluation Expression
Macros map[string]string // Macro definitions for expression expansion
List bool // List matching items without executing
Program *vm.Program // Pre-compiled expression program (optional, compiled if nil)
}
type HookCmd ¶ added in v0.2.0
type HookCmd struct {
// contains filtered or unexported fields
}
func NewHookCmd ¶ added in v0.2.0
type LLMTextCmd ¶ added in v0.5.0
type LLMTextCmd struct {
// contains filtered or unexported fields
}
func NewLLMTextCmd ¶ added in v0.5.0
func NewLLMTextCmd(flags *core.Flags) *LLMTextCmd
type RunCmd ¶ added in v0.0.4
type RunCmd struct {
// contains filtered or unexported fields
}
func NewScriptsCmd ¶ added in v0.0.4
type Runner ¶ added in v0.3.0
type Runner interface {
// Form returns a group reference that is mounted to a huh.Form for users to select
// what actions they want to perform. The [Action] implementer should store the
// internal state of the selected values for execution later.
Field(ctx context.Context) huh.Field
// Execute the configured [Actions]
Execute(ctx context.Context, args ExecuteArgs) error
}
type RunnerType ¶ added in v0.3.0
type RunnerType = string
const ( RunnerTypeTemplate RunnerType = "template" RunnerTypeScript RunnerType = "script" )
func RunnerTypeFromStrings ¶ added in v0.3.0
func RunnerTypeFromStrings(strs []string) ([]RunnerType, error)
RunnerTypeFromStrings converts a slice of strings to a slice of RunnerType values. Returns an error if any string is not a valid RunnerType.
type ScriptRunner ¶ added in v0.3.0
type ScriptRunner struct {
// contains filtered or unexported fields
}
func NewScriptRunner ¶ added in v0.3.0
func NewScriptRunner(cfg *core.ConfigFile) *ScriptRunner
func (*ScriptRunner) Execute ¶ added in v0.3.0
func (sr *ScriptRunner) Execute(ctx context.Context, args ExecuteArgs) error
Execute implements Runner.
type TemplateRunner ¶ added in v0.3.0
type TemplateRunner struct {
// contains filtered or unexported fields
}
func NewTemplateRunner ¶ added in v0.3.0
func NewTemplateRunner(cfg *core.ConfigFile) *TemplateRunner
func (*TemplateRunner) Execute ¶ added in v0.3.0
func (tr *TemplateRunner) Execute(ctx context.Context, args ExecuteArgs) error
Execute implements Runner.
Click to show internal directories.
Click to hide internal directories.