Documentation
¶
Overview ¶
golidator.go
Index ¶
- Constants
- func AnyOf[T any](schemaList ...combinator.Schema[T]) *combinator.AnyOfSchema[T]
- func Array[E any]() *array.Schema[E]
- func Boolean() *boolean.Schema
- func Date() *date.Schema
- func Duration() *duration.Schema
- func NumberSchemaOf[N types.Number]() *number.Schema[N]
- func Object[T any](builder func(target *T, schemaValue *object.Schema[T])) *object.Schema[T]
- func OneOf[T any](schemaList ...combinator.Schema[T]) *combinator.OneOfSchema[T]
- func Record[V any]() *record.Schema[V]
- func Register(schemaValue AnySchema)
- func ResetRegistry()
- func Text() *text.Schema
- func Validate[T any](input any, optionList ...Option) (T, error)
- type AnyOfSchema
- type AnySchema
- type ArraySchema
- type BooleanSchema
- type CombinatorSchema
- type DateSchema
- type DurationSchema
- type Formatter
- type Issue
- type Number
- type NumberSchema
- type ObjectSchema
- type OneOfSchema
- type Option
- func WithAdditionalDateLayouts(layouts ...string) Option
- func WithCoerce(value bool) Option
- func WithCoerceDateUnixMilliseconds(value bool) Option
- func WithCoerceDateUnixSeconds(value bool) Option
- func WithCoerceDurationMilliseconds(value bool) Option
- func WithCoerceDurationSeconds(value bool) Option
- func WithCoerceNumberUnderscore(value bool) Option
- func WithCoerceTrimSpace(value bool) Option
- func WithDateLayouts(layouts ...string) Option
- func WithDefaultOnNull(value bool) Option
- func WithFailFast(value bool) Option
- func WithFormatter(formatter Formatter) Option
- func WithMaxIssues(value int) Option
- func WithOmitZero(value bool) Option
- func WithTimeLocation(value *time.Location) Option
- type Options
- type RecordSchema
- type TextSchema
- type ValidationError
Constants ¶
View Source
const CodeOneOf = combinator.CodeOneOf
Variables ¶
This section is empty.
Functions ¶
func AnyOf ¶
func AnyOf[T any](schemaList ...combinator.Schema[T]) *combinator.AnyOfSchema[T]
func OneOf ¶
func OneOf[T any](schemaList ...combinator.Schema[T]) *combinator.OneOfSchema[T]
func ResetRegistry ¶
func ResetRegistry()
Types ¶
type AnyOfSchema ¶
type AnyOfSchema[T any] = combinator.AnyOfSchema[T]
type ArraySchema ¶
type BooleanSchema ¶
type CombinatorSchema ¶
type CombinatorSchema[T any] = combinator.Schema[T]
type DateSchema ¶
type DurationSchema ¶
type ObjectSchema ¶
type OneOfSchema ¶
type OneOfSchema[T any] = combinator.OneOfSchema[T]
type Option ¶
func WithCoerce ¶
func WithCoerceTrimSpace ¶
func WithDateLayouts ¶
func WithDefaultOnNull ¶
func WithFailFast ¶
func WithFormatter ¶
func WithMaxIssues ¶
func WithOmitZero ¶
func WithTimeLocation ¶
type RecordSchema ¶
type TextSchema ¶
type ValidationError ¶
type ValidationError = issues.ValidationError
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
ast
internal/ast/hash.go
|
internal/ast/hash.go |
|
codec
internal/codec/decode.go
|
internal/codec/decode.go |
|
defaults
internal/defaults/apply.go
|
internal/defaults/apply.go |
|
engine
internal/engine/context.go
|
internal/engine/context.go |
|
issues
internal/issues/format.go
|
internal/issues/format.go |
|
path
internal/path/builder.go
|
internal/path/builder.go |
|
reflection
internal/reflection/field_name.go
|
internal/reflection/field_name.go |
|
registry
internal/registry/registry.go
|
internal/registry/registry.go |
|
ruleset
internal/ruleset/rule.go
|
internal/ruleset/rule.go |
|
testkit
internal/testkit/validation.go
|
internal/testkit/validation.go |
|
schema/options.go
|
schema/options.go |
|
array
schema/array/rules.go
|
schema/array/rules.go |
|
array/rule
schema/array/rule/eq.go
|
schema/array/rule/eq.go |
|
boolean
schema/boolean/parse.go
|
schema/boolean/parse.go |
|
combinator
schema/combinator/anyof.go
|
schema/combinator/anyof.go |
|
date
schema/date/parse.go
|
schema/date/parse.go |
|
date/rule
schema/date/rule/eq.go
|
schema/date/rule/eq.go |
|
duration
schema/duration/parse.go
|
schema/duration/parse.go |
|
duration/rule
schema/duration/rule/eq.go
|
schema/duration/rule/eq.go |
|
number
schema/number/parse.go
|
schema/number/parse.go |
|
number/rule
schema/number/rule/eq.go
|
schema/number/rule/eq.go |
|
number/util
schema/number/util/is_nan.go
|
schema/number/util/is_nan.go |
|
object
schema/object/field.go
|
schema/object/field.go |
|
object/rule
schema/object/rule/comparator_eqcsfield.go
|
schema/object/rule/comparator_eqcsfield.go |
|
record
schema/record/rules.go
|
schema/record/rules.go |
|
record/rule
schema/record/rule/eq.go
|
schema/record/rule/eq.go |
|
text
schema/text/parser.go
|
schema/text/parser.go |
|
text/rule
schema/text/rule/ascii.go
|
schema/text/rule/ascii.go |
Click to show internal directories.
Click to hide internal directories.