Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AddDeviceProfile(dp model.DeviceProfile) (model.DeviceProfile, errors.EdgeX)
- func (c *Client) AddDeviceService(ds model.DeviceService) (model.DeviceService, errors.EdgeX)
- func (c *Client) AddEvent(e model.Event) (model.Event, errors.EdgeX)
- func (c *Client) CloseSession()
- func (c *Client) DeleteDeviceProfileById(id string) errors.EdgeX
- func (c *Client) DeleteDeviceProfileByName(name string) errors.EdgeX
- func (c *Client) EventById(id string) (event model.Event, edgeXerr errors.EdgeX)
- func (c *Client) GetDeviceProfileByName(name string) (deviceProfile model.DeviceProfile, edgeXerr errors.EdgeX)
- func (c *Client) GetDeviceServiceByName(name string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)
- func (c *Client) UpdateDeviceProfile(dp model.DeviceProfile) errors.EdgeX
Constants ¶
View Source
const ( MULTI = "MULTI" SET = "SET" GET = "GET" EXISTS = "EXISTS" DEL = "DEL" HSET = "HSET" HGET = "HGET" HEXISTS = "HEXISTS" HDEL = "HDEL" SADD = "SADD" SREM = "SREM" ZADD = "ZADD" ZREM = "ZREM" EXEC = "EXEC" ZRANGE = "ZRANGE" ZREVRANGE = "ZREVRANGE" MGET = "MGET" )
Redis commmands used in this project Reference: https://redis.io/commands
View Source
const DeviceProfileCollection = "v2:deviceProfile"
View Source
const DeviceServiceCollection = "v2:deviceService"
View Source
const EventsCollection = "v2:event"
View Source
const ReadingsCollection = "v2:reading"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *redisClient.Client // contains filtered or unexported fields }
func NewClient ¶
func NewClient(config db.Configuration, logger logger.LoggingClient) (*Client, errors.EdgeX)
func (*Client) AddDeviceProfile ¶
func (c *Client) AddDeviceProfile(dp model.DeviceProfile) (model.DeviceProfile, errors.EdgeX)
Add a new device profle
func (*Client) AddDeviceService ¶
func (c *Client) AddDeviceService(ds model.DeviceService) (model.DeviceService, errors.EdgeX)
Add a new device service
func (*Client) CloseSession ¶
func (c *Client) CloseSession()
CloseSession closes the connections to Redis
func (*Client) DeleteDeviceProfileById ¶
Delete a device profile by id
func (*Client) DeleteDeviceProfileByName ¶
Delete a device profile by name
func (*Client) GetDeviceProfileByName ¶
func (c *Client) GetDeviceProfileByName(name string) (deviceProfile model.DeviceProfile, edgeXerr errors.EdgeX)
Get a device profile by name
func (*Client) GetDeviceServiceByName ¶
func (c *Client) GetDeviceServiceByName(name string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)
Get a device service by name
func (*Client) UpdateDeviceProfile ¶
func (c *Client) UpdateDeviceProfile(dp model.DeviceProfile) errors.EdgeX
Update a new device profile
Click to show internal directories.
Click to hide internal directories.