Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { UUID string `json:"uuid" gorm:"primary_key;type:char(20);not null;"` Name string `json:"name" gorm:"type:varchar(32);unique;not null"` Group string `json:"location" gorm:"type:varchar(64)"` LocLat float64 `json:"lat"` LocLon float64 `json:"lon"` SinkID uint `json:"sink_id" gorm:"not null"` Sensors []Sensor `json:"sensors" gorm:"foreignkey:UUID"` }
type NodeSensor ¶
type NodeSensor struct { NodeUUID string `gorm:"primary_key;type:char(20)"` SensorUUID string `gorm:"primary_key;type:char(20)"` }
func (NodeSensor) TableName ¶
func (NodeSensor) TableName() string
type Sensor ¶
type Sensor struct { UUID string `json:"uuid" gorm:"primary_key;type:char(20);not null;"` Name string `json:"name" gorm:"type:varchar(32);unique;not null"` ValueList []SensorValue `json:"value_list" gorm:"foreignkey:SensorUUID"` }
type SensorValue ¶
type SensorValue struct { SensorUUID string `json:"sensor_uuid" gorm:"primary_key;type:char(20);not null"` ValueName string `json:"value_name" gorm:"primary_key;type:varchar(32);not null"` Index int `json:"index" gorm:"not null"` }
func (SensorValue) TableName ¶
func (SensorValue) TableName() string
Click to show internal directories.
Click to hide internal directories.