Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDereference ¶
Types ¶
type FieldStringifierFn ¶
func Stringifier ¶
func Stringifier(field *xunsafe.Field, nullifyZeroValue bool, nullValue string, options ...interface{}) FieldStringifierFn
type ObjectStringifier ¶
type ObjectStringifier struct {
// contains filtered or unexported fields
}
func TypeStringifier ¶
func TypeStringifier(rType reflect.Type, nullValue string, omitTransient bool, options ...interface{}) *ObjectStringifier
TypeStringifier returns ObjectStringifier for a given Type. It will replace nil values with nullValue for properties with tag: "nullifyEmpty" and omit (if specified) transient properties By default, results are shared, no new arrays are returned unless Parallel(true) is provided as an option.
func (*ObjectStringifier) FieldNames ¶
func (s *ObjectStringifier) FieldNames() []string
func (*ObjectStringifier) Has ¶
func (s *ObjectStringifier) Has(fieldName string) bool
func (*ObjectStringifier) Stringifier ¶
func (s *ObjectStringifier) Stringifier(options ...interface{}) (ObjectStringifierFn, error)
type ObjectStringifierFn ¶
ObjectStringifierFn returns stringified object properties values and information if value was string before
type StringifierConfig ¶
type StringifierConfig struct {
Fields []string
CaseFormat format.CaseFormat
StringifierFloat32Config StringifierFloat32Config
StringifierFloat64Config StringifierFloat64Config
}
StringifierConfig represents stringifier config
type StringifierFloat32Config ¶
type StringifierFloat32Config struct {
Precision string
}
StringifierFloat32Config represents stringifier float32 config
type StringifierFloat64Config ¶
type StringifierFloat64Config struct {
Precision string
}
StringifierFloat64Config represents stringifier float64 config
type ValueAccessor ¶
type ValueAccessor = func(int) interface{}
func Values ¶
func Values(value interface{}) (ValueAccessor, int, error)