transformer

package
v1.3.1-dev.9 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Overflow = "overflow"
	NaN      = "NaN"
)

Variables

This section is empty.

Functions

func CheckAssertion

func CheckAssertion(
	cv *dsModels.CommandValue,
	assertion string,
	device *contract.Device,
	lc logger.LoggingClient,
	dc metadata.DeviceClient) error

func MapCommandValue

func MapCommandValue(value *dsModels.CommandValue, mappings map[string]string) (*dsModels.CommandValue, bool)

Types

type NaNError added in v1.4.0

type NaNError struct{}

NaNError is used to throw the NaN error for the floating-point value

func (NaNError) Error added in v1.4.0

func (e NaNError) Error() string

type OverflowError

type OverflowError struct {
	// contains filtered or unexported fields
}

OverflowError is used to throw the error of transformed value is out of range

func NewOverflowError

func NewOverflowError(origin interface{}, transformed float64) OverflowError

func (OverflowError) Error

func (e OverflowError) Error() string

func (OverflowError) String

func (e OverflowError) String() string

Jump to

Keyboard shortcuts

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