errors

package
v2.15.3-dev-ko-test2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigError

type ConfigError interface {
	error
	Coordinates() coordinate.Coordinate
}

type ConfigLoaderError

type ConfigLoaderError struct {
	// Path of the config.yaml that could not be loaded
	Path string `json:"path"`
	// Err is the underlying error that occurred while loading
	Err error `json:"error" jsonschema:"type=object"`
}

ConfigLoaderError contains details about an error that occurred while loading a config.Config

func (ConfigLoaderError) Error

func (e ConfigLoaderError) Error() string

func (ConfigLoaderError) Unwrap

func (e ConfigLoaderError) Unwrap() error

type ConfigWriterError

type ConfigWriterError struct {
	// Path of the file that failed to be written
	Path string `json:"path"`
	// Err is the underlying error that occurred
	Err error `json:"error" jsonschema:"type=object"`
}

ConfigWriterError is an error that occurred while trying to write a config.Config to a file

func (ConfigWriterError) Error

func (e ConfigWriterError) Error() string

func (ConfigWriterError) Unwrap

func (e ConfigWriterError) Unwrap() error

type DefinitionParserError

type DefinitionParserError struct {
	// Location (coordinate) of the configuration that could not be parsed
	Location coordinate.Coordinate `json:"location"`
	// Path of the config.yaml that could not be parsed
	Path string `json:"path"`
	// Reason describing why parsing failed
	Reason string `json:"reason"`
}

DefinitionParserError contains details about errors when parsing a YAML definition of a config

func (DefinitionParserError) Coordinates

func (DefinitionParserError) Error

func (e DefinitionParserError) Error() string

type DetailedConfigError

type DetailedConfigError interface {
	ConfigError
	LocationDetails() EnvironmentDetails
}

type DetailedConfigWriterError

type DetailedConfigWriterError struct {
	// Location (coordinate) of the config.Config that failed to be written to file
	Location coordinate.Coordinate `json:"location"`
	// Path of the file that failed to be written
	Path string `json:"path"`
	// Err is the underlying error that occurred
	Err error `json:"error" jsonschema:"type=object"`
}

DetailedConfigWriterError is an error that occurred while trying to write a config.Config to a file

func (DetailedConfigWriterError) Coordinates

func (DetailedConfigWriterError) Error

func (DetailedConfigWriterError) Unwrap

func (e DetailedConfigWriterError) Unwrap() error

type DetailedDefinitionParserError

type DetailedDefinitionParserError struct {
	DefinitionParserError
	// EnvironmentDetails of the environment the parsing of a configuration failed for
	EnvironmentDetails EnvironmentDetails `json:"environmentDetails"`
}

DetailedDefinitionParserError is a DefinitionParserError, enriched with information for which environment loading failed

func (DetailedDefinitionParserError) Environment

func (e DetailedDefinitionParserError) Environment() string

func (DetailedDefinitionParserError) LocationDetails

type EnvironmentDetails

type EnvironmentDetails struct {
	Group       string `json:"group"`
	Environment string `json:"environment"`
}

type InvalidJsonError

type InvalidJsonError struct {
	// Location (coordinate) of the configuration whose template is invalid JSON
	Location coordinate.Coordinate `json:"location"`
	// EnvironmentDetails of the environment the template was rendered for
	EnvironmentDetails EnvironmentDetails `json:"environmentDetails"`
	// TemplateFilePath points to the file containing invalid JSON
	TemplateFilePath string `json:"templateFilePath"`
	// Err is the underlying JSON rendering error
	Err error `json:"error"`
}

InvalidJsonError contains details about a template JSON being invalid

func (InvalidJsonError) Coordinates

func (e InvalidJsonError) Coordinates() coordinate.Coordinate

func (InvalidJsonError) Error

func (e InvalidJsonError) Error() string

func (InvalidJsonError) LocationDetails

func (e InvalidJsonError) LocationDetails() EnvironmentDetails

func (InvalidJsonError) Unwrap

func (e InvalidJsonError) Unwrap() error

type ParameterDefinitionParserError

type ParameterDefinitionParserError struct {
	DetailedDefinitionParserError
	// ParameterName of the YAML parameter that failed to be parsed
	ParameterName string `json:"parameterName"`
}

ParameterDefinitionParserError is a DetailedDefinitionParserError for a specific parameter that failed to laod

func (ParameterDefinitionParserError) Error

Jump to

Keyboard shortcuts

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