Documentation
      ¶
    
    
  
    
  
    Index ¶
- func GetContextObject[T any](o *Options) *T
 - func NewMapKeyError(err error, core CoreModeler, node mapKeyNodeGetter, key string) error
 - func NewMapValueError(err error, core CoreModeler, node mapValueNodeGetter, key string) error
 - func NewSliceError(err error, core CoreModeler, node sliceNodeGetter, index int) error
 - func NewValidationError(err error, node *yaml.Node) error
 - func NewValueError(err error, core CoreModeler, node valueNodeGetter) error
 - func SortValidationErrors(allErrors []error)
 - type CoreModeler
 - type Error
 - type MissingFieldError
 - type MissingValueError
 - type Option
 - type Options
 - type TypeMismatchError
 - type ValueValidationError
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContextObject ¶
func NewMapKeyError ¶ added in v0.2.1
func NewMapKeyError(err error, core CoreModeler, node mapKeyNodeGetter, key string) error
func NewMapValueError ¶ added in v0.2.1
func NewMapValueError(err error, core CoreModeler, node mapValueNodeGetter, key string) error
func NewSliceError ¶ added in v0.2.1
func NewSliceError(err error, core CoreModeler, node sliceNodeGetter, index int) error
func NewValidationError ¶ added in v1.0.0
func NewValueError ¶ added in v0.2.1
func NewValueError(err error, core CoreModeler, node valueNodeGetter) error
func SortValidationErrors ¶ added in v1.0.0
func SortValidationErrors(allErrors []error)
SortValidationErrors sorts the provided validation errors by line and column number lowest to highest.
Types ¶
type CoreModeler ¶ added in v0.2.1
type CoreModeler interface {
	GetRootNode() *yaml.Node
}
    type Error ¶
type Error struct {
	UnderlyingError error
	Node            *yaml.Node
}
    Error represents a validation error and the line and column where it occurred TODO allow getting the JSON path for line/column for validation errors
func (Error) GetColumnNumber ¶ added in v1.0.0
func (Error) GetLineNumber ¶ added in v1.0.0
type MissingFieldError ¶ added in v0.2.2
type MissingFieldError struct {
	Msg string
}
    func NewMissingFieldError ¶ added in v0.2.2
func NewMissingFieldError(msg string, args ...any) *MissingFieldError
func (MissingFieldError) Error ¶ added in v0.2.2
func (e MissingFieldError) Error() string
type MissingValueError ¶ added in v0.2.2
type MissingValueError struct {
	Msg string
}
    func NewMissingValueError ¶ added in v0.2.2
func NewMissingValueError(msg string, args ...any) *MissingValueError
func (MissingValueError) Error ¶ added in v0.2.2
func (e MissingValueError) Error() string
type Options ¶
func NewOptions ¶
type TypeMismatchError ¶ added in v0.2.2
type TypeMismatchError struct {
	Msg string
}
    func NewTypeMismatchError ¶ added in v0.2.2
func NewTypeMismatchError(msg string, args ...any) *TypeMismatchError
func (TypeMismatchError) Error ¶ added in v0.2.2
func (e TypeMismatchError) Error() string
type ValueValidationError ¶ added in v0.2.2
type ValueValidationError struct {
	Msg string
}
    func NewValueValidationError ¶ added in v0.2.2
func NewValueValidationError(msg string, args ...any) *ValueValidationError
func (ValueValidationError) Error ¶ added in v0.2.2
func (e ValueValidationError) Error() string
 Click to show internal directories. 
   Click to hide internal directories.