redis

package
v1.3.1-0...-2eb6d4b Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MULTI            = "MULTI"
	SET              = "SET"
	GET              = "GET"
	EXISTS           = "EXISTS"
	DEL              = "DEL"
	HGETALL          = "HGETALL"
	HLEN             = "HLEN"
	HSET             = "HSET"
	HSETNX           = "HSETNX"
	HGET             = "HGET"
	HEXISTS          = "HEXISTS"
	HDEL             = "HDEL"
	SADD             = "SADD"
	SREM             = "SREM"
	ZADD             = "ZADD"
	ZREM             = "ZREM"
	EXEC             = "EXEC"
	ZRANGE           = "ZRANGE"
	ZREVRANGE        = "ZREVRANGE"
	MGET             = "MGET"
	ZCARD            = "ZCARD"
	ZCOUNT           = "ZCOUNT"
	UNLINK           = "UNLINK"
	ZRANGEBYSCORE    = "ZRANGEBYSCORE"
	ZREVRANGEBYSCORE = "ZREVRANGEBYSCORE"
	LIMIT            = "LIMIT"
	ZUNIONSTORE      = "ZUNIONSTORE"
	ZINTERSTORE      = "ZINTERSTORE"
	TYPE             = "TYPE"
)

Redis commmands used in this project Reference: https://redis.io/commands

View Source
const (
	InfiniteMin     = "-inf"
	InfiniteMax     = "+inf"
	GreaterThanZero = "(0"
	DBKeySeparator  = ":"
)
View Source
const (
	Hash   = "hash"
	String = "string"
	None   = "none"
)

Redis data types

View Source
const (
	DeviceCollection            = "md|dv"
	DeviceCollectionName        = DeviceCollection + DBKeySeparator + common.Name
	DeviceCollectionLabel       = DeviceCollection + DBKeySeparator + common.Label
	DeviceCollectionServiceName = DeviceCollection + DBKeySeparator + common.Service + DBKeySeparator + common.Name
	DeviceCollectionProfileName = DeviceCollection + DBKeySeparator + common.Profile + DBKeySeparator + common.Name
)
View Source
const (
	DeviceProfileCollection             = "md|dp"
	DeviceProfileCollectionName         = DeviceProfileCollection + DBKeySeparator + common.Name
	DeviceProfileCollectionLabel        = DeviceProfileCollection + DBKeySeparator + common.Label
	DeviceProfileCollectionModel        = DeviceProfileCollection + DBKeySeparator + common.Model
	DeviceProfileCollectionManufacturer = DeviceProfileCollection + DBKeySeparator + common.Manufacturer
)
View Source
const (
	DeviceServiceCollection      = "md|ds"
	DeviceServiceCollectionName  = DeviceServiceCollection + DBKeySeparator + common.Name
	DeviceServiceCollectionLabel = DeviceServiceCollection + DBKeySeparator + common.Label
)
View Source
const (
	EventsCollection           = "cd|evt"
	EventsCollectionOrigin     = EventsCollection + DBKeySeparator + common.Origin
	EventsCollectionDeviceName = EventsCollection + DBKeySeparator + common.Device + DBKeySeparator + common.Name
	EventsCollectionReadings   = EventsCollection + DBKeySeparator + "readings"
)
View Source
const (
	NotificationCollection         = "sn|notif"
	NotificationCollectionCategory = NotificationCollection + DBKeySeparator + common.Category
	NotificationCollectionLabel    = NotificationCollection + DBKeySeparator + common.Label
	NotificationCollectionSender   = NotificationCollection + DBKeySeparator + common.Sender
	NotificationCollectionSeverity = NotificationCollection + DBKeySeparator + common.Severity
	NotificationCollectionStatus   = NotificationCollection + DBKeySeparator + common.Status
	NotificationCollectionCreated  = NotificationCollection + DBKeySeparator + common.Created
)
View Source
const (
	ProvisionWatcherCollection            = "md|pw"
	ProvisionWatcherCollectionName        = ProvisionWatcherCollection + DBKeySeparator + common.Name
	ProvisionWatcherCollectionLabel       = ProvisionWatcherCollection + DBKeySeparator + common.Label
	ProvisionWatcherCollectionServiceName = ProvisionWatcherCollectionName + DBKeySeparator + common.Service + DBKeySeparator + common.Name
	ProvisionWatcherCollectionProfileName = ProvisionWatcherCollectionName + DBKeySeparator + common.Profile + DBKeySeparator + common.Name
)
View Source
const (
	ReadingsCollection                       = "cd|rd"
	ReadingsCollectionOrigin                 = ReadingsCollection + DBKeySeparator + common.Origin
	ReadingsCollectionDeviceName             = ReadingsCollection + DBKeySeparator + common.DeviceName
	ReadingsCollectionResourceName           = ReadingsCollection + DBKeySeparator + common.ResourceName
	ReadingsCollectionDeviceNameResourceName = ReadingsCollection + DBKeySeparator + common.DeviceName + DBKeySeparator + common.ResourceName
)
View Source
const (
	SubscriptionCollection         = "sn|sub"
	SubscriptionCollectionName     = SubscriptionCollection + DBKeySeparator + common.Name
	SubscriptionCollectionCategory = SubscriptionCollection + DBKeySeparator + common.Category
	SubscriptionCollectionLabel    = SubscriptionCollection + DBKeySeparator + common.Label
	SubscriptionCollectionReceiver = SubscriptionCollection + DBKeySeparator + common.Receiver
)
View Source
const (
	TransmissionCollection                 = "sn|trans"
	TransmissionCollectionStatus           = TransmissionCollection + DBKeySeparator + common.Status
	TransmissionCollectionSubscriptionName = TransmissionCollection + DBKeySeparator + common.Subscription + DBKeySeparator + common.Name
	TransmissionCollectionNotificationId   = TransmissionCollection + DBKeySeparator + common.Notification + DBKeySeparator + common.Id
	TransmissionCollectionCreated          = TransmissionCollection + DBKeySeparator + common.Created
)
View Source
const KVCollection = "kp|kv"
View Source
const RegistrationCollection = "kp|r"
View Source
const RegistrationCollectionName = RegistrationCollection + DBKeySeparator + common.Name

