status

package
v0.0.32 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(failOnWarn bool, res *pb.DecodeResponse) error

Decode returns the status for a fligth plan decode.

func Error

func Error(msg string, errs ...error) error

Error takes a message and optional errors to wrap and returns a new error.

func Format

func Format(cfg *pb.FormatRequest_Config, res *pb.FormatResponse) error

Format returns the format status.

func GetVersion

func GetVersion(res *pb.GetVersionResponse) error

GetVersion returns the get version response.

func HasErrorDiags

func HasErrorDiags(res ...ResWithDiags) bool

HasErrorDiags returns whether or not the response has error diagnostics.

func HasFailed

func HasFailed(failOnWarn bool, res ...ResWithDiags) bool

HasFailed takes a boolean which determines whether or not the diagnostics failed or not.

func HasWarningDiags

func HasWarningDiags(res ...ResWithDiags) bool

HasWarningDiags returns whether or not the response has warning diagnostics.

func ListSamples

func ListSamples(failOnWarn bool, res *pb.ListSamplesResponse) error

ListSamples returns the status response for a sample list.

func ListScenarios

func ListScenarios(failOnWarn bool, res *pb.ListScenariosResponse) error

ListScenarios returns the status response for a scenario list.

func OperationResponse

func OperationResponse(failOnWarn bool, res *pb.Operation_Response) error

OperationResponse returns the status for an operation.

func OperationResponses

func OperationResponses(failOnWarn bool, res *pb.OperationResponses) error

OperationResponses returns the status multiple operations.

func OutlineScenarios

func OutlineScenarios(failOnWarn bool, res *pb.OutlineScenariosResponse) error

OutlineScenarios returns the status response for a scenario outline.

func ScenariosValidateConfig

func ScenariosValidateConfig(failOnWarn bool, res *pb.ValidateScenariosConfigurationResponse) error

ScenariosValidateConfig returns the status response for a flight plan validation.

func ShowSampleObservation

func ShowSampleObservation(failOnWarn bool, res *pb.ObserveSampleResponse) error

ShowSampleObservation returns status of the sample observation.

func Unimplemented

func Unimplemented(msg string) error

Unimplemented returns an unimplemented error.

Types

type ErrExit

type ErrExit struct {
	Err      error
	ExitCode int
	Msg      string
}

ErrExit is an error that contains requested special exit behavior.

func (*ErrExit) Error

func (e *ErrExit) Error() string

func (*ErrExit) Unwrap

func (e *ErrExit) Unwrap() error

type ResWithDiags

type ResWithDiags interface {
	GetDiagnostics() []*pb.Diagnostic
}

ResWithDiags is an interface of a response that has diagnostics.

Jump to

Keyboard shortcuts

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