columnmap

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(columns map[string]string, data sensor.Data) iter.Seq2[string, any]

Collect return an iterator on each sensor data field with field name as key.

func CollectFields

func CollectFields(columns map[string]string, fields sensor.Fields) iter.Seq2[string, any]

CollectFields returns an iterator over each sensor data field that has a non-nil value with field name as key.

func Transform added in v1.3.1

func Transform(columns map[string]string, data sensor.Data) map[string]any

Transform creates a map with the values copied from the given sensor.Data, using the provided column names as map keys.

Any values that are not included in the given column map are not included in the returned map.

func TransformFields added in v1.3.1

func TransformFields(columns map[string]string, fields sensor.Fields) map[string]any

TransformFields creates a map with the values copied from the given sensor.Fields, using the provided column names as map keys.

Any fields that have a nil value or are not included in the given column map are not included in the returned map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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