usecase

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSensorInputDTO

type CreateSensorInputDTO struct {
	Name      string                  `json:"name"`
	Latitude  float64                 `json:"latitude"`
	Longitude float64                 `json:"longitude"`
	Params    map[string]entity.Param `json:"params"`
}

type CreateSensorOutputDTO

type CreateSensorOutputDTO struct {
	Id        primitive.ObjectID      `json:"id"`
	Name      string                  `json:"name"`
	Latitude  float64                 `json:"latitude"`
	Longitude float64                 `json:"longitude"`
	Params    map[string]entity.Param `json:"params"`
}

type CreateSensorUseCase

type CreateSensorUseCase struct {
	SensorRepository entity.SensorRepository
}

func NewCreateSensorUseCase

func NewCreateSensorUseCase(sensorRepository entity.SensorRepository) *CreateSensorUseCase

func (*CreateSensorUseCase) Execute

type EmitDataInputDTO

type EmitDataInputDTO struct {
	Id primitive.ObjectID `json:"id"`
}

type EmitDataOutputDTO

type EmitDataOutputDTO struct {
	Id        primitive.ObjectID     `json:"id"`
	Name      string                 `json:"name"`
	Latitude  float64                `json:"latitude"`
	Longitude float64                `json:"longitude"`
	Data      map[string]interface{} `json:"data"`
}

type EmitDataUseCase

type EmitDataUseCase struct {
	EmitData         events.EventInterface
	SensorRepository entity.SensorRepository
	EventDispatcher  events.EventDispatcherInterface
}

func NewEmitDataUseCase

func NewEmitDataUseCase(
	emitData events.EventInterface,
	sensorRepository entity.SensorRepository,
	eventDispatcher events.EventDispatcherInterface,
) *EmitDataUseCase

func (*EmitDataUseCase) Execute

func (e *EmitDataUseCase) Execute(ctx context.Context, input EmitDataInputDTO) error

type FindAllSensorsOutputDTO

type FindAllSensorsOutputDTO struct {
	Id        primitive.ObjectID      `json:"id"`
	Name      string                  `json:"name"`
	Latitude  float64                 `json:"latitude"`
	Longitude float64                 `json:"longitude"`
	Params    map[string]entity.Param `json:"params"`
}

type FindAllSensorsUseCase

type FindAllSensorsUseCase struct {
	SensorRepository entity.SensorRepository
}

func NewFindAllSensorsUseCase

func NewFindAllSensorsUseCase(sensorRepository entity.SensorRepository) *FindAllSensorsUseCase

func (*FindAllSensorsUseCase) Execute

Jump to

Keyboard shortcuts

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