Documentation
¶
Index ¶
- func InitHandler(c *gin.Context)
- func PinHandler(c *gin.Context)
- type AdminHandler
- type Esp32DeviceHandler
- func (h *Esp32DeviceHandler) CreateEsp32Device(c *gin.Context)
- func (h *Esp32DeviceHandler) DeleteEsp32Device(c *gin.Context)
- func (h *Esp32DeviceHandler) GetEsp32Device(c *gin.Context)
- func (h *Esp32DeviceHandler) ListEsp32Devices(c *gin.Context)
- func (h *Esp32DeviceHandler) UpdateEsp32Device(c *gin.Context)
- type ParkingLotHandler
- func (h *ParkingLotHandler) CreateParkingLot(c *gin.Context)
- func (h *ParkingLotHandler) DeleteParkingLot(c *gin.Context)
- func (h *ParkingLotHandler) GetParkingLot(c *gin.Context)
- func (h *ParkingLotHandler) ListParkingLots(c *gin.Context)
- func (h *ParkingLotHandler) UpdateParkingLot(c *gin.Context)
- type RegisterUserInput
- type SensorHandler
- func (h *SensorHandler) CreateSensor(c *gin.Context)
- func (h *SensorHandler) DeleteSensor(c *gin.Context)
- func (h *SensorHandler) GetSensor(c *gin.Context)
- func (h *SensorHandler) ListSensors(c *gin.Context)
- func (h *SensorHandler) NotifyChange(event string, details gin.H)
- func (h *SensorHandler) UpdateSensor(c *gin.Context)
- type UpdateUserInput
- type UserHandler
- type WebSocketHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitHandler ¶
func PinHandler ¶
Types ¶
type AdminHandler ¶
type AdminHandler struct {
AdminUseCase usecase.IAdminUseCase
}
func NewAdminHandler ¶
func NewAdminHandler(adminUseCase usecase.IAdminUseCase) *AdminHandler
func (*AdminHandler) CompleteAdminProfile ¶
func (h *AdminHandler) CompleteAdminProfile(c *gin.Context)
func (*AdminHandler) GetAdminProfile ¶
func (h *AdminHandler) GetAdminProfile(c *gin.Context)
func (*AdminHandler) GetParkingLotsByAdmin ¶
func (h *AdminHandler) GetParkingLotsByAdmin(c *gin.Context)
func (*AdminHandler) RegisterAdmin ¶
func (h *AdminHandler) RegisterAdmin(c *gin.Context)
type Esp32DeviceHandler ¶
type Esp32DeviceHandler struct {
Esp32DeviceUseCase usecase.IEsp32DeviceUseCase
}
func NewEsp32DeviceHandler ¶
func NewEsp32DeviceHandler(esp32DeviceUseCase usecase.IEsp32DeviceUseCase) *Esp32DeviceHandler
func (*Esp32DeviceHandler) CreateEsp32Device ¶
func (h *Esp32DeviceHandler) CreateEsp32Device(c *gin.Context)
func (*Esp32DeviceHandler) DeleteEsp32Device ¶
func (h *Esp32DeviceHandler) DeleteEsp32Device(c *gin.Context)
func (*Esp32DeviceHandler) GetEsp32Device ¶
func (h *Esp32DeviceHandler) GetEsp32Device(c *gin.Context)
func (*Esp32DeviceHandler) ListEsp32Devices ¶
func (h *Esp32DeviceHandler) ListEsp32Devices(c *gin.Context)
func (*Esp32DeviceHandler) UpdateEsp32Device ¶
func (h *Esp32DeviceHandler) UpdateEsp32Device(c *gin.Context)
type ParkingLotHandler ¶
type ParkingLotHandler struct {
// contains filtered or unexported fields
}
func NewParkingLotHandler ¶
func NewParkingLotHandler(useCase usecase.IParkingLotUseCase, wsHub *hub.WebSocketHub) *ParkingLotHandler
func (*ParkingLotHandler) CreateParkingLot ¶
func (h *ParkingLotHandler) CreateParkingLot(c *gin.Context)
func (*ParkingLotHandler) DeleteParkingLot ¶
func (h *ParkingLotHandler) DeleteParkingLot(c *gin.Context)
func (*ParkingLotHandler) GetParkingLot ¶
func (h *ParkingLotHandler) GetParkingLot(c *gin.Context)
func (*ParkingLotHandler) ListParkingLots ¶
func (h *ParkingLotHandler) ListParkingLots(c *gin.Context)
func (*ParkingLotHandler) UpdateParkingLot ¶
func (h *ParkingLotHandler) UpdateParkingLot(c *gin.Context)
type RegisterUserInput ¶
type SensorHandler ¶
type SensorHandler struct {
SensorUseCase usecase.ISensorUseCase
WebSocketHub *hub.WebSocketHub
}
SensorHandler manages sensor operations and WebSocket notifications
func NewSensorHandler ¶
func NewSensorHandler(sensorUseCase usecase.ISensorUseCase, wsHub *hub.WebSocketHub) *SensorHandler
NewSensorHandler creates a new instance of SensorHandler
func (*SensorHandler) CreateSensor ¶
func (h *SensorHandler) CreateSensor(c *gin.Context)
CreateSensor creates a new sensor and notifies clients
func (*SensorHandler) DeleteSensor ¶
func (h *SensorHandler) DeleteSensor(c *gin.Context)
DeleteSensor deletes a sensor and notifies clients
func (*SensorHandler) GetSensor ¶
func (h *SensorHandler) GetSensor(c *gin.Context)
GetSensor retrieves a specific sensor by ID
func (*SensorHandler) ListSensors ¶
func (h *SensorHandler) ListSensors(c *gin.Context)
ListSensors lists all sensors for a specific parking lot
func (*SensorHandler) NotifyChange ¶
func (h *SensorHandler) NotifyChange(event string, details gin.H)
NotifyChange sends a unified notification about sensor-related changes
func (*SensorHandler) UpdateSensor ¶
func (h *SensorHandler) UpdateSensor(c *gin.Context)
UpdateSensor updates a sensor and notifies clients
type UpdateUserInput ¶
type UserHandler ¶
type UserHandler struct {
UserUseCase usecase.IUserUseCase
}
func NewUserHandler ¶
func NewUserHandler(userUsecase usecase.IUserUseCase) *UserHandler
func (*UserHandler) DeleteUser ¶
func (h *UserHandler) DeleteUser(c *gin.Context)
Handler para eliminar un usuario
func (*UserHandler) GetUserByID ¶
func (h *UserHandler) GetUserByID(c *gin.Context)
Handler para obtener un usuario por ID
func (*UserHandler) Register ¶
func (h *UserHandler) Register(c *gin.Context)
func (*UserHandler) UpdateUser ¶
func (h *UserHandler) UpdateUser(c *gin.Context)
Handler para actualizar un usuario
type WebSocketHandler ¶
type WebSocketHandler struct {
// contains filtered or unexported fields
}
WebSocketHandler encapsula la lógica de WebSocket y dependencias
func NewWebSocketHandler ¶
func NewWebSocketHandler(hub *hub.WebSocketHub) *WebSocketHandler
NewWebSocketHandler inicializa una nueva instancia de WebSocketHandler
func (*WebSocketHandler) HandleConnection ¶
func (wsh *WebSocketHandler) HandleConnection(c *gin.Context)
HandleConnection maneja el ciclo de vida de la conexión WebSocket