interactive

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBack = errors.New("back")

ErrBack is returned when user wants to go back

View Source
var ErrExit = errors.New("exit")

ErrExit is returned when user wants to exit

Functions

This section is empty.

Types

type Action

type Action string

Action represents what to do with the selected resource

const (
	ActionSelect        Action = "select"
	ActionCopy          Action = "copy"
	ActionPull          Action = "pull"
	ActionPullLevelOnly Action = "pull-level-only"
	ActionPush          Action = "push"
	ActionView          Action = "view"
	ActionBack          Action = "back"
	ActionExit          Action = "exit"
)

type Explorer

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

Explorer provides interactive navigation through the resource hierarchy

func NewExplorer

func NewExplorer(root *hierarchy.Node, builder *hierarchy.Builder, client *dotenv.Client) *Explorer

NewExplorer creates a new explorer instance

func (*Explorer) GetCurrentPath

func (e *Explorer) GetCurrentPath() string

GetCurrentPath returns the current node's path

func (*Explorer) Reset

func (e *Explorer) Reset()

Reset resets the explorer to the root

func (*Explorer) Run

func (e *Explorer) Run() (selectedPath string, action Action, err error)

Run starts the interactive explorer and returns the selected path and action

Jump to

Keyboard shortcuts

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