Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) }
type DeviceClient ¶ added in v0.1.133
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 ¶ added in v0.1.123
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) // Query profile by name DeviceProfileByName(ctx context.Context, name string) (responses.DeviceProfileResponse, errors.EdgeX) // Query all profiles AllDeviceProfiles(ctx context.Context, labels []string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // Query profiles by model DeviceProfilesByModel(ctx context.Context, model string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // Query profiles by manufacturer DeviceProfilesByManufacturer(ctx context.Context, manufacturer string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) // Query profiles by manufacturer and model DeviceProfilesByManufacturerAndModel(ctx context.Context, manufacturer string, model string, offset int, limit int) (responses.MultiDeviceProfilesResponse, errors.EdgeX) }
DeviceProfileClient defines the interface for interactions with the DeviceProfile endpoint on the EdgeX Foundry core-metadata service.
type DeviceServiceCallbackClient ¶ added in v0.1.134
type DeviceServiceCallbackClient interface { // AddDeviceCallback invoke device service's callback API for adding device AddDeviceCallback(ctx context.Context, request requests.AddDeviceRequest) (common.BaseResponse, errors.EdgeX) // UpdateDeviceCallback invoke device service's callback API for updating device UpdateDeviceCallback(ctx context.Context, request requests.UpdateDeviceRequest) (common.BaseResponse, errors.EdgeX) // DeleteDeviceCallback invoke device service's callback API for deleting device DeleteDeviceCallback(ctx context.Context, id string) (common.BaseResponse, errors.EdgeX) }
DeviceServiceCallbackClient defines the interface for interactions with the callback endpoint on the EdgeX Foundry device service.
type DeviceServiceClient ¶ added in v0.1.137
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 EventClient ¶ added in v0.1.115
type EventClient interface { // Add adds new events Add(ctx context.Context, reqs []requests.AddEventRequest) ([]common.BaseWithIdResponse, errors.EdgeX) }
EventClient defines the interface for interactions with the Event endpoint on the EdgeX Foundry core-data service.
type ReadingClient ¶ added in v0.1.142
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 of readings currently stored in the database. ReadingCount(ctx context.Context) (common.CountResponse, errors.EdgeX) // ReadingCountByDeviceName returns a count of all of 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) }
ReadingClient defines the interface for interactions with the Reading endpoint on the EdgeX Foundry core-data service.