json

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(jsonMap gjson.Result, m any, validTagName string) error

Types

type Field

type Field struct {
	*rule.BaseFiled
	// contains filtered or unexported fields
}

func (*Field) Bool

func (f *Field) Bool() (bool, bool)

func (*Field) CurDataIndex

func (f *Field) CurDataIndex() string

func (*Field) DefaultVal

func (f *Field) DefaultVal() string

func (*Field) DefaultValExits

func (f *Field) DefaultValExits() bool

func (*Field) Exist

func (f *Field) Exist() bool

func (*Field) Float

func (f *Field) Float() (float64, bool)

func (*Field) InheritTag

func (f *Field) InheritTag() reflect.StructTag

func (*Field) Int

func (f *Field) Int() (int64, bool)

func (*Field) IsArray

func (f *Field) IsArray() bool

func (*Field) IsBool

func (f *Field) IsBool() bool

func (*Field) IsNumeric

func (f *Field) IsNumeric() bool

func (*Field) IsObject

func (f *Field) IsObject() bool

func (*Field) Key

func (f *Field) Key() string

func (*Field) Len

func (f *Field) Len() int

func (*Field) MapKeys

func (f *Field) MapKeys() []string

func (*Field) MustBool

func (f *Field) MustBool() bool

func (*Field) MustFloat

func (f *Field) MustFloat() float64

func (*Field) MustInt

func (f *Field) MustInt() int64

func (*Field) MustStr

func (f *Field) MustStr() string

func (*Field) MustUint

func (f *Field) MustUint() uint64

func (*Field) ParamKey

func (f *Field) ParamKey() string

func (*Field) Parent

func (f *Field) Parent() reflect.Type

func (*Field) Raw

func (f *Field) Raw() string

func (*Field) Root

func (f *Field) Root() reflect.Type

func (*Field) RuleName

func (f *Field) RuleName() string

func (*Field) RuleVal

func (f *Field) RuleVal() string

func (*Field) Self

func (f *Field) Self() reflect.Type

func (*Field) SetDataIdx

func (f *Field) SetDataIdx(idx string)

func (*Field) Str

func (f *Field) Str() (string, bool)

func (*Field) StructField

func (f *Field) StructField(valTyp reflect.Type, namespace string) (rule.Field, bool)

func (*Field) Tag

func (f *Field) Tag() reflect.StructTag

func (*Field) ToString

func (f *Field) ToString() string

func (*Field) Uint

func (f *Field) Uint() (uint64, bool)

Jump to

Keyboard shortcuts

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