Variables

This section is empty.

Functions

func CreateKey

func CreateKey(targets ...string) string

CreateKey creates Redis key by connecting the target key with DBKeySeparator

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) AddDevice

func (c *Client) AddDevice(d model.Device) (model.Device, errors.EdgeX)

Add a new device

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)

AddDeviceService adds a new device service

func (*Client) AddEvent

func (c *Client) AddEvent(e model.Event) (model.Event, errors.EdgeX)

AddEvent adds a new event

func (*Client) AddKeeperKeys

func (c *Client) AddKeeperKeys(kv model.KVS, isFlatten bool) (keys []model.KeyOnly, edgeXerr errors.EdgeX)

AddKeeperKeys returns the values stored for the specified key or with the same key prefix

func (*Client) AddNotification

func (c *Client) AddNotification(notification model.Notification) (model.Notification, errors.EdgeX)

AddNotification adds a new notification

func (*Client) AddProvisionWatcher

func (c *Client) AddProvisionWatcher(pw model.ProvisionWatcher) (model.ProvisionWatcher, errors.EdgeX)

AddProvisionWatcher adds a new provision watcher

func (*Client) AddRegistration

func (c *Client) AddRegistration(r model.Registration) (model.Registration, errors.EdgeX)

func (*Client) AddSubscription

func (c *Client) AddSubscription(subscription model.Subscription) (model.Subscription, errors.EdgeX)

AddSubscription adds a new subscription

func (*Client) AddTransmission

func (c *Client) AddTransmission(t model.Transmission) (model.Transmission, errors.EdgeX)

AddTransmission adds a new transmission

func (*Client) AllDeviceProfiles

func (c *Client) AllDeviceProfiles(offset int, limit int, labels []string) ([]model.DeviceProfile, errors.EdgeX)

AllDeviceProfiles query device profiles with offset and limit

func (*Client) AllDeviceServices

func (c *Client) AllDeviceServices(offset int, limit int, labels []string) (deviceServices []model.DeviceService, edgeXerr errors.EdgeX)

AllDeviceServices returns multiple device services per query criteria, including offset: the number of items to skip before starting to collect the result set limit: The numbers of items to return labels: allows for querying a given object by associated user-defined labels

func (*Client) AllDevices

func (c *Client) AllDevices(offset int, limit int, labels []string) ([]model.Device, errors.EdgeX)

AllDevices query the devices with offset, limit, and labels

func (*Client) AllEvents

func (c *Client) AllEvents(offset int, limit int) ([]model.Event, errors.EdgeX)

AllEvents query events by offset and limit

func (*Client) AllProvisionWatchers

func (c *Client) AllProvisionWatchers(offset int, limit int, labels []string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)

AllProvisionWatchers query provision watchers with offset, limit and labels

