Documentation
¶
Index ¶
- func GenObj[T any](opts ...utils.OptionExtender) (v T)
- func GenObjBySerializeAlgo(algo serialize.Algorithm) (data any)
- func GenObjList[T any](num int, opts ...utils.OptionExtender) (vList []T)
- func GenObjListBySerializeAlgo(algo serialize.Algorithm, num int) (dataList any)
- func IgnoreFields(ignored ...string) utils.OptionFunc[randomOption]
- type AllType
- type CommonObj
- type CommonType
- type RandomObj
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenObj ¶
func GenObj[T any](opts ...utils.OptionExtender) (v T)
func GenObjBySerializeAlgo ¶
func GenObjList ¶
func GenObjList[T any](num int, opts ...utils.OptionExtender) (vList []T)
func IgnoreFields ¶
func IgnoreFields(ignored ...string) utils.OptionFunc[randomOption]
Types ¶
type AllType ¶
type AllType struct {
Str string
Strp *string
StrSlice []string
StrpSlice []*string
Rune rune
Runep *rune
RuneSlice []rune
RunepSlice []*rune
Byte byte
Bytep *byte
ByteSlice []byte
BytepSlice []*byte
Bool bool
Boolp *bool
BoolSlice []bool
BoolpSlice []*bool
Int int
Int8 int8
Int16 int16
Int32 int32
Int64 int64
IntSlice []int
Int8Slice []int8
Int16Slice []int16
Int32Slice []int32
Int64Slice []int64
Intp *int
Int8p *int8
Int16p *int16
Int32p *int32
Int64p *int64
IntpSlice []*int
Int8pSlice []*int8
Int16pSlice []*int16
Int32pSlice []*int32
Int64pSlice []*int64
Uint uint
Uint8 uint8
Uint16 uint16
Uint32 uint32
Uint64 uint64
UintSlice []uint
Uint8Slice []uint8
Uint16Slice []uint16
Uint32Slice []uint32
Uint64Slice []uint64
Uintp *uint
Uint8p *uint8
Uint16p *uint16
Uint32p *uint32
Uint64p *uint64
UintpSlice []*uint
Uint8pSlice []*uint8
Uint16pSlice []*uint16
Uint32pSlice []*uint32
Uint64pSlice []*uint64
Float32 float32
Float64 float64
Float32Slice []float32
Float64Slice []float64
Float32p *float32
Float64p *float64
Float32pSlice []*float32
Float64pSlice []*float64
Complex64 complex64 `faker:"-" json:"-"`
Complex128 complex128 `faker:"-" json:"-"`
Complex64Slice []complex64 `faker:"-" json:"-"`
Complex128Slice []complex128 `faker:"-" json:"-"`
Complex64p *complex64 `faker:"-" json:"-"`
Complex128p *complex128 `faker:"-" json:"-"`
Complex64pSlice []*complex64 `faker:"-" json:"-"`
Complex128pSlice []*complex128 `faker:"-" json:"-"`
Uintptr uintptr `faker:"-"`
Uintptrp *uintptr `faker:"-"`
UintptrSlice []uintptr `faker:"-"`
UintptrpSlice []*uintptr `faker:"-"`
Any any `faker:"-"`
Anyp *any `faker:"-"`
AnySlice []any `faker:"-"`
AnypSlice []*any `faker:"-"`
Time time.Time
Timep *time.Time
}
type CommonObj ¶
type CommonObj struct {
CommonType
Basic CommonType
Basicp *CommonType
Int64Map map[int64]*CommonType
StringMap map[string]*CommonType
Array [2]*CommonType
Nil *CommonType
}
type CommonType ¶
type CommonType struct {
Str string
Strp *string
StrSlice []string
StrpSlice []*string
Rune rune
Runep *rune
RuneSlice []rune
RunepSlice []*rune
Byte byte
Bytep *byte
ByteSlice []byte
BytepSlice []*byte
Bool bool
Boolp *bool
BoolSlice []bool
BoolpSlice []*bool
Int int
Int8 int8
Int16 int16
Int32 int32
Int64 int64
IntSlice []int
Int8Slice []int8
Int16Slice []int16
Int32Slice []int32
Int64Slice []int64
Intp *int
Int8p *int8
Int16p *int16
Int32p *int32
Int64p *int64
IntpSlice []*int
Int8pSlice []*int8
Int16pSlice []*int16
Int32pSlice []*int32
Int64pSlice []*int64
Uint uint
Uint8 uint8
Uint16 uint16
Uint32 uint32
Uint64 uint64
UintSlice []uint
Uint8Slice []uint8
Uint16Slice []uint16
Uint32Slice []uint32
Uint64Slice []uint64
Uintp *uint
Uint8p *uint8
Uint16p *uint16
Uint32p *uint32
Uint64p *uint64
UintpSlice []*uint
Uint8pSlice []*uint8
Uint16pSlice []*uint16
Uint32pSlice []*uint32
Uint64pSlice []*uint64
Float32 float32
Float64 float64
Float32Slice []float32
Float64Slice []float64
Float32p *float32
Float64p *float64
Float32pSlice []*float32
Float64pSlice []*float64
Any any `faker:"-"`
Anyp *any `faker:"-"`
AnySlice []any `faker:"-"`
AnypSlice []*any `faker:"-"`
}
Click to show internal directories.
Click to hide internal directories.