ui

package
v0.0.0-...-2b6c84e Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Select

func Select(verbose, quiet bool) (uis []clio.UI)

Select is responsible for determining the specific UI function given select user option, the current platform config values, and environment status (such as a TTY being present). The first UI in the returned slice of UIs is intended to be used and the UIs that follow are meant to be attempted only in a fallback posture when there are environmental problems (e.g. cannot write to the terminal). A writer is provided to capture the output of the final SBOM report.

Types

type NoUI

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

func None

func None(quiet bool) *NoUI

func (*NoUI) Handle

func (n *NoUI) Handle(e partybus.Event) error

func (*NoUI) Setup

func (n *NoUI) Setup(subscription partybus.Unsubscribable) error

func (NoUI) Teardown

func (n NoUI) Teardown(_ bool) error

type UI

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

func New

func New(_, quiet bool, hs ...bubbly.EventHandler) *UI

func (*UI) Handle

func (m *UI) Handle(e partybus.Event) error

func (UI) Init

func (m UI) Init() tea.Cmd

func (UI) RespondsTo

func (m UI) RespondsTo() []partybus.EventType

func (*UI) Setup

func (m *UI) Setup(subscription partybus.Unsubscribable) error

func (*UI) Teardown

func (m *UI) Teardown(force bool) error

func (*UI) Update

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

func (UI) View

func (m UI) View() string

Jump to

Keyboard shortcuts

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