dagpicker

package
v1.22.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmRunDAG

func ConfirmRunDAG(dagName string, params string) (bool, error)

ConfirmRunDAG prompts the user for Y/n confirmation before running a DAG

func PickDAG

func PickDAG(ctx context.Context, dagStore models.DAGStore) (string, error)

PickDAG shows an interactive DAG picker and returns the selected DAG path Deprecated: Use PickDAGInteractive instead for a better user experience

func PromptForParams

func PromptForParams(dag *digraph.DAG) (string, error)

PromptForParams prompts the user to enter parameters for a DAG

Types

type DAGItem

type DAGItem struct {
	Name   string
	Path   string // Path is stored but not displayed
	Desc   string
	Tags   []string
	Params string // Parameters that the DAG accepts
}

DAGItem represents a DAG in the list

func (DAGItem) Description

func (i DAGItem) Description() string

func (DAGItem) FilterValue

func (i DAGItem) FilterValue() string

func (DAGItem) Title

func (i DAGItem) Title() string

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model represents the state of the DAG picker

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (Model) View

func (m Model) View() string

View renders the UI

type Result

type Result struct {
	DAGName   string
	DAGPath   string
	Params    string
	Cancelled bool
}

Result contains the final selections

func PickDAGInteractive

func PickDAGInteractive(ctx context.Context, dagStore models.DAGStore, dag *digraph.DAG) (Result, error)

PickDAGInteractive shows a unified fullscreen UI for DAG selection, parameter input, and confirmation

type State

type State int

State represents the current state of the picker

const (
	StateSelectingDAG State = iota
	StateEnteringParams
	StateConfirming
	StateDone
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL