sensor

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSensorService

func NewSensorService(
	sensorRepo storage.SensorRepository,
	treeRepo storage.TreeRepository,
	eventManager *worker.EventManager,
) service.SensorService

Types

type SensorService

type SensorService struct {
	// contains filtered or unexported fields
}

func (*SensorService) Create

func (*SensorService) Delete

func (s *SensorService) Delete(ctx context.Context, id string) error

func (*SensorService) GetAll

func (s *SensorService) GetAll(ctx context.Context, query entities.Query) ([]*entities.Sensor, int64, error)

func (*SensorService) GetAllDataByID

func (s *SensorService) GetAllDataByID(ctx context.Context, id string) ([]*entities.SensorData, error)

func (*SensorService) GetByID

func (s *SensorService) GetByID(ctx context.Context, id string) (*entities.Sensor, error)

func (*SensorService) HandleMessage

func (s *SensorService) HandleMessage(ctx context.Context, payload *domain.MqttPayload) (*domain.SensorData, error)

func (*SensorService) MapSensorToTree

func (s *SensorService) MapSensorToTree(ctx context.Context, sen *entities.Sensor) error

func (*SensorService) Ready

func (s *SensorService) Ready() bool

func (*SensorService) Update

func (*SensorService) UpdateStatuses

func (s *SensorService) UpdateStatuses(ctx context.Context) error

Jump to

Keyboard shortcuts

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