Documentation ¶
Index ¶
- Constants
- func CreateSlice(name string) interface{}
- func CreateType(name string) interface{}
- func RegisterType(name string, datatype interface{})
- type Context
- type DataMessage
- type DataPoint
- type DataPointMeta
- type Emitter
- type EmitterStatistics
- type IEmitter
- type IListener
- type KeyValuePair
- type Listener
- type ListenerStatistics
- type Log
- type Meta
- type Recipient
- type Settings
- type User
- type UserCredentials
- type UserData
- type UserPasswordUpdate
- type VolatileDataPoint
Constants ¶
View Source
const ( GroupStatusNotReceiving = iota GroupStatusReceiving = iota )
View Source
const ( UpdateTypePassthru = iota UpdateTypeInterval = iota UpdateTypeDeadband = iota UpdateTypeDevNull = iota )
Variables ¶
This section is empty.
Functions ¶
func CreateSlice ¶
func CreateSlice(name string) interface{}
func CreateType ¶
func CreateType(name string) interface{}
func RegisterType ¶
func RegisterType(name string, datatype interface{})
Types ¶
type DataMessage ¶
type DataPoint ¶
type DataPoint struct { ID int `json:"id"` Time time.Time `json:"t"` Name string `json:"n"` Value interface{} `json:"v"` Quality int `json:"q"` }
Version 2 message types
type DataPointMeta ¶
type DataPointMeta struct { ID uint `json:"id" gorm:"autoincrement"` Name string `json:"name" gorm:"unique;index"` Description string `json:"description"` EngUnit string `json:"engunit"` MinValue float64 `json:"min"` MaxValue float64 `json:"max"` Quantity string `json:"quantity"` UpdateType int `json:"updatetype"` // 0 = pass thru, 1 = interval, 2 = integrating deadband, 3 = disabled Interval int `json:"interval"` IntegratingDeadband float64 `json:"integratingdeadband"` Alias string `json:"alias"` }
type Emitter ¶
type Emitter struct { gorm.Model Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` Settings string `json:"settings"` Instance IEmitter `json:"instance" gorm:"-"` Count uint64 `json:"count"` LastRun time.Time `json:"lastrun"` Status int `json:"status"` // 0 = stopped, 1 = running }
type EmitterStatistics ¶
type EmitterStatistics struct {
TotalCount uint64 `json:"totalcount"`
}
type IEmitter ¶
type IEmitter interface { InitEmitter() error ProcessMessage(msg *DataPoint) ProcessMeta(msg *DataPointMeta) GetStats() *EmitterStatistics }
type KeyValuePair ¶
type ListenerStatistics ¶
type ListenerStatistics struct {
TotalCount uint64 `json:"totalcount"`
}
type Meta ¶
type Meta struct { TagId int `json:"tag_id"` Name string `json:"name"` Description string `json:"description"` Location string `json:"location"` Type string `json:"type"` Unit string `json:"unit"` Min float64 `json:"min"` Max float64 `json:"max"` }
Imported meta data
type User ¶
type User struct { gorm.Model UserName string `form:"email" json:"email" binding:"required"` Password string `form:"password" json:"password"` FullName string `form:"fullname" json:"fullname" binding:"required"` Settings Settings `json:"settings"` SettingsID uint `json:"settingsid"` }
User
type UserCredentials ¶
type UserPasswordUpdate ¶
type VolatileDataPoint ¶
type VolatileDataPoint struct { DataPoint *DataPoint `json:"datapoint"` DataPointMeta DataPointMeta `json:"datapointmeta"` StoredValue float64 `json:"storedvalue"` // only used for the integrating deadband (floating data points) Integrator float64 `json:"integrator"` Threshold float64 `json:"threshold"` LastEmitted time.Time `json:"lastemitted"` }
Click to show internal directories.
Click to hide internal directories.