Documentation
¶
Index ¶
- Variables
- type Schema
- func (s Schema[T]) Decode(raw []byte) (T, error)
- func (s Schema[T]) DecodeString(str string) (T, error)
- func (s Schema[T]) Defs() map[string]json.RawMessage
- func (s Schema[T]) MarshalJSON() ([]byte, error)
- func (s Schema[T]) Params() map[string]any
- func (s Schema[T]) Raw() []byte
- func (s Schema[T]) Root() []byte
- func (s Schema[T]) Validate(v any) error
- func (s Schema[T]) ValidateRaw(raw []byte) error
- func (s Schema[T]) ValidateString(str string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidInput = errors.New("invalid input: argument is not valid JSON") ErrInvalidArguments = errors.New("invalid input: argument do not match the schema") )
View Source
var AnyRawSchema = mustRawSchema(anySchema)
View Source
var BlocksRawSchema = mustRawSchema(blocksSchema)
View Source
var ObjectRawSchema = mustRawSchema(objectSchema)
Functions ¶
This section is empty.
Types ¶
type Schema ¶
func (Schema[T]) DecodeString ¶
func (Schema[T]) MarshalJSON ¶
func (Schema[T]) ValidateRaw ¶
func (Schema[T]) ValidateString ¶
Click to show internal directories.
Click to hide internal directories.