prompt

package
v0.38.21 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	RequestParams              advisory.RequestParams
	AllowedPackagesFunc        func() ([]string, error)
	AllowedVulnerabilitiesFunc func(packageName string) ([]string, error)
	AllowedFixedVersionsFunc   func(packageName string) ([]string, error)
}

type Model

type Model struct {

	// input/output data
	RequestParams advisory.RequestParams

	// EarlyExit is set to true if the user asks to exit the prompt early.
	EarlyExit bool

	// Err is set if an error occurs during the prompt.
	Err error
	// contains filtered or unexported fields
}

func New

func New(config Configuration) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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