Documentation ¶
Index ¶
- Constants
- func GetAssetType(ref string) string
- func NewRef(prefix string) string
- func RandomWithPrefix(prefix string) (string, error)
- func RandomWithoutPrefix() string
- func Transform(telem *TelemetryMessage, transVal TransformerValue) error
- func TransformDisplay(telemVal float64, strMap string) (string, error)
- type Asset
- type AssetTree
- type Assets
- type Audit
- type AuditLog
- type Branch
- type ClimateZone
- type Conn
- type Conns
- type CurVal
- type Equip
- type EquipCurVals
- type EquipType
- type EquipTypes
- type Equips
- type EventRule
- type FormControl
- type FormControlList
- type FormControlRef
- type FormControlRefList
- type GeoCoding
- type HisRead
- type PasswordValidation
- type Point
- type PointType
- type PointTypes
- type Points
- type Profile
- type Profiles
- type Ref
- type Site
- type Sites
- type Tag
- type TagRef
- type TagRefs
- type TelemetryMessage
- type TransformerValue
- type Urid
- type Urids
Constants ¶
View Source
const ( PersonRefType = "c" PersonAssetType = "Person" EquipTypeRefType = "d" EquipTypeAssetType = "Equip Type" PersonFavoriteRefType = "f" PersonFavoriteAssetType = "Person Favorite" TextRefRefType = "h" TextRefAssetType = "Text Ref" IssueRefType = "ir" IssueAssetType = "Issue" RuleRefType = "l" RuleAssetType = "Rule" NotificationRefType = "m" NotificationAssetType = "Notification" PersonAssetTreeRefType = "n" PersonAssetTreeType = "Person Asset Tree" ReportRefType = "q" ReportAssetType = "Report" ProfileRefType = "r" ProfileAssetType = "Profile" EventSubscriptionRefType = "sub" EventSubscriptionType = "Event Subscription" TagRefType = "t" TagAssetType = "Tag" PointUridRefType = "u" PointUridAssetType = "Point Urid" BlobRefType = "v" BlobAssetType = "Blob" RoleGroupRefType = "w" RoleGroupAssetType = "Role Group" RoleGroupRoleRefType = "x" RoleGroupRoleAssetType = "Role Group Role" EquipTypeConfigRefType = "y" EquipTypeConfigAssetType = "Equip Type Config" EventRefType = "eh" EventAssetType = "Event" SiteRefType = "s" SiteAssetType = "Site" SiteTable = "site" EquipRefType = "e" EquipAssetType = "Equip" EquipTable = "equip" PointRefType = "p" PointAssetType = "Point" PointTable = "point" BranchRefType = "branch" BranchAssetType = "Branch" BranchTable = "asset_tree_branch" TagRefRefType = "g" TagRefAssetType = "Tag Ref" TagRefTable = "tag_ref" FormControlRefType = "j" FormControlAssetType = "Form Control" FormControlTable = "form_control" DashboardRefType = "a" DashboardAssetType = "Dashboard" FormControlRefRefType = "k" FormControlRefAssetType = "Form Control Ref" )
Variables ¶
This section is empty.
Functions ¶
func GetAssetType ¶ added in v1.1.7090713249
func NewRef ¶ added in v1.1.5739207196
NewRef generates a new reference string with the given prefix. The prefix is truncated to a length of defaultPrefixMaxLength runes if it is longer. The remaining reference string is generated using the RandomWithPrefix function.
func RandomWithPrefix ¶ added in v1.1.2973310622
func RandomWithoutPrefix ¶ added in v1.1.2973310622
func RandomWithoutPrefix() string
func Transform ¶ added in v1.1.6199860920
func Transform(telem *TelemetryMessage, transVal TransformerValue) error
Types ¶
type AssetTree ¶ added in v1.0.36
type AssetTree struct { AssetTreeMeta struct { Size int `json:"size"` Partial bool `json:"partial"` } `json:"assetTreeMeta"` AssetTree []struct { TargetRef string `json:"targetRef"` Hidden bool `json:"hidden"` HasChildren bool `json:"hasChildren"` Icon string `json:"icon"` Type string `json:"type"` URL string `json:"url"` ParentID int `json:"parentId"` Path string `json:"path"` Ref string `json:"ref"` Depth int `json:"depth"` ViewName string `json:"viewName"` Children []interface{} `json:"children"` Name string `json:"name"` TypeID int `json:"typeId"` ID int `json:"id"` TotalChildren int `json:"totalChildren"` NamedPath string `json:"namedPath"` } `json:"assetTree"` }
type AuditLog ¶ added in v1.1.5954711553
type AuditLog struct { DateCreated time.Time `json:"dateCreated"` LastUpdated time.Time `json:"lastUpdated"` TargetRef string `json:"targetRef"` Actor string `json:"actor"` URI string `json:"uri"` ClassName string `json:"className"` PersistedObjectId string `json:"persistedObjectId"` PersistedObjectVersion int64 `json:"persistedObjectVersion"` EventName string `json:"eventName"` PropertyName string `json:"propertyName"` OldValue string `json:"oldValue"` NewValue string `json:"newValue"` }
type Branch ¶ added in v1.0.36
type Branch struct { ID int `json:"id"` Name string `json:"name"` Version int `json:"version"` Ref string `json:"ref"` Enabled bool `json:"enabled"` Description string `json:"description"` Links struct { Type string `json:"type"` Self string `json:"self"` } `json:"links"` Type string `json:"type"` TypeID int `json:"typeId"` Parent struct { ID interface{} `json:"id"` } `json:"parent"` Icon string `json:"icon"` Path string `json:"path"` Depth int `json:"depth"` URL string `json:"url"` ViewName string `json:"viewName"` TargetRef string `json:"targetRef"` NamedPath string `json:"namedPath"` Hidden bool `json:"hidden"` Audit *Audit `json:"audit,omitempty"` }
type ClimateZone ¶ added in v1.0.39
type Equip ¶
type Equip struct { Id int32 `json:"id,omitempty"` Ref string `json:"ref,omitempty"` Name string `json:"name,omitempty"` Points []*Point `json:"points,omitempty"` Site *Site `json:"site,omitempty"` RemoteRef string `json:"remoteRef,omitempty"` EquipType *EquipType `json:"equipType,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` Enabled bool `json:"enabled,omitempty"` Description string `json:"description,omitempty"` Conn *Conn `json:"conn,omitempty"` Audit *Audit `json:"audit,omitempty"` }
type EquipCurVals ¶ added in v1.0.37
type EquipTypes ¶ added in v1.0.44
type FormControl ¶ added in v1.1.3039586334
type FormControl struct { Id int64 `json:"id,omitempty"` Ref string `json:"ref" validate:"required"` Name string `json:"name" validate:"required"` Enabled bool `json:"enabled,omitempty"` Description string `json:"description,omitempty"` Control string `json:"control" validate:"required"` ControlJSON struct { Key string `json:"key"` Type string `json:"type"` TemplateOptions struct { Label string `json:"label"` Placeholder string `json:"placeholder"` Required bool `json:"required"` } `json:"templateOptions,omitempty"` } `json:"-,omitempty"` Version int64 `json:"version,omitempty"` Audit *Audit `json:"audit,omitempty"` Links struct { Type string `json:"type"` Self string `json:"self"` } `json:"links,omitempty"` }
func (*FormControl) Validate ¶ added in v1.1.5753949227
func (o *FormControl) Validate() error
type FormControlList ¶ added in v1.1.3039586334
type FormControlList struct { Count int32 `json:"count"` FormControlList []*FormControl `json:"formControlList"` }
type FormControlRef ¶ added in v1.1.3039586334
type FormControlRef struct { Id int64 `json:"id,omitempty"` TargetRef string `json:"targetRef" validate:"required"` SortOrder int32 `json:"sortOrder" validate:"required"` Description string `json:"description" validate:"required"` Name string `json:"name" validate:"required"` Key string `json:"key" validate:"required"` Value string `json:"value" validate:"required"` FormControlId int64 `json:"formControlId" validate:"required"` FormControl FormControl `json:"formControl,omitempty"` Audit *Audit `json:"audit,omitempty"` Ref string `json:"ref,omitempty"` Version int64 `json:"version,omitempty"` }
func NewFormControlRef ¶ added in v1.1.5739207196
func NewFormControlRef() *FormControlRef
func (*FormControlRef) BuildFormControlRefForCreate ¶ added in v1.1.5798900959
func (o *FormControlRef) BuildFormControlRefForCreate(formControl FormControl, ref string, value string) error
func (*FormControlRef) ValidateStringParams ¶ added in v1.1.5798900959
func (o *FormControlRef) ValidateStringParams(paramName string, errString string) error
type FormControlRefList ¶ added in v1.1.3039586334
type FormControlRefList struct { Count int32 `json:"count"` FormControlRefList []*FormControlRef `json:"formControlList"` }
type HisRead ¶ added in v1.0.35
type HisRead struct { Point struct { ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` Unit string `json:"unit"` } `json:"member"` Start int `json:"start"` End int `json:"end"` Size int `json:"size"` Limit int `json:"limit"` Offset int `json:"offset"` Source string `json:"source"` DisplayVal string `json:"displayValue"` His []struct { Urid string `json:"urid"` Ts int `json:"ts"` Val float64 `json:"val"` } `json:"his"` }
type PasswordValidation ¶ added in v1.0.41
type Point ¶
type Point struct { Id int32 `json:"id,omitempty"` Ref string `json:"ref,omitempty"` Name string `json:"name"` Description string `json:"description,omitempty"` RemoteRef string `json:"remoteRef,omitempty"` Urid *Urid `json:"urid,omitempty"` PointType *PointType `json:"pointType,omitempty"` Unit string `json:"unit"` Enabled bool `json:"enabled"` Equip *Equip `json:"equip,omitempty"` Conn *Conn `json:"conn,omitempty"` Audit *Audit `json:"audit,omitempty"` }
type PointTypes ¶ added in v1.1.8284267019
type Profile ¶ added in v1.0.8
type Profile struct { Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Version int `json:"version"` Ref string `json:"ref"` Enabled bool `json:"enabled"` Description interface{} `json:"description,omitempty"` Links struct { Type string `json:"type"` Self string `json:"self"` } `json:"links"` Conn Conn `json:"conn"` Audit Audit `json:"audit"` }
type Ref ¶ added in v1.0.71
type Ref struct {
Value string
}
func (*Ref) BeginsWith ¶ added in v1.0.71
BeginsWith returns true if the current Ref HasPrefix of the provided value otherwise, false
type Site ¶
type Site struct { Name string `json:"name,omitempty"` Ref string `json:"ref,omitempty"` Id int32 `json:"id,omitempty"` Equips *[]Equip `json:"equips,omitempty"` Profile *Profile `json:"profile,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` Enabled bool `json:"enabled,omitempty"` Description string `json:"description,omitempty"` GeoCity string `json:"geoCity,omitempty"` GeoStateCode string `json:"geoStateCode,omitempty"` GeoAddress1 string `json:"geoAddress1,omitempty"` GeoAddress2 string `json:"geoAddress2,omitempty"` GeoPostalCode string `json:"geoPostalCode,omitempty"` Audit *Audit `json:"audit,omitempty"` Conn *Conn `json:"conn,omitempty"` }
type TagRef ¶ added in v1.1.3027747033
type TagRef struct { Id int `json:"id"` Name string `json:"name"` Version int `json:"version"` Ref string `json:"ref"` TargetRef string `json:"objectRef"` Enabled bool `json:"enabled"` Description interface{} `json:"description"` Links struct { Type string `json:"type"` Self string `json:"self"` } `json:"links,omitempty"` Value interface{} `json:"value"` Category interface{} `json:"category"` Tag Tag `json:"tag"` Audit *Audit `json:"audit,omitempty"` }
type TelemetryMessage ¶ added in v1.1.3315645950
func NewTelemetryMessage ¶ added in v1.1.3315645950
func NewTelemetryMessage(deviceId string) *TelemetryMessage
func (*TelemetryMessage) GetValue ¶ added in v1.1.3315645950
func (m *TelemetryMessage) GetValue(key string) float64
func (*TelemetryMessage) MarshalJSON ¶ added in v1.1.3315645950
func (m *TelemetryMessage) MarshalJSON() ([]byte, error)
func (*TelemetryMessage) SetValue ¶ added in v1.1.3315645950
func (m *TelemetryMessage) SetValue(key string, value float64)
type TransformerValue ¶ added in v1.1.6199860920
Source Files ¶
- asset.go
- asset_tree.go
- audit.go
- audit_log.go
- branch.go
- climate_zone.go
- conn.go
- cur_val.go
- equip.go
- equip_cur_vals.go
- equip_type.go
- event_rule.go
- form_control.go
- form_control_ref.go
- geo_coding.go
- his_read.go
- password-validation.go
- point.go
- point_type.go
- profile.go
- ref.go
- route.go
- site.go
- tag.go
- tag_ref.go
- telemetry-message.go
- transformer.go
- urid.go
Click to show internal directories.
Click to hide internal directories.