influxdata / influxdb-client-go

InfluxDB 2 Go Client
MIT License
609 stars 116 forks source link

feat: add DataToPoint utility to convert a custom struct to a write Point #394

Closed sranka closed 11 months ago

sranka commented 12 months ago

Proposed Changes

This PR adds a new write.DataToPoint function that converts custom structures to write.Point, the code uses the tags/annotations from v3 client proposal to map structure fields to line protocol parts.

See also https://github.com/influxdata/influxdb-client-go/pull/389

Checklist

codecov-commenter commented 12 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c1da0c5) 92.72% compared to head (425a783) 92.94%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #394 +/- ## ========================================== + Coverage 92.72% 92.94% +0.21% ========================================== Files 23 25 +2 Lines 2242 2310 +68 ========================================== + Hits 2079 2147 +68 Misses 123 123 Partials 40 40 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.