repository

package
v0.0.0-...-eb599cc Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

Find returns a device by ID

func (*DeviceRepository) FindAll

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

Find returns a room by ID

func (*RoomRepository) FindAll

func (r *RoomRepository) FindAll() ([]*deviceregistrydef.Room, error)

FindAll returns all rooms

Jump to

Keyboard shortcuts

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