Documentation
¶
Index ¶
- type Store
- func (s *Store) Close()
- func (s *Store) DB() *pgxpool.Pool
- func (s *Store) GetLatestSensorDataBySensorID(ctx context.Context, id string) (*entities.SensorData, error)
- func (s *Store) HandleError(err error) error
- func (s *Store) MapClusterFields(ctx context.Context, tc *entities.TreeCluster) error
- func (s *Store) MapSensorFields(ctx context.Context, sn *entities.Sensor) error
- func (s *Store) WithTx(ctx context.Context, fn func(*Store) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
func (*Store) GetLatestSensorDataBySensorID ¶ added in v1.1.0
func (s *Store) GetLatestSensorDataBySensorID(ctx context.Context, id string) (*entities.SensorData, error)
This function provides the latest data from a specific sensor
func (*Store) HandleError ¶
TODO: Improve error handling
func (*Store) MapClusterFields ¶ added in v1.1.0
This function is required as soon as you want to add data to the tree cluster object from the database, e.g. the linked region or the linked trees. As this function is required in different repositories, it has been outsourced.
func (*Store) MapSensorFields ¶ added in v1.1.0
This function is required as soon as you want to add the data to the sensor object
Click to show internal directories.
Click to hide internal directories.