validation

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortErrorDetails

func SortErrorDetails(errs []*v1.ErrorDetail)

SortErrorDetails sorts a slice of error details for predictability, by modifying the inputted slice.

Orders by errors without field names in ascending order first (using their messages), and then orders the field names in ascending order.

func Validate

func Validate(typ string, message proto.Message) error

Types

type Error

type Error struct {
	Errs []*v1.ErrorDetail
}

func (Error) Error

func (v Error) Error() string

type ErrorTranslator

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

ErrorTranslator translates JSON Schema errors into Error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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