normalizedpayload

package
v3.24.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package normalizedpayload implements functionality for parsing and validating normalized payload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Air

type Air struct {
	Temperature      *float64
	RelativeHumidity *float64
	Pressure         *float64
}

Air is an air measurement.

type Measurement

type Measurement struct {
	Time *time.Time
	Air  Air
	Wind Wind
}

Measurement is a measurement.

type ParsedMeasurement

type ParsedMeasurement struct {
	Measurement
	// ValidationErrors contains any errors that occurred during field validation.
	ValidationErrors []error
	// Valid only contains the valid fields, for which there were no validation errors.
	Valid *pbtypes.Struct
}

ParsedMeasurement is the result of parsing measurements with Parse.

func Parse

func Parse(measurements []*pbtypes.Struct) ([]ParsedMeasurement, error)

Parse parses and validates the measurements.

type Wind

type Wind struct {
	Speed     *float64
	Direction *float64
}

Wind is a wind measurement.

Jump to

Keyboard shortcuts

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