Documentation
¶
Index ¶
- func AnyToArrayOfString(v any) ([]string, error)
- func AnyToFloat(v any) (float64, error)
- func AnyToString(v any) (string, error)
- func AnyToType(in any, expected reflect.Type) (out any, err error)
- func ArrayToArrayOfAny(v any) ([]any, error)
- func ArrayToArrayOfType(a []any, expectedValue reflect.Type) (reflect.Value, error)
- func CheckValidPointerToStruct(in any) error
- func ConditionValueToArrayOfAny(condition string, expected reflect.Type) ([]any, error)
- func ConditionValueToT[T comparable](v T, condition string) (T, error)
- func GetValidMap(in any) (map[string]any, error)
- func ISO8601StringToTime(in string) (time.Time, error)
- func IsArray(in any) bool
- func IsArrayOfMap(in any) bool
- func IsArrayOfStruct(in any) bool
- func IsString(in any) bool
- func IsStruct(in any) bool
- func JsonMapToMapKV(m map[string]any, expectedKey reflect.Type, expectedValue reflect.Type) (reflect.Value, error)
- func MapJsonMapToStruct(jsonMapInput map[string]any, structToUpdate any) error
- func MapKeysToArrayOfAny(v any) ([]any, error)
- func SetStructValueByJson(fv reflect.Value, jsonValue any) (err error)
- func UnixStringToTime(in string) (time.Time, error)
- func UnmapRequestToJsonMap(request *http.Request) (map[string]any, error)
- func UnmapStructToJsonMap(structInput any, jsonMapToUpdate *map[string]any) error
- func UnmapUrlValuesToJsonMap(values url.Values) (map[string]any, error)
- func UnmarshalJsonToJsonMap(jsonInput []byte) (map[string]any, error)
- func UnmarshalRequestToJsonMap(request *http.Request) (map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToArrayOfString ¶ added in v0.5.0
func AnyToFloat ¶ added in v0.5.0
func AnyToString ¶ added in v0.5.0
func ArrayToArrayOfAny ¶ added in v0.5.0
func ArrayToArrayOfType ¶ added in v0.5.0
func CheckValidPointerToStruct ¶ added in v0.4.0
Checks if the given value is a pointer to a struct.
func ConditionValueToArrayOfAny ¶ added in v0.5.0
func ConditionValueToT ¶ added in v0.5.0
func ConditionValueToT[T comparable](v T, condition string) (T, error)
func ISO8601StringToTime ¶ added in v0.5.0
ISO8601StringToTime converts an ISO8601 date string to a time.Time object. It supports RFC3339 format timestamps including timezone offsets, as well as database formats without timezone information.
func IsArrayOfMap ¶ added in v0.4.0
Checks if the given value is an array of maps.
func IsArrayOfStruct ¶ added in v0.4.0
Checks if the given value is an array or slice of structs.
func JsonMapToMapKV ¶ added in v0.5.0
func MapJsonMapToStruct ¶ added in v0.5.0
func MapKeysToArrayOfAny ¶ added in v0.5.0
func SetStructValueByJson ¶ added in v0.5.0
func UnixStringToTime ¶ added in v0.5.0
UnixStringToTime converts a Unix timestamp string to a time.Time object. It checks if the string is a valid Unix timestamp and parses it.
func UnmapRequestToJsonMap ¶ added in v0.5.0
func UnmapStructToJsonMap ¶ added in v0.5.0
func UnmapUrlValuesToJsonMap ¶ added in v0.5.0
func UnmarshalJsonToJsonMap ¶ added in v0.5.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.