forms

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserAborted = huh.ErrUserAborted

ErrUserAborted exposes the huh user-abort sentinel for callers.

Functions

func Confirm

func Confirm(title string, value *bool) error

Confirm prompts for a yes/no answer.

func Input

func Input(title string, value *string) error

Input prompts for a single-line string.

func MultiSelect

func MultiSelect(title string, options []string, value *[]string) error

MultiSelect prompts for selecting multiple values.

func Select

func Select(title string, options []string, value *string) error

Select prompts for a single selection from options.

func SelectRequired

func SelectRequired(title string, options []string, value *string) error

SelectRequired prompts for a single selection and requires a non-empty value.

func Text

func Text(title string, value *string) error

Text prompts for multi-line input.

Types

type ArmoryInstallFormResult

type ArmoryInstallFormResult struct {
	SelectedNames []string
}

ArmoryInstallFormResult captures the selection from the armory install form.

func ArmoryInstallForm

func ArmoryInstallForm(options []ArmoryInstallOption) (*ArmoryInstallFormResult, error)

ArmoryInstallForm prompts for armory packages or bundles to install.

type ArmoryInstallOption

type ArmoryInstallOption struct {
	Value string
	Label string
}

ArmoryInstallOption represents an armory install option.

type ArmoryUpdateFormResult

type ArmoryUpdateFormResult struct {
	SelectedIDs []string
}

ArmoryUpdateFormResult captures the selection from the armory update form.

func ArmoryUpdateForm

func ArmoryUpdateForm(options []ArmoryUpdateOption) (*ArmoryUpdateFormResult, error)

ArmoryUpdateForm prompts for armory updates to apply.

type ArmoryUpdateOption

type ArmoryUpdateOption struct {
	ID    string
	Label string
}

ArmoryUpdateOption represents an update option in the armory update form.

type GenerateBeaconFormResult

type GenerateBeaconFormResult struct {
	OS      string
	Arch    string
	Format  string
	Name    string
	C2Type  string
	C2Value string
	Save    string
	Days    string
	Hours   string
	Minutes string
	Seconds string
	Jitter  string
}

GenerateBeaconFormResult captures the inputs needed to drive the generate beacon command.

func GenerateBeaconForm

func GenerateBeaconForm() (*GenerateBeaconFormResult, error)

GenerateBeaconForm prompts for generate beacon flags and returns the collected values.

type GenerateFormResult

type GenerateFormResult struct {
	OS      string
	Arch    string
	Format  string
	Name    string
	C2Type  string
	C2Value string
	Save    string
}

GenerateFormResult captures the inputs needed to drive the generate command.

func GenerateForm

func GenerateForm() (*GenerateFormResult, error)

GenerateForm prompts for core generate flags and returns the collected values.

type GenerateProfilesNewBeaconFormResult

type GenerateProfilesNewBeaconFormResult struct {
	ProfileName string
	OS          string
	Arch        string
	Format      string
	Name        string
	C2Type      string
	C2Value     string
	Days        string
	Hours       string
	Minutes     string
	Seconds     string
	Jitter      string
}

GenerateProfilesNewBeaconFormResult captures the inputs needed to drive the profiles new beacon command.

func GenerateProfilesNewBeaconForm

func GenerateProfilesNewBeaconForm() (*GenerateProfilesNewBeaconFormResult, error)

GenerateProfilesNewBeaconForm prompts for profiles new beacon flags and returns the collected values.

type GenerateProfilesNewFormResult

type GenerateProfilesNewFormResult struct {
	ProfileName string
	OS          string
	Arch        string
	Format      string
	Name        string
	C2Type      string
	C2Value     string
}

GenerateProfilesNewFormResult captures the inputs needed to drive the profiles new command.

func GenerateProfilesNewForm

func GenerateProfilesNewForm() (*GenerateProfilesNewFormResult, error)

GenerateProfilesNewForm prompts for profiles new flags and returns the collected values.

type SettingsFormResult

type SettingsFormResult struct {
	TableStyle        string
	AutoAdult         bool
	BeaconAutoResults bool
	SmallTermWidth    string
	AlwaysOverflow    bool
	VimMode           bool
	UserConnect       bool
	ConsoleLogs       bool
}

SettingsFormResult captures the inputs needed to update client settings.

func SettingsForm

func SettingsForm(settings *assets.ClientSettings, tableStyleOptions []string) (*SettingsFormResult, error)

SettingsForm prompts for client settings and returns the collected values.

Jump to

Keyboard shortcuts

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