Documentation ¶
Overview ¶
Package measurementpbutil provides utility functions for working with the generated protobuf type Measurement.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func String ¶
func String(m mpb.Measurement) string
func Validate ¶
func Validate(m *mpb.Measurement) error
Validate validates each field of the Measurement against an optional regex provided in the .proto file. It returns nil if all fields are valid and no other errors occurred along the way. Example of how to provide a regex in a .proto file:
string device_id = 1 [(regex) = "^[a-z][a-z0-9+.%~_-]{2,254}$"];
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.