normalizedpayload

package
v3.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 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
	CO2              *float64
	LightIntensity   *float64
}

Air is an air measurement.

type Measurement

type Measurement struct {
	Time *time.Time
	Soil Soil
	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 *structpb.Struct
}

ParsedMeasurement is the result of parsing measurements with Parse.

func Parse

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

Parse parses and validates the measurements.

type Soil added in v3.25.2

type Soil struct {
	Depth                  *float64
	Moisture               *float64
	Temperature            *float64
	ElectricalConductivity *float64
	PHLevel                *float64
	Nitrogen               *float64
	Phosphorus             *float64
	Potassium              *float64
}

Soil is an soil measurement.

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