client

package
v1.0.1-0...-3a959c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package client is for communication with the EdgeX Foundry platform.

Index

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 GetDevice

func GetDevice(device string) (*models.Device, error)

GetDevice returns the device for the given name.

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 GetDevices

func GetDevices() ([]*models.Device, error)

GetDevices returns all devices.

func GetLastReadingForDeviceAndResource

func GetLastReadingForDeviceAndResource(device, resource string) (*models.Reading, error)

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

type ResponseError struct {
	Code    int
	Message string
}

ResponseError is the representation of a response error.

func (*ResponseError) Error

func (e *ResponseError) Error() string

Directories

Path Synopsis
Package models contains the models for client requests/responses.
Package models contains the models for client requests/responses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL