Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TypedValue ¶
type TypedValue struct {
// contains filtered or unexported fields
}
TypedValue is a value of some specific type.
func AsTyped ¶
AsTyped accepts a value and a type and returns a TypedValue. 'v' must have type 'typeName' in the schema. An error is returned if the v doesn't conform to the schema.
func AsTypedUnvalidated ¶
AsTypeUnvalidated is just like WithType, but doesn't validate that the type conforms to the schema, for cases where that has already been checked.
func (TypedValue) Validate ¶
func (tv TypedValue) Validate() error
Validate returns an error with a list of every spec violation.
type ValidationError ¶
ValidationError reports an error about a particular field
func (ValidationError) Error ¶
func (ve ValidationError) Error() string
Error returns a human readable error message.
type ValidationErrors ¶
type ValidationErrors []ValidationError
ValidationErrors accumulates multiple validation error messages.
func (ValidationErrors) Error ¶
func (errs ValidationErrors) Error() string
Error returns a human readable error message reporting each error in the list.