Documentation ¶
Index ¶
- type DeviceRepository
- func (r *DeviceRepository) Find(id string) (*deviceregistrydef.DeviceHeader, error)
- func (r *DeviceRepository) FindAll() ([]*deviceregistrydef.DeviceHeader, error)
- func (r *DeviceRepository) FindByController(controllerName string) ([]*deviceregistrydef.DeviceHeader, error)
- func (r *DeviceRepository) FindByRoom(roomID string) ([]*deviceregistrydef.DeviceHeader, error)
- type RoomRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceRepository ¶
type DeviceRepository struct { // ConfigFilename is the path to the device config file ConfigFilename string // ReloadInterval is the amount of time to wait before reading from disk again ReloadInterval time.Duration // contains filtered or unexported fields }
DeviceRepository provides access to the underlying storage layer
func (*DeviceRepository) Find ¶
func (r *DeviceRepository) Find(id string) (*deviceregistrydef.DeviceHeader, error)
Find returns a device by ID
func (*DeviceRepository) FindAll ¶
func (r *DeviceRepository) FindAll() ([]*deviceregistrydef.DeviceHeader, error)
FindAll returns all devices
func (*DeviceRepository) FindByController ¶
func (r *DeviceRepository) FindByController(controllerName string) ([]*deviceregistrydef.DeviceHeader, error)
FindByController returns all devices with the given controller name
func (*DeviceRepository) FindByRoom ¶
func (r *DeviceRepository) FindByRoom(roomID string) ([]*deviceregistrydef.DeviceHeader, error)
FindByRoom returns all devices for the given room
type RoomRepository ¶
type RoomRepository struct { // ConfigFilename is the path to the room config file ConfigFilename string // ReloadInterval is the amount of time to wait before reading from disk again ReloadInterval time.Duration // contains filtered or unexported fields }
RoomRepository provides access to the underlying storage layer
func (*RoomRepository) Find ¶
func (r *RoomRepository) Find(id string) (*deviceregistrydef.Room, error)
Find returns a room by ID
func (*RoomRepository) FindAll ¶
func (r *RoomRepository) FindAll() ([]*deviceregistrydef.Room, error)
FindAll returns all rooms
Click to show internal directories.
Click to hide internal directories.