rows

package
v1.0.0-costsupdate.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataRows

func DataRows(data []interface{}, columns map[string][]interface{}, intervals map[string][]string, values map[string]string) (rows map[string]map[string]interface{})

DataRows converts the raw data into row structure (via DataToRows) then removes items with empty data, to reduce the size of data sets for display etc

func DataToRows

func DataToRows(data []interface{}, columns map[string][]interface{}, intervals map[string][]string, values map[string]string) (rows map[string]map[string]interface{})

DataToRow converts the api data and using the columns and intervals generates a skeleton struct of all possible records and then fills in the interval values where data is found This resulting map can be iterated over as if each item is a row in the table

func K

func K(c string, v interface{}) string

K helper to generate a k with known dividers

func Key

func Key(item map[string]interface{}, cols []string) string

func Skeleton

func Skeleton(columns map[string][]interface{}, intervals map[string][]string) (skel map[string]map[string]interface{})

Skeleton creates map of empty values for all possible values based on the settings passed eahc key having full set of intervals

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL