Documentation
¶
Overview ¶
Package kstructs is deprecated: use ksqltest instead.
Index ¶
- func CallFunctionWithRows(fn interface{}, rows []map[string]interface{}) error
- func FillSliceWith(entities interface{}, dbRows []map[string]interface{}) error
- func FillStructWith(record interface{}, dbRow map[string]interface{}) error
- func StructToMap(obj interface{}) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallFunctionWithRows ¶
CallFunctionWithRows was created for helping test the QueryChunks method
deprecated: Use ksqltest.CallFunctionWithRows() instead
func FillSliceWith ¶
FillSliceWith is meant to be used on unit tests to mock the response from the database.
The first argument is any slice of structs you are passing to a ksql func, and the second is a slice of maps representing the database rows you want to use to update this struct.
deprecated: Use ksqltest.FillSliceWith() instead
func FillStructWith ¶
FillStructWith is meant to be used on unit tests to mock the response from the database.
The first argument is any struct you are passing to a ksql func, and the second is a map representing a database row you want to use to update this struct.
deprecated: Use ksqltest.FillStructWith() instead
func StructToMap ¶
StructToMap converts any struct type to a map based on the tag named `ksql`, i.e. `ksql:"map_key_name"`
Valid pointers are dereferenced and copied to the map, null pointers are ignored.
This function is efficient in the fact that it caches the slower steps of the reflection required to perform this task.
deprecated: Use ksqltest.StructToMap() instead
Types ¶
This section is empty.