Documentation ¶
Overview ¶
Package client is for communication with the EdgeX Foundry platform.
Index ¶
- Variables
- func GetDevice(device string) (*models.Device, error)
- func GetDeviceCommandForDeviceAndCommand(device, command string) (models.CommandResponse, error)
- func GetDeviceProfileForDevice(device string) (*models.DeviceProfile, error)
- func GetDevices() ([]*models.Device, error)
- func GetLastReadingForDeviceAndResource(device, resource string) (*models.Reading, error)
- func GetValueDescriptorsForDevice(device string) ([]*models.ValueDescriptor, error)
- func PutDeviceCommandForDeviceAndCommand(device, command string, payload models.CommandPayload) (models.CommandResponse, error)
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ClientCoreData is the client for core data. ClientCoreData *resty.Client // ClientCoreMetaData is the client for core metadata. ClientCoreMetaData *resty.Client // ClientCoreCommand is the client for core command. ClientCoreCommand *resty.Client )
Functions ¶
func GetDeviceCommandForDeviceAndCommand ¶
func GetDeviceCommandForDeviceAndCommand(device, command string) (models.CommandResponse, error)
GetDeviceCommandForDeviceAndCommand executes a GET-command on the given device and returns the response.
func GetDeviceProfileForDevice ¶
func GetDeviceProfileForDevice(device string) (*models.DeviceProfile, error)
GetDeviceProfileForDevice returns the deviceprofile for the given device.
func GetLastReadingForDeviceAndResource ¶
GetLastReadingForDeviceAndResource returns the last reading of the devices resource.
func GetValueDescriptorsForDevice ¶
func GetValueDescriptorsForDevice(device string) ([]*models.ValueDescriptor, error)
GetValueDescriptorsForDevice returns a list of all valuedescriptors asociated with the device.
func PutDeviceCommandForDeviceAndCommand ¶
func PutDeviceCommandForDeviceAndCommand(device, command string, payload models.CommandPayload) (models.CommandResponse, error)
PutDeviceCommandForDeviceAndCommand executes a PUT-command on the given device and returns it response.
Types ¶
type ResponseError ¶
ResponseError is the representation of a response error.
func (*ResponseError) Error ¶
func (e *ResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.