Documentation ¶
Index ¶
- type Service
- func (s *Service) GetConfig(id string) (interface{}, error)
- func (s *Service) GetDevice(deviceID string) (shipyard.Device, error)
- func (s *Service) GetDeviceTemplate(id string) (shipyard.DeviceTemplate, error)
- func (s *Service) GetRoom(roomID string) (shipyard.Room, error)
- func (s *Service) GetRoomDevices(roomID string) ([]shipyard.Device, error)
- func (s *Service) GetUIConfig(roomID string) (shipyard.UIConfig, error)
- func (s *Service) ListAllRooms() ([]string, error)
- func (s *Service) ListDeviceTemplates() ([]string, error)
- func (s *Service) ListRoomDevices(roomID string) ([]string, error)
- func (s *Service) SaveControlDoc(doc shipyard.RoomControlDoc) error
- func (s *Service) SaveDevice(dev shipyard.Device) error
- func (s *Service) SaveRoom(r shipyard.Room) error
- func (s *Service) SaveUIConfig(config shipyard.UIConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
New takes an address, username, and password for the desired couchdb and returns a new service backed by that datastore
func (*Service) GetDeviceTemplate ¶
func (s *Service) GetDeviceTemplate(id string) (shipyard.DeviceTemplate, error)
GetDeviceTemplate returns the requested device template from couch
func (*Service) GetRoomDevices ¶
func (*Service) GetUIConfig ¶
func (*Service) ListAllRooms ¶
ListAllRooms returns a list of all the rooms that exist
func (*Service) ListDeviceTemplates ¶
ListDeviceTemplates lists the ids of all the templates currently found in couch
func (*Service) ListRoomDevices ¶
func (*Service) SaveControlDoc ¶
func (s *Service) SaveControlDoc(doc shipyard.RoomControlDoc) error
Click to show internal directories.
Click to hide internal directories.