Documentation ¶
Index ¶
- Variables
- func ValidateDeviceLayoutResponse(result *DeviceLayoutResponse) (err error)
- func ValidateDeviceLayoutResponseView(result *DeviceLayoutResponseView) (err error)
- func ValidateSensorRangeView(result *SensorRangeView) (err error)
- func ValidateSensorReadingView(result *SensorReadingView) (err error)
- func ValidateStationConfigurationView(result *StationConfigurationView) (err error)
- func ValidateStationModuleView(result *StationModuleView) (err error)
- func ValidateStationSensorView(result *StationSensorView) (err error)
- type DeviceLayoutResponse
- type DeviceLayoutResponseView
- type SensorRangeView
- type SensorReadingView
- type StationConfigurationView
- type StationModuleView
- type StationSensorView
Constants ¶
This section is empty.
Variables ¶
var ( // DeviceLayoutResponseMap is a map of attribute names in result type // DeviceLayoutResponse indexed by view name. DeviceLayoutResponseMap = map[string][]string{ "default": []string{ "configurations", "sensors", }, } )
Functions ¶
func ValidateDeviceLayoutResponse ¶
func ValidateDeviceLayoutResponse(result *DeviceLayoutResponse) (err error)
ValidateDeviceLayoutResponse runs the validations defined on the viewed result type DeviceLayoutResponse.
func ValidateDeviceLayoutResponseView ¶
func ValidateDeviceLayoutResponseView(result *DeviceLayoutResponseView) (err error)
ValidateDeviceLayoutResponseView runs the validations defined on DeviceLayoutResponseView using the "default" view.
func ValidateSensorRangeView ¶
func ValidateSensorRangeView(result *SensorRangeView) (err error)
ValidateSensorRangeView runs the validations defined on SensorRangeView.
func ValidateSensorReadingView ¶
func ValidateSensorReadingView(result *SensorReadingView) (err error)
ValidateSensorReadingView runs the validations defined on SensorReadingView.
func ValidateStationConfigurationView ¶
func ValidateStationConfigurationView(result *StationConfigurationView) (err error)
ValidateStationConfigurationView runs the validations defined on StationConfigurationView.
func ValidateStationModuleView ¶
func ValidateStationModuleView(result *StationModuleView) (err error)
ValidateStationModuleView runs the validations defined on StationModuleView.
func ValidateStationSensorView ¶
func ValidateStationSensorView(result *StationSensorView) (err error)
ValidateStationSensorView runs the validations defined on StationSensorView.
Types ¶
type DeviceLayoutResponse ¶
type DeviceLayoutResponse struct { // Type to project Projected *DeviceLayoutResponseView // View to render View string }
DeviceLayoutResponse is the viewed result type that is projected based on a view.
type DeviceLayoutResponseView ¶
type DeviceLayoutResponseView struct { Configurations []*StationConfigurationView Sensors map[string][]*StationSensorView }
DeviceLayoutResponseView is a type that runs validations on a projected type.
type SensorRangeView ¶
SensorRangeView is a type that runs validations on a projected type.
type SensorReadingView ¶
SensorReadingView is a type that runs validations on a projected type.
type StationConfigurationView ¶
type StationConfigurationView struct { ID *int64 Time *int64 ProvisionID *int64 MetaRecordID *int64 SourceID *int32 Modules []*StationModuleView }
StationConfigurationView is a type that runs validations on a projected type.
type StationModuleView ¶
type StationModuleView struct { ID *int64 HardwareID *string HardwareIDBase64 *string MetaRecordID *int64 Name *string Label *string Position *int32 Flags *int32 Internal *bool FullKey *string Sensors []*StationSensorView Meta map[string]interface{} }
StationModuleView is a type that runs validations on a projected type.
type StationSensorView ¶
type StationSensorView struct { Name *string UnitOfMeasure *string Reading *SensorReadingView Key *string FullKey *string Ranges []*SensorRangeView Meta map[string]interface{} }
StationSensorView is a type that runs validations on a projected type.