Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPayloadMetricNil = fmt.Errorf("payload metrics is nil")
View Source
var ErrPayloadMetricNilHasProperties = fmt.Errorf("payload metrics is nil, properties are not nil")
Functions ¶
This section is empty.
Types ¶
type JsonType ¶
type JsonType interface { MarshalJSON() ([]byte, error) MarshalBinary() ([]byte, error) String() string Bytes() []byte }
JsonType is an interface that represents either a number, string, boolean, or an array of those types. It's intented to serialize single values or arrays of values to JSON
func MetricValueToJsonType ¶
func MetricValueToJsonType(metric *sparkplug.Payload_Metric) (JsonType, error)
MetricValueToJsonType will convert a sparkplug datatype to a JSON type, one of: number, string, boolean, array
Click to show internal directories.
Click to hide internal directories.