Help us shape the future of Go! Take the 2026 Go Developer Survey

basic

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt func(*View)

Opt is a functional option.

func WithUISettings

func WithUISettings(ui *pb.UI_Settings) Opt

WithUISettings sets the ui settings.

type View

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

View is our basic terminal CLI view.

func New

func New(opts ...Opt) (*View, error)

New takes options and returns a new basic.View.

func (*View) Close

func (v *View) Close() error

Close closes any open file handles.

func (*View) Settings

func (v *View) Settings() *pb.UI_Settings

Settings returns the views UI settings.

func (*View) ShowDecode

func (v *View) ShowDecode(res *pb.DecodeResponse, incremental bool) error

ShowDecode shows the human friendly view of decoding.

func (*View) ShowDiagnostics

func (v *View) ShowDiagnostics(diags []*pb.Diagnostic) error

ShowDiagnostics writes a diagnostic to stderr.

func (*View) ShowError

func (v *View) ShowError(err error) error

ShowError writes the error message to stdout.

func (*View) ShowFormat

func (v *View) ShowFormat(cfg *pb.FormatRequest_Config, res *pb.FormatResponse) error

ShowFormat displays the response of a format request.

func (*View) ShowOperationEvent

func (v *View) ShowOperationEvent(event *pb.Operation_Event)

ShowOperationEvent shows the human friendly view on an operation event.

func (*View) ShowOperationResponse

func (v *View) ShowOperationResponse(res *pb.Operation_Response) error

ShowOperationResponse shows an operation response.

func (*View) ShowOperationResponses

func (v *View) ShowOperationResponses(res *pb.OperationResponses) error

ShowOperationResponses shows an operation responses.

func (*View) ShowOutput

func (v *View) ShowOutput(res *pb.OperationResponses) error

func (*View) ShowSampleList

func (v *View) ShowSampleList(res *pb.ListSamplesResponse) error

ShowSampleList shows the a list of samples.

func (*View) ShowSampleObservation

func (v *View) ShowSampleObservation(res *pb.ObserveSampleResponse) error

ShowSampleObservation shows the sample observation.

func (*View) ShowScenarioList

func (v *View) ShowScenarioList(res *pb.ListScenariosResponse) error

ShowScenarioList shows the a list of scenarios.

func (*View) ShowScenarioOutline

func (v *View) ShowScenarioOutline(res *pb.OutlineScenariosResponse) error

ShowScenarioOutline shows an outline of scenarios.

func (*View) ShowScenariosValidateConfig

func (v *View) ShowScenariosValidateConfig(res *pb.ValidateScenariosConfigurationResponse) error

ShowScenariosValidateConfig shows the flight plan validation response.

func (*View) ShowVersion

func (v *View) ShowVersion(all bool, res *pb.GetVersionResponse) error

ShowVersion shows the version information.

func (*View) UI

func (v *View) UI() *terminal.UI

func (*View) WriteDiagnostics

func (v *View) WriteDiagnostics(diags []*pb.Diagnostic)

WriteDiagnostics writes diagnostics in a basic human friendly way.

Jump to

Keyboard shortcuts

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