Documentation
¶
Index ¶
- func GetAllKeys(client *redis.Client) ([]string, *nerr.E)
- func MakeRedisCache(devices []sd.StaticDevice, rooms []sd.StaticRoom, pushCron string, ...) (shared.Cache, *nerr.E)
- type RedisCache
- func (rc *RedisCache) CheckAndStoreDevice(device sd.StaticDevice) (bool, sd.StaticDevice, *nerr.E)
- func (rc *RedisCache) CheckAndStoreRoom(room sd.StaticRoom) (bool, sd.StaticRoom, *nerr.E)
- func (rc *RedisCache) GetAllDeviceRecords() ([]sd.StaticDevice, *nerr.E)
- func (rc *RedisCache) GetAllRoomRecords() ([]sd.StaticRoom, *nerr.E)
- func (rc *RedisCache) GetCacheName() string
- func (rc *RedisCache) GetCacheType() string
- func (rc *RedisCache) GetDeviceRecord(deviceID string) (sd.StaticDevice, *nerr.E)
- func (rc *RedisCache) GetRoomRecord(roomID string) (sd.StaticRoom, *nerr.E)
- func (rc *RedisCache) NukeRoom(id string) ([]string, *nerr.E)
- func (rc *RedisCache) RemoveDevice(id string) *nerr.E
- func (rc *RedisCache) RemoveRoom(id string) *nerr.E
- func (rc *RedisCache) StoreAndForwardEvent(event events.Event) (bool, *nerr.E)
- func (rc *RedisCache) StoreDeviceEvent(toSave sd.State) (bool, sd.StaticDevice, *nerr.E)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRedisCache ¶
Types ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func (*RedisCache) CheckAndStoreDevice ¶
func (rc *RedisCache) CheckAndStoreDevice(device sd.StaticDevice) (bool, sd.StaticDevice, *nerr.E)
func (*RedisCache) CheckAndStoreRoom ¶
func (rc *RedisCache) CheckAndStoreRoom(room sd.StaticRoom) (bool, sd.StaticRoom, *nerr.E)
func (*RedisCache) GetAllDeviceRecords ¶
func (rc *RedisCache) GetAllDeviceRecords() ([]sd.StaticDevice, *nerr.E)
func (*RedisCache) GetAllRoomRecords ¶
func (rc *RedisCache) GetAllRoomRecords() ([]sd.StaticRoom, *nerr.E)
func (*RedisCache) GetCacheName ¶
func (rc *RedisCache) GetCacheName() string
func (*RedisCache) GetCacheType ¶
func (rc *RedisCache) GetCacheType() string
func (*RedisCache) GetDeviceRecord ¶
func (rc *RedisCache) GetDeviceRecord(deviceID string) (sd.StaticDevice, *nerr.E)
func (*RedisCache) GetRoomRecord ¶
func (rc *RedisCache) GetRoomRecord(roomID string) (sd.StaticRoom, *nerr.E)
func (*RedisCache) RemoveDevice ¶
func (rc *RedisCache) RemoveDevice(id string) *nerr.E
func (*RedisCache) RemoveRoom ¶
func (rc *RedisCache) RemoveRoom(id string) *nerr.E
func (*RedisCache) StoreAndForwardEvent ¶
func (*RedisCache) StoreDeviceEvent ¶
func (rc *RedisCache) StoreDeviceEvent(toSave sd.State) (bool, sd.StaticDevice, *nerr.E)
Click to show internal directories.
Click to hide internal directories.