func (*Client) AllReadings

func (c *Client) AllReadings(offset int, limit int) ([]model.Reading, errors.EdgeX)

AllReadings query events by offset, limit, and labels

func (*Client) AllSubscriptions

func (c *Client) AllSubscriptions(offset int, limit int) ([]model.Subscription, errors.EdgeX)

AllSubscriptions returns multiple subscriptions per query criteria, including offset: The number of items to skip before starting to collect the result set. limit: The maximum number of items to return.

func (*Client) AllTransmissions

func (c *Client) AllTransmissions(offset int, limit int) ([]model.Transmission, errors.EdgeX)

AllTransmissions returns multiple transmissions per query criteria, including offset: The number of items to skip before starting to collect the result set. limit: The maximum number of items to return.

func (*Client) CleanupNotificationsByAge

func (c *Client) CleanupNotificationsByAge(age int64) (err errors.EdgeX)

CleanupNotificationsByAge deletes notifications and their corresponding transmissions that are older than age. This function is implemented to starts up two goroutines to delete transmissions and notifications in the background to achieve better performance.

func (*Client) DeleteDeviceById

func (c *Client) DeleteDeviceById(id string) errors.EdgeX

DeleteDeviceById deletes a device by id

func (*Client) DeleteDeviceByName

func (c *Client) DeleteDeviceByName(name string) errors.EdgeX

DeleteDeviceByName deletes a device by name

func (*Client) DeleteDeviceProfileById

func (c *Client) DeleteDeviceProfileById(id string) errors.EdgeX

DeleteDeviceProfileById deletes a device profile by id

func (*Client) DeleteDeviceProfileByName

func (c *Client) DeleteDeviceProfileByName(name string) errors.EdgeX

DeleteDeviceProfileByName deletes a device profile by name

func (*Client) DeleteDeviceServiceById

func (c *Client) DeleteDeviceServiceById(id string) errors.EdgeX

DeleteDeviceServiceById deletes a device service by id

func (*Client) DeleteDeviceServiceByName

func (c *Client) DeleteDeviceServiceByName(name string) errors.EdgeX

DeleteDeviceServiceByName deletes a device service by name

func (*Client) DeleteEventById

func (c *Client) DeleteEventById(id string) (edgeXerr errors.EdgeX)

DeleteEventById removes an event by id

func (*Client) DeleteEventsByAge

func (c *Client) DeleteEventsByAge(age int64) (edgeXerr errors.EdgeX)

DeleteEventsByAge deletes events and their corresponding readings that are older than age. This function is implemented to starts up two goroutines to delete readings and events in the background to achieve better performance.

func (*Client) DeleteEventsByDeviceName

func (c *Client) DeleteEventsByDeviceName(deviceName string) (edgeXerr errors.EdgeX)

DeleteEventsByDeviceName deletes specific device's events and corresponding readings. This function is implemented to starts up two goroutines to delete readings and events in the background to achieve better performance.

func (*Client) DeleteKeeperKeys

func (c *Client) DeleteKeeperKeys(key string, prefixMatch bool) (kvs []model.KeyOnly, edgeXerr errors.EdgeX)

DeleteKeeperKeys delete the specified key or keys with the same prefix

func (*Client) DeleteNotificationById

func (c *Client) DeleteNotificationById(id string) errors.EdgeX

DeleteNotificationById deletes a notification by id

func (*Client) DeleteProcessedNotificationsByAge

func (c *Client) DeleteProcessedNotificationsByAge(age int64) (err errors.EdgeX)

DeleteProcessedNotificationsByAge deletes processed notifications and their corresponding transmissions that are older than age. This function is implemented to starts up two goroutines to delete transmissions and notifications in the background to achieve better performance.

func (*Client) DeleteProcessedTransmissionsByAge

func (c *Client) DeleteProcessedTransmissionsByAge(age int64) (err errors.EdgeX)

