Documentation ¶
Overview ¶
Copyright 2017 Northern.tech AS
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type Inventory
- func (i *Inventory) AddDevice(ctx context.Context, dev *model.Device) error
- func (i *Inventory) DeleteDevice(ctx context.Context, id model.DeviceID) error
- func (i *Inventory) GetDevice(ctx context.Context, id model.DeviceID) (*model.Device, error)
- func (i *Inventory) GetDeviceGroup(ctx context.Context, id model.DeviceID) (model.GroupName, error)
- func (i *Inventory) ListDevices(ctx context.Context, skip int, limit int, filters []store.Filter, ...) ([]model.Device, error)
- func (i *Inventory) ListDevicesByGroup(ctx context.Context, group model.GroupName, skip, limit int) ([]model.DeviceID, error)
- func (i *Inventory) ListGroups(ctx context.Context) ([]model.GroupName, error)
- func (i *Inventory) UnsetDeviceGroup(ctx context.Context, id model.DeviceID, groupName model.GroupName) error
- func (i *Inventory) UpdateDeviceGroup(ctx context.Context, devid model.DeviceID, group model.GroupName) error
- func (i *Inventory) UpsertAttributes(ctx context.Context, id model.DeviceID, attrs model.DeviceAttributes) error
- type InventoryApp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
func NewInventory ¶
func (*Inventory) DeleteDevice ¶
func (*Inventory) GetDeviceGroup ¶
func (*Inventory) ListDevices ¶
func (*Inventory) ListDevicesByGroup ¶
func (*Inventory) ListGroups ¶
func (*Inventory) UnsetDeviceGroup ¶
func (*Inventory) UpdateDeviceGroup ¶
func (*Inventory) UpsertAttributes ¶
type InventoryApp ¶
type InventoryApp interface { ListDevices(ctx context.Context, skip int, limit int, filters []store.Filter, sort *store.Sort, hasGroup *bool) ([]model.Device, 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 UnsetDeviceGroup(ctx context.Context, id model.DeviceID, groupName model.GroupName) error UpdateDeviceGroup(ctx context.Context, id model.DeviceID, group model.GroupName) error ListGroups(ctx context.Context) ([]model.GroupName, error) ListDevicesByGroup(ctx context.Context, group model.GroupName, skip int, limit int) ([]model.DeviceID, error) GetDeviceGroup(ctx context.Context, id model.DeviceID) (model.GroupName, error) DeleteDevice(ctx context.Context, id model.DeviceID) error }
this inventory service interface
Click to show internal directories.
Click to hide internal directories.