dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/interfaces/provisionwatcher.go (about) 1 // 2 // Copyright (C) 2021 IOTech Ltd 3 // 4 // SPDX-License-Identifier: Apache-2.0 5 6 package interfaces 7 8 import ( 9 "context" 10 11 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/common" 12 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/requests" 13 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/responses" 14 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/errors" 15 ) 16 17 // ProvisionWatcherClient defines the interface for interactions with the ProvisionWatcher endpoint on the EdgeX Foundry core-metadata service. 18 type ProvisionWatcherClient interface { 19 // Add adds a new provision watcher. 20 Add(ctx context.Context, reqs []requests.AddProvisionWatcherRequest) ([]common.BaseWithIdResponse, errors.EdgeX) 21 // Update updates provision watchers. 22 Update(ctx context.Context, reqs []requests.UpdateProvisionWatcherRequest) ([]common.BaseResponse, errors.EdgeX) 23 // AllProvisionWatchers returns all provision watchers. ProvisionWatchers can also be filtered by labels. 24 // The result can be limited in a certain range by specifying the offset and limit parameters. 25 // offset: The number of items to skip before starting to collect the result set. Default is 0. 26 // limit: The number of items to return. Specify -1 will return all remaining items after offset. The maximum will be the MaxResultCount as defined in the configuration of service. Default is 20. 27 AllProvisionWatchers(ctx context.Context, labels []string, offset int, limit int) (responses.MultiProvisionWatchersResponse, errors.EdgeX) 28 // ProvisionWatcherByName returns a provision watcher by name. 29 ProvisionWatcherByName(ctx context.Context, name string) (responses.ProvisionWatcherResponse, errors.EdgeX) 30 // DeleteProvisionWatcherByName deletes a provision watcher by name. 31 DeleteProvisionWatcherByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) 32 // ProvisionWatchersByProfileName returns provision watchers associated with the specified device profile name. 33 // The result can be limited in a certain range by specifying the offset and limit parameters. 34 // offset: The number of items to skip before starting to collect the result set. Default is 0. 35 // limit: The number of items to return. Specify -1 will return all remaining items after offset. The maximum will be the MaxResultCount as defined in the configuration of service. Default is 20. 36 ProvisionWatchersByProfileName(ctx context.Context, name string, offset int, limit int) (responses.MultiProvisionWatchersResponse, errors.EdgeX) 37 // ProvisionWatchersByServiceName returns provision watchers associated with the specified device service name. 38 // The result can be limited in a certain range by specifying the offset and limit parameters. 39 // offset: The number of items to skip before starting to collect the result set. Default is 0. 40 // limit: The number of items to return. Specify -1 will return all remaining items after offset. The maximum will be the MaxResultCount as defined in the configuration of service. Default is 20. 41 ProvisionWatchersByServiceName(ctx context.Context, name string, offset int, limit int) (responses.MultiProvisionWatchersResponse, errors.EdgeX) 42 }