Documentation
¶
Index ¶
Constants ¶
View Source
const ( PropTypeFloat = "float" PropTypeBool = "bool" PropTypeString = "string" )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
ID string `json:"id"`
Name string `json:"name"`
Group string `json:"group"`
Description string `json:"description"`
Condition string `json:"condition"`
Determined bool `json:"determined"` // Whether the context state is determined
Matching bool `json:"matching"`
Timestamp int64 `json:"timestamp"`
Entries []interface{} `json:"entries"`
}
Context describes a context (primary or secondary)
type ContextTemplate ¶
type ContextTemplate struct {
Name string `json:"name"`
Description string `json:"description"`
Condition string `json:"condition"`
}
ContextTemplate is used to configure the context component
type Property ¶
type Property struct {
ID string `json:"id"`
Name string `json:"name"`
Group string `json:"group"`
Timestamp *int64 `json:"t,omitempty"`
Value *float64 `json:"v,omitempty"`
BoolValue *bool `json:"bv,omitempty"`
StringValue *string `json:"sv,omitempty"`
}
Property describes a context property
type PropertyTemplate ¶
type PropertyTemplate struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Group string `json:"group"`
Template string `json:"template"`
}
PropertyTemplate is used to configure *-property components
func (*PropertyTemplate) Fill ¶
func (pt *PropertyTemplate) Fill(data interface{}) (*Property, error)
Fill fills the template with provided data and returns the resulting property
Click to show internal directories.
Click to hide internal directories.