Documentation ¶
Index ¶
- func Equal(a, b interface{}) (bool, error)
- func HasZero(x interface{}) bool
- func IsStruct(x interface{}) bool
- func IsZero(x interface{}) bool
- func Iterate(toModify interface{}, tagKey, tagVal string, iterFn IterateFn) error
- func MemberNames(x interface{}) []string
- func MemberValues(x interface{}) []interface{}
- func Members(x interface{}) []*structs.Field
- func StructName(x interface{}) string
- func StructPack(v interface{}, p []byte) error
- func StructUnpack(p []byte, v interface{}) error
- func ToMap(x interface{}) map[string]interface{}
- type IterateFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasZero ¶
func HasZero(x interface{}) bool
Check if any field of a struct is initialized or not.
func IsStruct ¶
func IsStruct(x interface{}) bool
Check if server is a struct or a pointer to struct
func IsZero ¶
func IsZero(x interface{}) bool
Check if all fields of a struct is initialized or not.
func Iterate ¶
Iterate over the basic type members of a structure with a specific flag. Reference: https://github.com/IQ-tech/go-crypto-layer/blob/master/datacrypto/aesecb.go#L42 EncryptStruct crawls all annotated struct properties and encrypts them in place
func MemberNames ¶
func MemberNames(x interface{}) []string
Convert the names of a struct to a []string (see "Names methods" for more info about fields)
func MemberValues ¶
func MemberValues(x interface{}) []interface{}
func Members ¶
Convert the values of a struct to a []*Field (see "Field methods" for more info about fields)
func StructPack ¶
func StructUnpack ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.