/
redis.go
51 lines (35 loc) · 2.13 KB
/
redis.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package defs
const (
// RedisDeviceIndexKey is the key used by the regis device registry to store device ids
RedisDeviceIndexKey = "beacon:device-index"
// RedisDeviceRegistryKey is the key used by the regis device registry to store device information
RedisDeviceRegistryKey = "beacon:device-registry"
// RedisDeviceFeedbackKey is the key used by the regis device registry to store device feedback
RedisDeviceFeedbackKey = "beacon:device-feedback"
// RedisRegistrationRequestListKey is the key used for registration requests
RedisRegistrationRequestListKey = "beacon:registration-requests"
// RedisDeviceIDField is the field that contains the unique id of the device
RedisDeviceIDField = "device:uuid"
// RedisDeviceNameField is the field that contains the unique name of the device
RedisDeviceNameField = "device:name"
// RedisDeviceTokenListKey is the field that contains the list of tokens associated w/ each device
RedisDeviceTokenListKey = "device:token-list"
// RedisDeviceTokenRegistrationKey field for device token information (name)
RedisDeviceTokenRegistrationKey = "device:token"
// RedisDeviceTokenNameField is the field that contains the unique name of the token
RedisDeviceTokenNameField = "device-token:name"
// RedisDeviceTokenDeviceIDField stores the token's device id
RedisDeviceTokenDeviceIDField = "device-token:device-id"
// RedisDeviceTokenIDField stores the unique id of the token
RedisDeviceTokenIDField = "device-token:uuid"
// RedisDeviceTokenPermissionField is the field that contains the permission of the token
RedisDeviceTokenPermissionField = "device-token:permission"
// RedisDeviceSecretField is the field that contains the unique secret of the device
RedisDeviceSecretField = "device:secret"
// RedisRegistrationNameField is the redis key used to store registration names
RedisRegistrationNameField = "registration:name"
// RedisRegistrationSecretField is the redis key used to store registration secrets
RedisRegistrationSecretField = "registration:secret"
// RedisMaxFeedbackEntries is the maximum amount of entries a device is allowed to have at any given time.
RedisMaxFeedbackEntries = 100
)