Documentation ¶
Index ¶
- type Store
- func (db *Store) DeviceEnroll(d datastore.DeviceEnrollRequest) (*domain.Enrollment, error)
- func (db *Store) DeviceGet(brand, model, serial string) (*domain.Enrollment, error)
- func (db *Store) DeviceGetByID(deviceID string) (*domain.Enrollment, error)
- func (db *Store) DeviceList(orgID string) ([]domain.Enrollment, error)
- func (db *Store) DeviceNew(d datastore.DeviceNewRequest) (string, error)
- func (db *Store) DeviceUpdate(deviceID string, status domain.Status, deviceData string) error
- func (db *Store) OrganizationGet(orgID string) (*domain.Organization, error)
- func (db *Store) OrganizationGetByName(name string) (*domain.Organization, error)
- func (db *Store) OrganizationList() ([]domain.Organization, error)
- func (db *Store) OrganizationNew(org datastore.OrganizationNewRequest) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store implements a PostgreSQL data store
func (*Store) DeviceEnroll ¶
func (db *Store) DeviceEnroll(d datastore.DeviceEnrollRequest) (*domain.Enrollment, error)
DeviceEnroll enrolls a device with the IoT service
func (*Store) DeviceGet ¶
func (db *Store) DeviceGet(brand, model, serial string) (*domain.Enrollment, error)
DeviceGet fetches a device registration
func (*Store) DeviceGetByID ¶
func (db *Store) DeviceGetByID(deviceID string) (*domain.Enrollment, error)
DeviceGetByID fetches a device registration
func (*Store) DeviceList ¶
func (db *Store) DeviceList(orgID string) ([]domain.Enrollment, error)
DeviceList fetches the device registrations for an organization
func (*Store) DeviceNew ¶
func (db *Store) DeviceNew(d datastore.DeviceNewRequest) (string, error)
DeviceNew creates a new device registration
func (*Store) DeviceUpdate ¶
DeviceUpdate updates a device registration
func (*Store) OrganizationGet ¶
func (db *Store) OrganizationGet(orgID string) (*domain.Organization, error)
OrganizationGet fetches an organization by ID
func (*Store) OrganizationGetByName ¶
func (db *Store) OrganizationGetByName(name string) (*domain.Organization, error)
OrganizationGetByName fetches an organization by name
func (*Store) OrganizationList ¶
func (db *Store) OrganizationList() ([]domain.Organization, error)
OrganizationList fetches existing organizations
func (*Store) OrganizationNew ¶
func (db *Store) OrganizationNew(org datastore.OrganizationNewRequest) (string, error)
OrganizationNew creates a new organization
Click to show internal directories.
Click to hide internal directories.