Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrETagDoesntMatch = errors.New("ETag does not match") ErrTooManyAttributes = errors.New("the number of attributes in the scope is above the limit") )
Functions ¶
This section is empty.
Types ¶
type InventoryApp ¶
type InventoryApp interface { WithReporting(c workflows.Client) InventoryApp HealthCheck(ctx context.Context) error ListDevices(ctx context.Context, q store.ListQuery) ([]model.Device, int, error) GetDevice(ctx context.Context, id model.DeviceID) (*model.Device, error) AddDevice(ctx context.Context, d *model.Device) error UpsertAttributes(ctx context.Context, id model.DeviceID, attrs model.DeviceAttributes) error UpsertAttributesWithUpdated( ctx context.Context, id model.DeviceID, attrs model.DeviceAttributes, scope string, etag string, ) error UpsertDevicesStatuses( ctx context.Context, devices []model.DeviceUpdate, attrs model.DeviceAttributes, ) (*model.UpdateResult, error) ReplaceAttributes( ctx context.Context, id model.DeviceID, upsertAttrs model.DeviceAttributes, scope string, etag string, ) error GetFiltersAttributes(ctx context.Context) ([]model.FilterAttribute, error) DeleteGroup(ctx context.Context, groupName model.GroupName) (*model.UpdateResult, error) UnsetDeviceGroup(ctx context.Context, id model.DeviceID, groupName model.GroupName) error UnsetDevicesGroup( ctx context.Context, deviceIDs []model.DeviceID, groupName model.GroupName, ) (*model.UpdateResult, error) UpdateDeviceGroup(ctx context.Context, id model.DeviceID, group model.GroupName) error UpdateDevicesGroup( ctx context.Context, ids []model.DeviceID, group model.GroupName, ) (*model.UpdateResult, error) ListGroups(ctx context.Context, filters []model.FilterPredicate) ([]model.GroupName, error) ListDevicesByGroup( ctx context.Context, group model.GroupName, skip int, limit int, ) ([]model.DeviceID, int, error) GetDeviceGroup(ctx context.Context, id model.DeviceID) (model.GroupName, error) DeleteDevice(ctx context.Context, id model.DeviceID) error DeleteDevices( ctx context.Context, ids []model.DeviceID, ) (*model.UpdateResult, error) CreateTenant(ctx context.Context, tenant model.NewTenant) error SearchDevices(ctx context.Context, searchParams model.SearchParams) ([]model.Device, int, error) CheckAlerts(ctx context.Context, deviceId string) (int, error) WithLimits(attributes, tags int) InventoryApp WithDevicemonitor(client devicemonitor.Client) InventoryApp }
this inventory service interface
func NewInventory ¶
func NewInventory(d store.DataStore) InventoryApp
Click to show internal directories.
Click to hide internal directories.