Documentation ¶
Index ¶
Constants ¶
View Source
const ( SpaceContext string = "https://dev.realestatecore.io/contexts/Space.jsonld" SpaceType string = "dtmi:org:w3id:rec:Space;1" SpaceTypeName string = "space" BuildingContext string = "https://dev.realestatecore.io/contexts/Building.jsonld" BuildingType string = "dtmi:org:w3id:rec:Building;1" BuildingTypeName string = "building" SensorContext string = "https://dev.realestatecore.io/contexts/Sensor.jsonld" SensorType string = "dtmi:org:brickschema:schema:Brick:Sensor;1" SensorTypeName string = "sensor" ObservationEventContext string = "https://dev.realestatecore.io/contexts/ObservationEvent.jsonld" ObservationEventType string = "dtmi:org:w3id:rec:ObservationEvent;1" ObservationEventTypeName string = "observationevent" )
Variables ¶
This section is empty.
Functions ¶
func GetTypeFromTypeName ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func LoadConfiguration ¶
type Database ¶
type Database interface { Init(ctx context.Context) error Seed(ctx context.Context, reader io.Reader) error AddEntity(ctx context.Context, e Entity) error GetEntity(ctx context.Context, entityID, entityType string) (Entity, error) GetEntities(ctx context.Context, entityType string, page, size int) (int64, []Entity, error) GetChildEntities(ctx context.Context, root Entity, entityType string) ([]Entity, error) AddObservation(ctx context.Context, so SensorObservation) error GetObservations(ctx context.Context, sensorId string, starting, ending time.Time, page, size int) (int64, []Observation, error) }
type Observation ¶
type SensorObservation ¶
type SensorObservation struct { Format string `json:"format"` DeviceID string `json:"deviceId"` Observations []Observation `json:"observations"` }
Click to show internal directories.
Click to hide internal directories.