Documentation ¶
Index ¶
- type CommandClient
- type CommonClient
- type DeviceClient
- type DeviceProfileClient
- type DeviceServiceCallbackClient
- type DeviceServiceClient
- type DeviceServiceCommandClient
- type EventClient
- type GeneralClient
- type IntervalActionClient
- type IntervalClient
- type NotificationClient
- type ProvisionWatcherClient
- type ReadingClient
- type SubscriptionClient
- type SystemManagementClient
- type TransmissionClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandClient ¶
type CommandClient interface { // AllDeviceCoreCommands returns a paginated list of MultiDeviceCoreCommandsResponse. The list contains all of the commands in the system associated with their respective device. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllDeviceCoreCommands(ctx context.Context, offset int, limit int) (responses.MultiDeviceCoreCommandsResponse, errors.EdgeX) // DeviceCoreCommandsByDeviceName returns all commands associated with the specified device name. DeviceCoreCommandsByDeviceName(ctx context.Context, deviceName string) (responses.DeviceCoreCommandResponse, errors.EdgeX) // IssueGetCommandByName issues the specified read command referenced by the command name to the device/sensor that is also referenced by name. // dsPushEvent: If set to yes, a successful GET will result in an event being pushed to the EdgeX system. Default value is no. // dsReturnEvent: If set to no, there will be no Event returned in the http response. Default value is yes. IssueGetCommandByName(ctx context.Context, deviceName string, commandName string, dsPushEvent string, dsReturnEvent string) (*responses.EventResponse, errors.EdgeX) // IssueGetCommandByNameWithQueryParams issues the specified read command by deviceName and commandName with additional query parameters. IssueGetCommandByNameWithQueryParams(ctx context.Context, deviceName string, commandName string, queryParams map[string]string) (*responses.EventResponse, errors.EdgeX) // IssueSetCommandByName issues the specified write command referenced by the command name to the device/sensor that is also referenced by name. IssueSetCommandByName(ctx context.Context, deviceName string, commandName string, settings map[string]string) (common.BaseResponse, errors.EdgeX) // IssueSetCommandByNameWithObject issues the specified write command and the settings supports object value type IssueSetCommandByNameWithObject(ctx context.Context, deviceName string, commandName string, settings map[string]interface{}) (common.BaseResponse, errors.EdgeX) }
CommandClient defines the interface for interactions with the command endpoints on the EdgeX Foundry core-command service.
type CommonClient ¶
type CommonClient interface { // Configuration obtains configuration information from the target service. Configuration(ctx context.Context) (common.ConfigResponse, errors.EdgeX) // Metrics obtains metrics information from the target service. Metrics(ctx context.Context) (common.MetricsResponse, errors.EdgeX) // Ping tests whether the service is working Ping(ctx context.Context) (common.PingResponse, errors.EdgeX) // Version obtains version information from the target service. Version(ctx context.Context) (common.VersionResponse, errors.EdgeX) // AddSecret adds EdgeX Service exclusive secret to the Secret Store AddSecret(ctx context.Context, request common.SecretRequest) (common.BaseResponse, errors.EdgeX) }
type DeviceClient ¶
type DeviceClient interface { // Add adds new devices. Add(ctx context.Context, reqs []requests.AddDeviceRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates devices. Update(ctx context.Context, reqs []requests.UpdateDeviceRequest) ([]common.BaseResponse, errors.EdgeX) // AllDevices returns all devices. Devices can also be filtered by labels. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllDevices(ctx context.Context, labels []string, offset int, limit int) (responses.MultiDevicesResponse, errors.EdgeX) // DeviceNameExists checks whether the device exists. DeviceNameExists(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // DeviceByName returns a device by device name. DeviceByName(ctx context.Context, name string) (responses.DeviceResponse, errors.EdgeX) // DeleteByName deletes a device by device name. DeleteDeviceByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // DevicesByProfileName returns devices associated with the specified device profile. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. DevicesByProfileName(ctx context.Context, name string, offset int, limit int) (responses.MultiDevicesResponse, errors.EdgeX) // DevicesByServiceName returns devices associated with the specified device service. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. DevicesByServiceName(ctx context.Context, name string, offset int, limit int) (responses.MultiDevicesResponse, errors.EdgeX) }
DeviceClient defines the interface for interactions with the Device endpoint on the EdgeX Foundry core-metadata service.
type DeviceProfileClient ¶
type DeviceProfileClient interface { // Add adds new profiles Add(ctx context.Context, reqs []requests.DeviceProfileRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates profiles Update(ctx context.Context, reqs []requests.DeviceProfileRequest) ([]common.BaseResponse, errors.EdgeX) // AddByYaml adds new profile by uploading a file in YAML format AddByYaml(ctx context.Context, yamlFilePath string) (common.BaseWithIdResponse, errors.EdgeX) // UpdateByYaml updates profile by uploading a file in YAML format UpdateByYaml(ctx context.Context, yamlFilePath string) (common.BaseResponse, errors.EdgeX) // DeleteByName deletes profile by name DeleteByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // DeviceProfileByName queries profile by name DeviceProfileByName(ctx context.Context, name string) (responses.DeviceProfileResponse, errors.EdgeX) // AllDeviceProfiles queries all profiles AllDeviceProfiles(ctx context.Context, labels []string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // DeviceProfilesByModel queries profiles by model DeviceProfilesByModel(ctx context.Context, model string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // DeviceProfilesByManufacturer queries profiles by manufacturer DeviceProfilesByManufacturer(ctx context.Context, manufacturer string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // DeviceProfilesByManufacturerAndModel queries profiles by manufacturer and model DeviceProfilesByManufacturerAndModel(ctx context.Context, manufacturer string, model string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // DeviceResourceByProfileNameAndResourceName queries the device resource by profileName and resourceName DeviceResourceByProfileNameAndResourceName(ctx context.Context, profileName string, resourceName string) (responses.DeviceResourceResponse, errors.EdgeX) // UpdateDeviceProfileBasicInfo updates existing profile's basic info UpdateDeviceProfileBasicInfo(ctx context.Context, reqs []requests.DeviceProfileBasicInfoRequest) ([]common.BaseResponse, errors.EdgeX) // AddDeviceProfileResource adds new device resource to an existing profile AddDeviceProfileResource(ctx context.Context, reqs []requests.AddDeviceResourceRequest) ([]common.BaseResponse, errors.EdgeX) // UpdateDeviceProfileResource updates existing device resource UpdateDeviceProfileResource(ctx context.Context, reqs []requests.UpdateDeviceResourceRequest) ([]common.BaseResponse, errors.EdgeX) // DeleteDeviceResourceByName deletes device resource by name DeleteDeviceResourceByName(ctx context.Context, profileName string, resourceName string) (common.BaseResponse, errors.EdgeX) // AddDeviceProfileDeviceCommand adds new device command to an existing profile AddDeviceProfileDeviceCommand(ctx context.Context, reqs []requests.AddDeviceCommandRequest) ([]common.BaseResponse, errors.EdgeX) // UpdateDeviceProfileDeviceCommand updates existing device command UpdateDeviceProfileDeviceCommand(ctx context.Context, reqs []requests.UpdateDeviceCommandRequest) ([]common.BaseResponse, errors.EdgeX) // DeleteDeviceCommandByName deletes device command by name DeleteDeviceCommandByName(ctx context.Context, profileName string, commandName string) (common.BaseResponse, errors.EdgeX) }
DeviceProfileClient defines the interface for interactions with the DeviceProfile endpoint on the EdgeX Foundry core-metadata service.
type DeviceServiceCallbackClient ¶
type DeviceServiceCallbackClient interface { // AddDeviceCallback invokes device service's callback API for adding device AddDeviceCallback(ctx context.Context, request requests.AddDeviceRequest) (common.BaseResponse, errors.EdgeX) // UpdateDeviceCallback invokes device service's callback API for updating device UpdateDeviceCallback(ctx context.Context, request requests.UpdateDeviceRequest) (common.BaseResponse, errors.EdgeX) // DeleteDeviceCallback invokes device service's callback API for deleting device DeleteDeviceCallback(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // ValidateDeviceCallback invokes device service's validation API for validating device ValidateDeviceCallback(ctx context.Context, request requests.AddDeviceRequest) (common.BaseResponse, errors.EdgeX) // UpdateDeviceProfileCallback invokes device service's callback API for updating device profile UpdateDeviceProfileCallback(ctx context.Context, request requests.DeviceProfileRequest) (common.BaseResponse, errors.EdgeX) // AddProvisionWatcherCallback invokes device service's callback API for adding provision watcher AddProvisionWatcherCallback(ctx context.Context, request requests.AddProvisionWatcherRequest) (common.BaseResponse, errors.EdgeX) // UpdateProvisionWatcherCallback invokes device service's callback API for updating provision watcher UpdateProvisionWatcherCallback(ctx context.Context, request requests.UpdateProvisionWatcherRequest) (common.BaseResponse, errors.EdgeX) // DeleteProvisionWatcherCallback invokes device service's callback API for deleting provision watcher DeleteProvisionWatcherCallback(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // UpdateDeviceServiceCallback invokes device service's callback API for updating device service UpdateDeviceServiceCallback(ctx context.Context, request requests.UpdateDeviceServiceRequest) (common.BaseResponse, errors.EdgeX) }
DeviceServiceCallbackClient defines the interface for interactions with the callback endpoint on the EdgeX Foundry device service.
type DeviceServiceClient ¶
type DeviceServiceClient interface { // Add adds new device services. Add(ctx context.Context, reqs []requests.AddDeviceServiceRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates device services. Update(ctx context.Context, reqs []requests.UpdateDeviceServiceRequest) ([]common.BaseResponse, errors.EdgeX) // AllDeviceServices returns all device services. Device services can also be filtered by labels. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllDeviceServices(ctx context.Context, labels []string, offset int, limit int) (responses.MultiDeviceServicesResponse, errors.EdgeX) // DeviceServiceByName returns a device service by name. DeviceServiceByName(ctx context.Context, name string) (responses.DeviceServiceResponse, errors.EdgeX) // DeleteByName deletes a device service by name. DeleteByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) }
DeviceServiceClient defines the interface for interactions with the Device Service endpoint on the EdgeX Foundry core-metadata service.
type DeviceServiceCommandClient ¶
type DeviceServiceCommandClient interface { // GetCommand invokes device service's command API for issuing get(read) command GetCommand(ctx context.Context, baseUrl string, deviceName string, commandName string, queryParams string) (*responses.EventResponse, errors.EdgeX) // SetCommand invokes device service's command API for issuing set(write) command SetCommand(ctx context.Context, baseUrl string, deviceName string, commandName string, queryParams string, settings map[string]string) (common.BaseResponse, errors.EdgeX) // SetCommandWithObject invokes device service's set command API and the settings supports object value type SetCommandWithObject(ctx context.Context, baseUrl string, deviceName string, commandName string, queryParams string, settings map[string]interface{}) (common.BaseResponse, errors.EdgeX) }
DeviceServiceCommandClient defines the interface for interactions with the device command endpoints on the EdgeX Foundry device services.
type EventClient ¶
type EventClient interface { // Add adds new event. Add(ctx context.Context, req requests.AddEventRequest) (common.BaseWithIdResponse, errors.EdgeX) // AllEvents returns all events sorted in descending order of created time. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllEvents(ctx context.Context, offset, limit int) (responses.MultiEventsResponse, errors.EdgeX) // EventCount returns a count of all of events currently stored in the database. EventCount(ctx context.Context) (common.CountResponse, errors.EdgeX) // EventCountByDeviceName returns a count of all of events currently stored in the database, sourced from the specified device. EventCountByDeviceName(ctx context.Context, name string) (common.CountResponse, errors.EdgeX) // EventsByDeviceName returns a portion of the entire events according to the device name, offset and limit parameters. Events are sorted in descending order of created time. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. EventsByDeviceName(ctx context.Context, name string, offset, limit int) (responses.MultiEventsResponse, errors.EdgeX) // DeleteByDeviceName deletes all events for the specified device. DeleteByDeviceName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // EventsByTimeRange returns events between a given start and end date/time. Events are sorted in descending order of created time. // start, end: Unix timestamp, indicating the date/time range. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. EventsByTimeRange(ctx context.Context, start, end, offset, limit int) (responses.MultiEventsResponse, errors.EdgeX) // DeleteByAge deletes events that are older than the given age. Age is supposed in milliseconds from created timestamp. DeleteByAge(ctx context.Context, age int) (common.BaseResponse, errors.EdgeX) }
EventClient defines the interface for interactions with the Event endpoint on the EdgeX Foundry core-data service.
type GeneralClient ¶
type GeneralClient interface { // FetchConfiguration obtains configuration information from the target service. FetchConfiguration(ctx context.Context) (common.ConfigResponse, errors.EdgeX) // FetchMetrics obtains metrics information from the target service. FetchMetrics(ctx context.Context) (common.MetricsResponse, errors.EdgeX) }
type IntervalActionClient ¶
type IntervalActionClient interface { // Add adds new intervalActions. Add(ctx context.Context, reqs []requests.AddIntervalActionRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates intervalActions. Update(ctx context.Context, reqs []requests.UpdateIntervalActionRequest) ([]common.BaseResponse, errors.EdgeX) // AllIntervalActions returns all intervalActions. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllIntervalActions(ctx context.Context, offset int, limit int) (responses.MultiIntervalActionsResponse, errors.EdgeX) // IntervalActionByName returns a intervalAction by name. IntervalActionByName(ctx context.Context, name string) (responses.IntervalActionResponse, errors.EdgeX) // DeleteIntervalActionByName deletes a intervalAction by name. DeleteIntervalActionByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) }
IntervalActionClient defines the interface for interactions with the IntervalAction endpoint on the EdgeX Foundry support-scheduler service.
type IntervalClient ¶
type IntervalClient interface { // Add adds new intervals. Add(ctx context.Context, reqs []requests.AddIntervalRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates intervals. Update(ctx context.Context, reqs []requests.UpdateIntervalRequest) ([]common.BaseResponse, errors.EdgeX) // AllIntervals returns all intervals. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllIntervals(ctx context.Context, offset int, limit int) (responses.MultiIntervalsResponse, errors.EdgeX) // IntervalByName returns a interval by name. IntervalByName(ctx context.Context, name string) (responses.IntervalResponse, errors.EdgeX) // DeleteIntervalByName deletes a interval by name. DeleteIntervalByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) }
IntervalClient defines the interface for interactions with the Interval endpoint on the EdgeX Foundry support-scheduler service.
type NotificationClient ¶
type NotificationClient interface { // SendNotification sends new notifications. SendNotification(ctx context.Context, reqs []requests.AddNotificationRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // NotificationById query notification by id. NotificationById(ctx context.Context, id string) (responses.NotificationResponse, errors.EdgeX) // DeleteNotificationById deletes a notification by id. DeleteNotificationById(ctx context.Context, id string) (common.BaseResponse, errors.EdgeX) // NotificationsByCategory queries notifications with category, offset and limit NotificationsByCategory(ctx context.Context, category string, offset int, limit int) (responses.MultiNotificationsResponse, errors.EdgeX) // NotificationsByLabel queries notifications with label, offset and limit NotificationsByLabel(ctx context.Context, label string, offset int, limit int) (responses.MultiNotificationsResponse, errors.EdgeX) // NotificationsByStatus queries notifications with status, offset and limit NotificationsByStatus(ctx context.Context, status string, offset int, limit int) (responses.MultiNotificationsResponse, errors.EdgeX) // NotificationsByTimeRange query notifications with time range, offset and limit NotificationsByTimeRange(ctx context.Context, start int, end int, offset int, limit int) (responses.MultiNotificationsResponse, errors.EdgeX) // NotificationsBySubscriptionName query notifications with subscriptionName, offset and limit NotificationsBySubscriptionName(ctx context.Context, subscriptionName string, offset int, limit int) (responses.MultiNotificationsResponse, errors.EdgeX) // CleanupNotificationsByAge removes notifications that are older than age. And the corresponding transmissions will also be deleted. // Age is supposed in milliseconds since modified timestamp CleanupNotificationsByAge(ctx context.Context, age int) (common.BaseResponse, errors.EdgeX) // CleanupNotifications removes notifications and the corresponding transmissions. CleanupNotifications(ctx context.Context) (common.BaseResponse, errors.EdgeX) // DeleteProcessedNotificationsByAge removes processed notifications that are older than age. And the corresponding transmissions will also be deleted. // Age is supposed in milliseconds since modified timestamp // Please notice that this API is only for processed notifications (status = PROCESSED). If the deletion purpose includes each kind of notifications, please refer to cleanup API. DeleteProcessedNotificationsByAge(ctx context.Context, age int) (common.BaseResponse, errors.EdgeX) }
NotificationClient defines the interface for interactions with the Notification endpoint on the EdgeX Foundry support-notifications service.
type ProvisionWatcherClient ¶
type ProvisionWatcherClient interface { // Add adds a new provision watcher. Add(ctx context.Context, reqs []requests.AddProvisionWatcherRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates provision watchers. Update(ctx context.Context, reqs []requests.UpdateProvisionWatcherRequest) ([]common.BaseResponse, errors.EdgeX) // AllProvisionWatchers returns all provision watchers. ProvisionWatchers can also be filtered by labels. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllProvisionWatchers(ctx context.Context, labels []string, offset int, limit int) (responses.MultiProvisionWatchersResponse, errors.EdgeX) // ProvisionWatcherByName returns a provision watcher by name. ProvisionWatcherByName(ctx context.Context, name string) (responses.ProvisionWatcherResponse, errors.EdgeX) // DeleteProvisionWatcherByName deletes a provision watcher by name. DeleteProvisionWatcherByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) // ProvisionWatchersByProfileName returns provision watchers associated with the specified device profile name. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ProvisionWatchersByProfileName(ctx context.Context, name string, offset int, limit int) (responses.MultiProvisionWatchersResponse, errors.EdgeX) // ProvisionWatchersByServiceName returns provision watchers associated with the specified device service name. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ProvisionWatchersByServiceName(ctx context.Context, name string, offset int, limit int) (responses.MultiProvisionWatchersResponse, errors.EdgeX) }
ProvisionWatcherClient defines the interface for interactions with the ProvisionWatcher endpoint on the EdgeX Foundry core-metadata service.
type ReadingClient ¶
type ReadingClient interface { // AllReadings returns all readings sorted in descending order of created time. // The result can be limited in a certain range by specifying the offset and limit parameters. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. AllReadings(ctx context.Context, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingCount returns a count of all readings currently stored in the database. ReadingCount(ctx context.Context) (common.CountResponse, errors.EdgeX) // ReadingCountByDeviceName returns a count of all readings currently stored in the database, sourced from the specified device. ReadingCountByDeviceName(ctx context.Context, name string) (common.CountResponse, errors.EdgeX) // ReadingsByDeviceName returns a portion of the entire readings according to the device name, offset and limit parameters. Readings are sorted in descending order of created time. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByDeviceName(ctx context.Context, name string, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingsByResourceName returns a portion of the entire readings according to the device resource name, offset and limit parameters. Readings are sorted in descending order of created time. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByResourceName(ctx context.Context, name string, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingsByTimeRange returns readings between a given start and end date/time. Readings are sorted in descending order of created time. // start, end: Unix timestamp, indicating the date/time range. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByTimeRange(ctx context.Context, start, end, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingsByResourceNameAndTimeRange returns readings by resource name and specified time range. Readings are sorted in descending order of origin time. // start, end: Unix timestamp, indicating the date/time range // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByResourceNameAndTimeRange(ctx context.Context, name string, start, end, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingsByDeviceNameAndResourceName returns readings by device name and resource name. Readings are sorted in descending order of origin time. // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByDeviceNameAndResourceName(ctx context.Context, deviceName, resourceName string, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingsByDeviceNameAndResourceNameAndTimeRange returns readings by device name, resource name and specified time range. Readings are sorted in descending order of origin time. // start, end: Unix timestamp, indicating the date/time range // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByDeviceNameAndResourceNameAndTimeRange(ctx context.Context, deviceName, resourceName string, start, end, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) // ReadingsByDeviceNameAndResourceNamesAndTimeRange returns readings by device name, multiple resource names and specified time range. Readings are sorted in descending order of origin time. // If none of resourceNames is specified, return all Readings under specified deviceName and within specified time range // start, end: Unix timestamp, indicating the date/time range // offset: The number of items to skip before starting to collect the result set. Default is 0. // 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. ReadingsByDeviceNameAndResourceNamesAndTimeRange(ctx context.Context, deviceName string, resourceNames []string, start, end, offset, limit int) (responses.MultiReadingsResponse, errors.EdgeX) }
ReadingClient defines the interface for interactions with the Reading endpoint on the EdgeX Foundry core-data service.
type SubscriptionClient ¶
type SubscriptionClient interface { // Add adds new subscriptions. Add(ctx context.Context, reqs []requests.AddSubscriptionRequest) ([]common.BaseWithIdResponse, errors.EdgeX) // Update updates subscriptions. Update(ctx context.Context, reqs []requests.UpdateSubscriptionRequest) ([]common.BaseResponse, errors.EdgeX) // AllSubscriptions queries subscriptions with offset and limit AllSubscriptions(ctx context.Context, offset int, limit int) (responses.MultiSubscriptionsResponse, errors.EdgeX) // SubscriptionsByCategory queries subscriptions with category, offset and limit SubscriptionsByCategory(ctx context.Context, category string, offset int, limit int) (responses.MultiSubscriptionsResponse, errors.EdgeX) // SubscriptionsByLabel queries subscriptions with label, offset and limit SubscriptionsByLabel(ctx context.Context, label string, offset int, limit int) (responses.MultiSubscriptionsResponse, errors.EdgeX) // SubscriptionsByReceiver queries subscriptions with receiver, offset and limit SubscriptionsByReceiver(ctx context.Context, receiver string, offset int, limit int) (responses.MultiSubscriptionsResponse, errors.EdgeX) // SubscriptionByName query subscription by name. SubscriptionByName(ctx context.Context, name string) (responses.SubscriptionResponse, errors.EdgeX) // DeleteSubscriptionByName deletes a subscription by name. DeleteSubscriptionByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) }
SubscriptionClient defines the interface for interactions with the Subscription endpoint on the EdgeX Foundry support-notifications service.
type SystemManagementClient ¶
type SystemManagementClient interface { // GetHealth obtain health information of services via registry by their name GetHealth(ctx context.Context, services []string) ([]common.BaseWithServiceNameResponse, errors.EdgeX) // GetMetrics obtain metrics information from services by their name GetMetrics(ctx context.Context, services []string) ([]common.BaseWithMetricsResponse, errors.EdgeX) // GetConfig obtain configuration from services by their name GetConfig(ctx context.Context, services []string) ([]common.BaseWithConfigResponse, errors.EdgeX) // DoOperation issue a start, stop, restart action to the targeted services DoOperation(ctx context.Context, reqs []requests.OperationRequest) ([]common.BaseResponse, errors.EdgeX) }
SystemManagementClient defines the interface for interactions with the API endpoint on the EdgeX Foundry sys-mgmt-agent service.
type TransmissionClient ¶
type TransmissionClient interface { // TransmissionById query transmission by id. TransmissionById(ctx context.Context, id string) (responses.TransmissionResponse, errors.EdgeX) // TransmissionsByTimeRange query transmissions with time range, offset and limit TransmissionsByTimeRange(ctx context.Context, start int, end int, offset int, limit int) (responses.MultiTransmissionsResponse, errors.EdgeX) // AllTransmissions query transmissions with offset and limit AllTransmissions(ctx context.Context, offset int, limit int) (responses.MultiTransmissionsResponse, errors.EdgeX) // TransmissionsByStatus queries transmissions with status, offset and limit TransmissionsByStatus(ctx context.Context, status string, offset int, limit int) (responses.MultiTransmissionsResponse, errors.EdgeX) // DeleteProcessedTransmissionsByAge deletes the processed transmissions if the current timestamp minus their created timestamp is less than the age parameter. DeleteProcessedTransmissionsByAge(ctx context.Context, age int) (common.BaseResponse, errors.EdgeX) // TransmissionsBySubscriptionName query transmissions with subscriptionName, offset and limit TransmissionsBySubscriptionName(ctx context.Context, subscriptionName string, offset int, limit int) (responses.MultiTransmissionsResponse, errors.EdgeX) // TransmissionsByNotificationId query transmissions with notification id, offset and limit TransmissionsByNotificationId(ctx context.Context, id string, offset int, limit int) (responses.MultiTransmissionsResponse, errors.EdgeX) }
TransmissionClient defines the interface for interactions with the Transmission endpoint on the EdgeX Foundry support-notifications service.