Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore interface { Ping(ctx context.Context) error Close() error GetIntegrations(context.Context, model.IntegrationFilter) ([]model.Integration, error) GetIntegrationById(context.Context, uuid.UUID) (*model.Integration, error) CreateIntegration(context.Context, model.Integration) (*model.Integration, error) GetDevice(ctx context.Context, deviceID string) (*model.Device, error) GetDeviceByIntegrationID( ctx context.Context, deviceID string, integrationID uuid.UUID, ) (*model.Device, error) DoDevicesExistByIntegrationID(context.Context, uuid.UUID) (bool, error) // RemoveDevicesFromIntegration integration with the given integrationID // from all devices belonging to the tenant within the context. RemoveDevicesFromIntegration( ctx context.Context, integrationID uuid.UUID, ) (deviceCount int64, err error) // UsertDeviceIntegrations adds the list of integration IDs to the // device and creates it if it does not exist. UpsertDeviceIntegrations( ctx context.Context, deviceID string, integrationIDs []uuid.UUID, ) (newDevice *model.Device, err error) DeleteDevice(ctx context.Context, deviceID string) error SetIntegrationCredentials(context.Context, uuid.UUID, model.Credentials) error RemoveIntegration(context.Context, uuid.UUID) error // GetAllDevices returns an iterator over ALL devices sorted by tenant ID. GetAllDevices(ctx context.Context) (Iterator, error) // GetEvents returns list of event objects GetEvents(ctx context.Context, fltr model.EventsFilter) ([]model.Event, error) // SaveEvent saves the event in the database SaveEvent(ctx context.Context, event model.Event) error }
DataStore interface for DataStore services
Click to show internal directories.
Click to hide internal directories.