DeleteProcessedTransmissionsByAge deletes the processed transmissions((ACKNOWLEDGED, SENT, ESCALATED) that are older than age. This function is implemented to starts up goroutines to delete processed transmissions in the background to achieve better performance.

func (*Client) DeleteProvisionWatcherByName

func (c *Client) DeleteProvisionWatcherByName(name string) errors.EdgeX

DeleteProvisionWatcherByName deletes a provision watcher by name

func (*Client) DeleteRegistrationByServiceId

func (c *Client) DeleteRegistrationByServiceId(id string) errors.EdgeX

func (*Client) DeleteSubscriptionByName

func (c *Client) DeleteSubscriptionByName(name string) errors.EdgeX

DeleteSubscriptionByName deletes a subscription by name

func (*Client) DeviceById

func (c *Client) DeviceById(id string) (device model.Device, edgeXerr errors.EdgeX)

DeviceById gets a device by id

func (*Client) DeviceByName

func (c *Client) DeviceByName(name string) (device model.Device, edgeXerr errors.EdgeX)

DeviceByName gets a device by name

func (*Client) DeviceCountByLabels

func (c *Client) DeviceCountByLabels(labels []string) (uint32, errors.EdgeX)

DeviceCountByLabels returns the total count of Devices with labels specified. If no label is specified, the total count of all devices will be returned.

func (*Client) DeviceCountByProfileName

func (c *Client) DeviceCountByProfileName(profileName string) (uint32, errors.EdgeX)

DeviceCountByProfileName returns the count of Devices associated with specified profile

func (*Client) DeviceCountByServiceName

func (c *Client) DeviceCountByServiceName(serviceName string) (uint32, errors.EdgeX)

DeviceCountByServiceName returns the count of Devices associated with specified service

func (*Client) DeviceIdExists

func (c *Client) DeviceIdExists(id string) (bool, errors.EdgeX)

DeviceIdExists checks the device existence by id

func (*Client) DeviceNameExists

func (c *Client) DeviceNameExists(name string) (bool, errors.EdgeX)

DeviceNameExists checks the device existence by name

func (*Client) DeviceProfileById

func (c *Client) DeviceProfileById(id string) (deviceProfile model.DeviceProfile, err errors.EdgeX)

DeviceProfileById gets a device profile by id

func (*Client) DeviceProfileByName

func (c *Client) DeviceProfileByName(name string) (deviceProfile model.DeviceProfile, edgeXerr errors.EdgeX)

DeviceProfileByName gets a device profile by name

func (*Client) DeviceProfileCountByLabels

func (c *Client) DeviceProfileCountByLabels(labels []string) (uint32, errors.EdgeX)

DeviceProfileCountByLabels returns the total count of Device Profiles with labels specified. If no label is specified, the total count of all device profiles will be returned.

func (*Client) DeviceProfileCountByManufacturer

func (c *Client) DeviceProfileCountByManufacturer(manufacturer string) (uint32, errors.EdgeX)

DeviceProfileCountByManufacturer returns the count of Device Profiles associated with specified manufacturer

func (*Client) DeviceProfileCountByManufacturerAndModel

func (c *Client) DeviceProfileCountByManufacturerAndModel(manufacturer, model string) (uint32, errors.EdgeX)

DeviceProfileCountByManufacturerAndModel returns the count of Device Profiles associated with specified manufacturer and model

func (*Client) DeviceProfileCountByModel

func (c *Client) DeviceProfileCountByModel(model string) (uint32, errors.EdgeX)

DeviceProfileCountByModel returns the count of Device Profiles associated with specified model

func (*Client) DeviceProfileNameExists

func (c *Client) DeviceProfileNameExists(name string) (bool, errors.EdgeX)

DeviceProfileNameExists checks the device profile exists by name

func (*Client) DeviceProfilesByManufacturer

func (c *Client) DeviceProfilesByManufacturer(offset int, limit int, manufacturer string) ([]model.DeviceProfile, errors.EdgeX)

DeviceProfilesByManufacturer query device profiles with offset, limit and manufacturer

func (*Client) DeviceProfilesByManufacturerAndModel

func (c *Client) DeviceProfilesByManufacturerAndModel(offset int, limit int, manufacturer string, model string) ([]model.DeviceProfile, errors.EdgeX)

DeviceProfilesByManufacturerAndModel query device profiles with offset, limit, manufacturer and model

func (*Client) DeviceProfilesByModel

func (c *Client) DeviceProfilesByModel(offset int, limit int, model string) ([]model.DeviceProfile, errors.EdgeX)

DeviceProfilesByModel query device profiles with offset, limit and model

func (*Client) DeviceServiceById

func (c *Client) DeviceServiceById(id string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)

DeviceServiceById gets a device service by id

func (*Client) DeviceServiceByName

func (c *Client) DeviceServiceByName(name string) (deviceService model.DeviceService, edgeXerr errors.EdgeX)

DeviceServiceByName gets a device service by name

func (*Client) DeviceServiceCountByLabels

func (c *Client) DeviceServiceCountByLabels(labels []string) (uint32, errors.EdgeX)

DeviceServiceCountByLabels returns the total count of Device Services with labels specified. If no label is specified, the total count of all device services will be returned.

func (*Client) DeviceServiceNameExists

func (c *Client) DeviceServiceNameExists(name string) (bool, errors.EdgeX)

DeviceServiceNameExists checks the device service exists by name

func (*Client) DevicesByProfileName

func (c *Client) DevicesByProfileName(offset int, limit int, profileName string) (devices []model.Device, edgeXerr errors.EdgeX)

DevicesByProfileName query devices by offset, limit and profile name

func (*Client) DevicesByServiceName

func (c *Client) DevicesByServiceName(offset int, limit int, name string) (devices []model.Device, edgeXerr errors.EdgeX)

DevicesByServiceName query devices by offset, limit and name

func (*Client) EventById

func (c *Client) EventById(id string) (event model.Event, edgeXerr errors.EdgeX)

EventById gets an event by id

func (*Client) EventCountByDeviceName

func (c *Client) EventCountByDeviceName(deviceName string) (uint32, errors.EdgeX)

EventCountByDeviceName returns the count of Event associated a specific Device from the database

func (*Client) EventCountByTimeRange

func (c *Client) EventCountByTimeRange(startTime int64, endTime int64) (uint32, errors.EdgeX)

EventCountByTimeRange returns the count of Event by time range

func (*Client) EventTotalCount

func (c *Client) EventTotalCount() (uint32, errors.EdgeX)

EventTotalCount returns the total count of Event from the database

func (*Client) EventsByDeviceName

func (c *Client) EventsByDeviceName(offset int, limit int, name string) (events []model.Event, edgeXerr errors.EdgeX)

EventsByDeviceName query events by offset, limit and device name

func (*Client) EventsByTimeRange

func (c *Client) EventsByTimeRange(startTime int64, endTime int64, offset int, limit int) (events []model.Event, edgeXerr errors.EdgeX)

EventsByTimeRange query events by time range, offset, and limit

func (*Client) KeeperKeys

func (c *Client) KeeperKeys(key string, keyOnly bool, isRaw bool) (kvs []model.KVResponse, edgeXerr errors.EdgeX)

KeeperKeys returns the values stored for the specified key or with the same key prefix

func (*Client) LatestNotificationByOffset

func (c *Client) LatestNotificationByOffset(offset uint32) (model.Notification, errors.EdgeX)

LatestNotificationByOffset returns a latest notification by offset

func (*Client) LatestReadingByOffset

func (c *Client) LatestReadingByOffset(offset uint32) (model.Reading, errors.EdgeX)

LatestReadingByOffset returns a latest reading by offset

func (*Client) NotificationById

func (c *Client) NotificationById(id string) (notification model.Notification, edgexErr errors.EdgeX)

NotificationById gets a notification by id

func (*Client) NotificationCountByCategoriesAndLabels

func (c *Client) NotificationCountByCategoriesAndLabels(categories []string, labels []string) (uint32, errors.EdgeX)

NotificationCountByCategoriesAndLabels returns the count of Notification associated with specified categories and labels from the database

func (*Client) NotificationCountByCategory

func (c *Client) NotificationCountByCategory(category string) (uint32, errors.EdgeX)

NotificationCountByCategory returns the count of Notification associated with specified category from the database

func (*Client) NotificationCountByLabel

func (c *Client) NotificationCountByLabel(label string) (uint32, errors.EdgeX)

NotificationCountByLabel returns the count of Notification associated with specified label from the database

func (*Client) NotificationCountByStatus

func (c *Client) NotificationCountByStatus(status string) (uint32, errors.EdgeX)

NotificationCountByStatus returns the count of Notification associated with specified status from the database

func (*Client) NotificationCountByTimeRange

func (c *Client) NotificationCountByTimeRange(start int64, end int64) (uint32, errors.EdgeX)

NotificationCountByTimeRange returns the count of Notification from the database within specified time range

func (*Client) NotificationTotalCount

func (c *Client) NotificationTotalCount() (uint32, errors.EdgeX)

NotificationTotalCount returns the total count of Notification from the database

func (*Client) NotificationsByCategoriesAndLabels

func (c *Client) NotificationsByCategoriesAndLabels(offset int, limit int, categories []string, labels []string) (notifications []model.Notification, edgeXerr errors.EdgeX)

NotificationsByCategoriesAndLabels queries notifications by offset, limit, categories and labels

func (*Client) NotificationsByCategory

func (c *Client) NotificationsByCategory(offset int, limit int, category string) (notifications []model.Notification, edgeXerr errors.EdgeX)

NotificationsByCategory queries notifications by offset, limit and category

func (*Client) NotificationsByLabel

func (c *Client) NotificationsByLabel(offset int, limit int, label string) (notifications []model.Notification, edgeXerr errors.EdgeX)

NotificationsByLabel queries notifications by offset, limit and label

func (*Client) NotificationsByStatus

func (c *Client) NotificationsByStatus(offset int, limit int, status string) (notifications []model.Notification, edgeXerr errors.EdgeX)

NotificationsByStatus queries notifications by offset, limit and status

func (*Client) NotificationsByTimeRange

func (c *Client) NotificationsByTimeRange(start int64, end int64, offset int, limit int) (notifications []model.Notification, edgeXerr errors.EdgeX)

NotificationsByTimeRange query notifications by time range, offset, and limit

func (*Client) ProvisionWatcherById

func (c *Client) ProvisionWatcherById(id string) (provisionWatcher model.ProvisionWatcher, edgexErr errors.EdgeX)

ProvisionWatcherById gets a provision watcher by id

func (*Client) ProvisionWatcherByName

func (c *Client) ProvisionWatcherByName(name string) (provisionWatcher model.ProvisionWatcher, edgexErr errors.EdgeX)

ProvisionWatcherByName gets a provision watcher by name

func (*Client) ProvisionWatcherCountByLabels

func (c *Client) ProvisionWatcherCountByLabels(labels []string) (uint32, errors.EdgeX)

ProvisionWatcherCountByLabels returns the total count of Provision Watchers with labels specified. If no label is specified, the total count of all provision watchers will be returned.

func (*Client) ProvisionWatcherCountByProfileName

func (c *Client) ProvisionWatcherCountByProfileName(name string) (uint32, errors.EdgeX)

ProvisionWatcherCountByProfileName returns the count of Provision Watcher associated with specified profile

func (*Client) ProvisionWatcherCountByServiceName

func (c *Client) ProvisionWatcherCountByServiceName(name string) (uint32, errors.EdgeX)

ProvisionWatcherCountByServiceName returns the count of Provision Watcher associated with specified service

func (*Client) ProvisionWatchersByProfileName

func (c *Client) ProvisionWatchersByProfileName(offset int, limit int, name string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)

ProvisionWatchersByProfileName query provision watchers by offset, limit and profile name

func (*Client) ProvisionWatchersByServiceName

func (c *Client) ProvisionWatchersByServiceName(offset int, limit int, name string) (provisionWatchers []model.ProvisionWatcher, edgexErr errors.EdgeX)

ProvisionWatchersByServiceName query provision watchers by offset, limit and service name

func (*Client) ReadingCountByDeviceName

func (c *Client) ReadingCountByDeviceName(deviceName string) (uint32, errors.EdgeX)

ReadingCountByDeviceName returns the count of Readings associated a specific Device from the database

func (*Client) ReadingCountByDeviceNameAndResourceName

func (c *Client) ReadingCountByDeviceNameAndResourceName(deviceName string, resourceName string) (uint32, errors.EdgeX)

ReadingCountByDeviceNameAndResourceName returns the count of Readings associated with specified Resource and Device from the database

func (*Client) ReadingCountByDeviceNameAndResourceNameAndTimeRange

func (c *Client) ReadingCountByDeviceNameAndResourceNameAndTimeRange(deviceName string, resourceName string, start int64, end int64) (uint32, errors.EdgeX)

ReadingCountByDeviceNameAndResourceNameAndTimeRange returns the count of Readings associated with specified Resource and Device from the database within specified time range

func (*Client) ReadingCountByDeviceNameAndResourceNamesAndTimeRange

func (c *Client) ReadingCountByDeviceNameAndResourceNamesAndTimeRange(deviceName string, resourceNames []string, start int64, end int64) (uint32, errors.EdgeX)

ReadingCountByDeviceNameAndResourceNamesAndTimeRange returns the count of readings by origin within the time range associated with the specified device and resourceName slice from db

func (*Client) ReadingCountByDeviceNameAndTimeRange

func (c *Client) ReadingCountByDeviceNameAndTimeRange(deviceName string, start int64, end int64) (uint32, errors.EdgeX)

func (*Client) ReadingCountByResourceName

func (c *Client) ReadingCountByResourceName(resourceName string) (uint32, errors.EdgeX)

ReadingCountByResourceName returns the count of Readings associated a specific Resource from the database

func (*Client) ReadingCountByResourceNameAndTimeRange

func (c *Client) ReadingCountByResourceNameAndTimeRange(resourceName string, startTime int64, endTime int64) (uint32, errors.EdgeX)

ReadingCountByResourceNameAndTimeRange returns the count of Readings associated a specific Resource from the database within specified time range

func (*Client) ReadingCountByTimeRange

func (c *Client) ReadingCountByTimeRange(start int64, end int64) (uint32, errors.EdgeX)

ReadingCountByTimeRange returns the count of Readings from the database within specified time range

func (*Client) ReadingTotalCount

func (c *Client) ReadingTotalCount() (uint32, errors.EdgeX)

ReadingTotalCount returns the total count of Event from the database

func (*Client) ReadingsByDeviceName

func (c *Client) ReadingsByDeviceName(offset int, limit int, name string) (readings []model.Reading, edgeXerr errors.EdgeX)

ReadingsByDeviceName query readings by offset, limit and device name

func (*Client) ReadingsByDeviceNameAndResourceName

func (c *Client) ReadingsByDeviceNameAndResourceName(deviceName string, resourceName string, offset int, limit int) (readings []model.Reading, err errors.EdgeX)

func (*Client) ReadingsByDeviceNameAndResourceNameAndTimeRange

func (c *Client) ReadingsByDeviceNameAndResourceNameAndTimeRange(deviceName string, resourceName string, start int64, end int64, offset int, limit int) (readings []model.Reading, err errors.EdgeX)

func (*Client) ReadingsByDeviceNameAndResourceNamesAndTimeRange

func (c *Client) ReadingsByDeviceNameAndResourceNamesAndTimeRange(deviceName string, resourceNames []string, start, end int64, offset, limit int) (readings []model.Reading, err errors.EdgeX)

func (*Client) ReadingsByDeviceNameAndTimeRange

func (c *Client) ReadingsByDeviceNameAndTimeRange(deviceName string, start int64, end int64, offset int, limit int) (readings []model.Reading, err errors.EdgeX)

func (*Client) ReadingsByResourceName

func (c *Client) ReadingsByResourceName(offset int, limit int, resourceName string) (readings []model.Reading, edgeXerr errors.EdgeX)

ReadingsByResourceName query readings by offset, limit and resource name

func (*Client) ReadingsByResourceNameAndTimeRange

func (c *Client) ReadingsByResourceNameAndTimeRange(resourceName string, start int64, end int64, offset int, limit int) (readings []model.Reading, err errors.EdgeX)

ReadingsByResourceNameAndTimeRange query readings by resourceName and specified time range. Readings are sorted in descending order of origin time.

func (*Client) ReadingsByTimeRange

func (c *Client) ReadingsByTimeRange(start int64, end int64, offset int, limit int) (readings []model.Reading, edgeXerr errors.EdgeX)

ReadingsByTimeRange query readings by time range, offset, and limit

func (*Client) RegistrationByServiceId

func (c *Client) RegistrationByServiceId(id string) (model.Registration, errors.EdgeX)

func (*Client) Registrations

func (c *Client) Registrations() ([]model.Registration, errors.EdgeX)

func (*Client) SubscriptionById

func (c *Client) SubscriptionById(id string) (subscription model.Subscription, edgexErr errors.EdgeX)

SubscriptionById gets a subscription by id

func (*Client) SubscriptionByName

func (c *Client) SubscriptionByName(name string) (subscription model.Subscription, edgeXerr errors.EdgeX)

SubscriptionByName queries subscription by name

func (*Client) SubscriptionCountByCategory

func (c *Client) SubscriptionCountByCategory(category string) (uint32, errors.EdgeX)

SubscriptionCountByCategory returns the count of Subscription associated with specified category from the database

func (*Client) SubscriptionCountByLabel

func (c *Client) SubscriptionCountByLabel(label string) (uint32, errors.EdgeX)

SubscriptionCountByLabel returns the count of Subscription associated with specified label from the database

func (*Client) SubscriptionCountByReceiver

func (c *Client) SubscriptionCountByReceiver(receiver string) (uint32, errors.EdgeX)

SubscriptionCountByReceiver returns the count of Subscription associated with specified receiver from the database

func (*Client) SubscriptionTotalCount

func (c *Client) SubscriptionTotalCount() (uint32, errors.EdgeX)

SubscriptionTotalCount returns the total count of Subscription from the database

func (*Client) SubscriptionsByCategoriesAndLabels

func (c *Client) SubscriptionsByCategoriesAndLabels(offset int, limit int, categories []string, labels []string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)

SubscriptionsByCategoriesAndLabels queries subscriptions by offset, limit, categories and labels

func (*Client) SubscriptionsByCategory

func (c *Client) SubscriptionsByCategory(offset int, limit int, category string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)

SubscriptionsByCategory queries subscriptions by offset, limit and category

func (*Client) SubscriptionsByLabel

func (c *Client) SubscriptionsByLabel(offset int, limit int, label string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)

SubscriptionsByLabel queries subscriptions by offset, limit and label

func (*Client) SubscriptionsByReceiver

func (c *Client) SubscriptionsByReceiver(offset int, limit int, receiver string) (subscriptions []model.Subscription, edgeXerr errors.EdgeX)

SubscriptionsByReceiver queries subscriptions by offset, limit and receiver

func (*Client) TransmissionById

func (c *Client) TransmissionById(id string) (trans model.Transmission, edgexErr errors.EdgeX)

TransmissionById gets a transmission by id

func (*Client) TransmissionCountByNotificationId

func (c *Client) TransmissionCountByNotificationId(id string) (uint32, errors.EdgeX)

TransmissionCountByNotificationId returns the count of Transmission associated with specified notification id from the database

func (*Client) TransmissionCountByStatus

func (c *Client) TransmissionCountByStatus(status string) (uint32, errors.EdgeX)

TransmissionCountByStatus returns the count of Transmission associated with specified status name from the database

func (*Client) TransmissionCountBySubscriptionName

func (c *Client) TransmissionCountBySubscriptionName(subscriptionName string) (uint32, errors.EdgeX)

TransmissionCountBySubscriptionName returns the count of Transmission associated with specified subscription name from the database

func (*Client) TransmissionCountByTimeRange

func (c *Client) TransmissionCountByTimeRange(start int64, end int64) (uint32, errors.EdgeX)

TransmissionCountByTimeRange returns the count of Transmission from the database within specified time range

func (*Client) TransmissionTotalCount

func (c *Client) TransmissionTotalCount() (uint32, errors.EdgeX)

TransmissionTotalCount returns the total count of Transmission from the database

func (*Client) TransmissionsByNotificationId

func (c *Client) TransmissionsByNotificationId(offset int, limit int, id string) (transmissions []model.Transmission, err errors.EdgeX)

TransmissionsByNotificationId queries transmissions by offset, limit and notification id

func (*Client) TransmissionsByStatus

func (c *Client) TransmissionsByStatus(offset int, limit int, status string) (transmissions []model.Transmission, err errors.EdgeX)

TransmissionsByStatus queries transmissions by offset, limit and status

func (*Client) TransmissionsBySubscriptionName

func (c *Client) TransmissionsBySubscriptionName(offset int, limit int, subscriptionName string) (transmissions []model.Transmission, err errors.EdgeX)

TransmissionsBySubscriptionName queries transmissions by offset, limit and subscription name

func (*Client) TransmissionsByTimeRange

func (c *Client) TransmissionsByTimeRange(start int64, end int64, offset int, limit int) (transmissions []model.Transmission, err errors.EdgeX)

TransmissionsByTimeRange query transmissions by time range, offset, and limit

func (*Client) UpdateDevice

func (c *Client) UpdateDevice(d model.Device) errors.EdgeX

Update a device

func (*Client) UpdateDeviceProfile

func (c *Client) UpdateDeviceProfile(dp model.DeviceProfile) errors.EdgeX

UpdateDeviceProfile updates a new device profile

func (*Client) UpdateDeviceService

func (c *Client) UpdateDeviceService(ds model.DeviceService) errors.EdgeX

UpdateDeviceService updates a device service

func (*Client) UpdateNotification

func (c *Client) UpdateNotification(n model.Notification) errors.EdgeX

UpdateNotification updates a notification

func (*Client) UpdateProvisionWatcher

func (c *Client) UpdateProvisionWatcher(pw model.ProvisionWatcher) errors.EdgeX

Update a provision watcher

func (*Client) UpdateRegistration

func (c *Client) UpdateRegistration(r model.Registration) errors.EdgeX

func (*Client) UpdateSubscription

func (c *Client) UpdateSubscription(subscription model.Subscription) errors.EdgeX

UpdateSubscription updates a new subscription

func (*Client) UpdateTransmission

func (c *Client) UpdateTransmission(trans model.Transmission) errors.EdgeX

UpdateTransmission updates a transmission

Jump to

Keyboard shortcuts

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