Documentation ¶
Index ¶
- func NewRouter(s service) *router.Router
- type Controller
- func (c *Controller) GetDevice(ctx context.Context, body *deviceregistrydef.GetDeviceRequest) (*deviceregistrydef.GetDeviceResponse, error)
- func (c *Controller) GetRoom(ctx context.Context, body *deviceregistrydef.GetRoomRequest) (*deviceregistrydef.GetRoomResponse, error)
- func (c *Controller) ListDevices(ctx context.Context, body *deviceregistrydef.ListDevicesRequest) (*deviceregistrydef.ListDevicesResponse, error)
- func (c *Controller) ListRooms(ctx context.Context, body *deviceregistrydef.ListRoomsRequest) (*deviceregistrydef.ListRoomsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct { DeviceRepository *repository.DeviceRepository RoomRepository *repository.RoomRepository }
Controller handles requests
func (*Controller) GetDevice ¶
func (c *Controller) GetDevice(ctx context.Context, body *deviceregistrydef.GetDeviceRequest) (*deviceregistrydef.GetDeviceResponse, error)
GetDevice returns a specific device by ID
func (*Controller) GetRoom ¶
func (c *Controller) GetRoom(ctx context.Context, body *deviceregistrydef.GetRoomRequest) (*deviceregistrydef.GetRoomResponse, error)
GetRoom returns a specific room by ID, including its devices.
func (*Controller) ListDevices ¶
func (c *Controller) ListDevices(ctx context.Context, body *deviceregistrydef.ListDevicesRequest) (*deviceregistrydef.ListDevicesResponse, error)
ListDevices lists all devices known by the registry. Results can be filtered by controller name.
func (*Controller) ListRooms ¶
func (c *Controller) ListRooms(ctx context.Context, body *deviceregistrydef.ListRoomsRequest) (*deviceregistrydef.ListRoomsResponse, error)
ListRooms returns all rooms known by the registry
Click to show internal directories.
Click to hide internal directories.