Documentation ¶
Index ¶
- type Opt
- type View
- func (v *View) Close() error
- func (v *View) Settings() *pb.UI_Settings
- func (v *View) ShowDecode(res *pb.DecodeResponse, incremental bool) error
- func (v *View) ShowDiagnostics(diags []*pb.Diagnostic) error
- func (v *View) ShowError(err error) error
- func (v *View) ShowFormat(cfg *pb.FormatRequest_Config, res *pb.FormatResponse) error
- func (v *View) ShowOperationEvent(*pb.Operation_Event)
- func (v *View) ShowOperationResponse(res *pb.Operation_Response) error
- func (v *View) ShowOperationResponses(res *pb.OperationResponses) error
- func (v *View) ShowOutput(out *pb.OperationResponses) error
- func (v *View) ShowSampleList(res *pb.ListSamplesResponse) error
- func (v *View) ShowSampleObservation(res *pb.ObserveSampleResponse) error
- func (v *View) ShowScenarioList(res *pb.ListScenariosResponse) error
- func (v *View) ShowScenarioOutline(res *pb.OutlineScenariosResponse) error
- func (v *View) ShowScenariosValidateConfig(res *pb.ValidateScenariosConfigurationResponse) error
- func (v *View) ShowVersion(all bool, res *pb.GetVersionResponse) error
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(settings *pb.UI_Settings) Opt
WithUISettings configures the view with the UI settings.
type View ¶
type View struct {
// contains filtered or unexported fields
}
View is our html view. At the current time it only implements a limited set of the interface to allow for writing scenarios outlines as HTML, and the CLI should only ever be configured with html from that command. If the html view is given to other commands it will return an error through the basic CLI view.
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 decode response unless it's a incremental update.
func (*View) ShowDiagnostics ¶
func (v *View) ShowDiagnostics(diags []*pb.Diagnostic) error
ShowDiagnostics writes the given diagnostic to stdout in the formatted version.
func (*View) ShowFormat ¶
func (v *View) ShowFormat(cfg *pb.FormatRequest_Config, res *pb.FormatResponse) error
ShowFormat shows the output of a format request.
func (*View) ShowOperationEvent ¶
func (v *View) ShowOperationEvent(*pb.Operation_Event)
ShowOperationEvent does nothing as the html output doesn't stream events.
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 the results of multiple operations.
func (*View) ShowOutput ¶
func (v *View) ShowOutput(out *pb.OperationResponses) error
ShowOutput shows output response.
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
ShowSample 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 the scenario outlines.
func (*View) ShowScenariosValidateConfig ¶
func (v *View) ShowScenariosValidateConfig(res *pb.ValidateScenariosConfigurationResponse) error
ShowScenariosValidateConfig shows the validation response.
func (*View) ShowVersion ¶
func (v *View) ShowVersion(all bool, res *pb.GetVersionResponse) error
ShowVersion shows the version information.