domain

package
v1.1.8284267019 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 GetAssetType(ref string) string

func NewRef added in v1.1.5739207196

func NewRef(prefix string) string

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 RandomWithPrefix(prefix string) (string, error)

func RandomWithoutPrefix added in v1.1.2973310622

func RandomWithoutPrefix() string

func Transform added in v1.1.6199860920

func Transform(telem *TelemetryMessage, transVal TransformerValue) error

func TransformDisplay added in v1.1.6326149439

func TransformDisplay(telemVal float64, strMap string) (string, error)

Types

type Asset added in v1.1.2974061736

type Asset struct {
	Id   int32  `json:"id,omitempty"`
	Ref  string `json:"ref,omitempty"`
	Url  string `json:"url,omitempty"`
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

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 Assets added in v1.1.2974061736

type Assets struct {
	Count  int32    `json:"count"`
	Assets []*Asset `json:"assets"`
}

type Audit added in v1.0.10

type Audit struct {
	CreatedBy struct {
		Name string `json:"name"`
	} `json:"createdBy"`
	DateCreated   int64 `json:"dateCreated"`
	LastUpdatedBy struct {
		Name string `json:"name"`
	} `json:"lastUpdatedBy"`
	LastUpdated int64 `json:"lastUpdated"`
}

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 ClimateZone struct {
	State          string `json:"state"`
	Zone           string `json:"zone"`
	Ba             string `json:"ba"`
	MoistureRegime string `json:"moistureRegime"`
}

type Conn added in v1.0.10

type Conn struct {
	Id      int    `json:"id,omitempty"`
	Ref     string `json:"ref,omitempty"`
	Enabled bool   `json:"enabled"`
	Name    string `json:"name,omitempty"`
	Type    string `json:"type"`
	Audit   *Audit `json:"audit,omitempty"`
}

type Conns added in v1.0.10

type Conns struct {
	Count int32   `json:"count"`
	Conns []*Conn `json:"conns"`
}

type CurVal added in v1.0.35

type CurVal struct {
	DisplayVal string `json:"displayValue"`
	Point      struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
		Unit string `json:"unit"`
	} `json:"point"`
	Read struct {
		Urid string  `json:"urid"`
		Ts   int     `json:"ts"`
		Val  float64 `json:"val"`
	} `json:"read"`
}

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 EquipCurVals struct {
	Equip struct {
		ID   int    `json:"id"`
		Ref  string `json:"ref"`
		Name string `json:"name"`
	} `json:"equip"`
	Reads []struct {
		Urid string      `json:"urid"`
		Ts   int         `json:"ts"`
		Val  float64     `json:"val"`
		Unit interface{} `json:"unit"`
	} `json:"reads"`
}

type EquipType added in v1.0.44

type EquipType struct {
	ID      int    `json:"id"`
	Code    string `json:"code"`
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

type EquipTypes added in v1.0.44

type EquipTypes struct {
	Count      int32       `json:"count"`
	EquipTypes []EquipType `json:"equipTypeList"`
}

type Equips added in v1.0.10

type Equips struct {
	Count  int32    `json:"count"`
	Equips []*Equip `json:"equips"`
}

type EventRule added in v1.0.73

type EventRule struct {
	Id       int    `json:"id,omitempty"`
	Ref      string `json:"ref,omitempty"`
	Enabled  bool   `json:"enabled"`
	Name     string `json:"name,omitempty"`
	RuleType string `json:"ruleType"`
	Audit    *Audit `json:"audit,omitempty"`
}

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 GeoCoding added in v1.0.39

type GeoCoding struct {
	Latitude  json.Number `json:"latitude"`
	Longitude json.Number `json:"longitude"`
	County    string      `json:"county"`
}

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 PasswordValidation struct {
	Validated bool    `json:"validated"`
	Err       []error `json:"errors"`
}

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 PointType added in v1.0.19

type PointType struct {
	Name string `json:"name,omitempty"`
	Id   int32  `json:"id"`
}

type PointTypes added in v1.1.8284267019

type PointTypes struct {
	Count  int32       `json:"count"`
	Points []PointType `json:"pointTypeList"`
}

type Points added in v1.0.10

type Points struct {
	Count  int32    `json:"count"`
	Points []*Point `json:"points"`
}

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 Profiles added in v1.0.8

type Profiles struct {
	Count    int32      `json:"count"`
	Profiles []*Profile `json:"profiles"`
}

type Ref added in v1.0.71

type Ref struct {
	Value string
}

func (*Ref) BeginsWith added in v1.0.71

func (r *Ref) BeginsWith(prefix string) bool

BeginsWith returns true if the current Ref HasPrefix of the provided value otherwise, false

func (*Ref) GetPrefix added in v1.0.71

func (r *Ref) GetPrefix() string

GetPrefix returns the all

func (Ref) String added in v1.0.71

func (r Ref) String() string

String returns the value

func (*Ref) Valid added in v1.0.71

func (r *Ref) Valid() bool

Valid returns true if the current Ref has a valid pattern

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 Sites added in v1.0.3

type Sites struct {
	Count int32   `json:"count"`
	Sites []*Site `json:"sites"`
}

type Tag added in v1.0.23

type Tag struct {
	Id    int    `json:"id,omitempty"`
	Ref   string `json:"ref,omitempty"`
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
	Audit *Audit `json:"audit"`
}

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 TagRefs added in v1.1.3027787179

type TagRefs struct {
	Count   int32     `json:"count"`
	TagRefs []*TagRef `json:"tagRefList"`
}

type TelemetryMessage added in v1.1.3315645950

type TelemetryMessage struct {
	Ts       int64
	DeviceId string
	// contains filtered or unexported fields
}

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

type TransformerValue struct {
	ValueType string
	PointRef  string
	Value     float64
}

type Urid added in v1.0.18

type Urid struct {
	Name string `json:"name,omitempty"`
	Id   int32  `json:"id,omitempty"`
}

type Urids added in v1.0.53

type Urids struct {
	Count int32   `json:"count"`
	Urids []*Urid `json:"pointUrids"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL