Documentation
¶
Index ¶
- Variables
- type Entry
- type LocalCache
- type RemoteCache
- func (this *RemoteCache) GetConcept(conceptId string) (concept models.Concept, err error)
- func (this *RemoteCache) GetDevice(deviceId string, token string) (device models.Device, err error)
- func (this *RemoteCache) GetDeviceGroup(deviceGroupId string, token string) (deviceGroup models.DeviceGroup, err error)
- func (this *RemoteCache) GetFunction(functionId string) (function models.Function, err error)
- func (lv *RemoteCache) GetLastValuesFromCache(request model.QueriesRequestElement, forceTZ *string) ([][]interface{}, error)
- func (this *RemoteCache) GetLocation(locationId string, token string) (location models.Location, err error)
- func (this *RemoteCache) GetSecretQuery(secret string) (query model.PreparedQueriesRequestElement, err error)
- func (this *RemoteCache) GetSelectables(userid string, token string, criteria []models.DeviceGroupFilterCriteria, ...) (res []dsmodel.Selectable, code int, err error)
- func (this *RemoteCache) GetService(serviceId string) (service models.Service, err error)
- func (this *RemoteCache) StoreSecretQuery(query model.PreparedQueriesRequestElement) (secret string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not found in cache")
View Source
var LocalCacheExpirationInSec = 600 // 10 min
View Source
var LocalCacheSize = 10 * 1024 * 1024 // 10 0MB
View Source
var NotCachableError = errors.New("not cachable")
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewLocal ¶
func NewLocal() *LocalCache
func (*LocalCache) Set ¶
func (this *LocalCache) Set(key string, value []byte)
type RemoteCache ¶
type RemoteCache struct {
// contains filtered or unexported fields
}
func NewRemote ¶
func NewRemote(config configuration.Config, deviceRepo api.Controller, deviceSelection deviceSelection.Client) *RemoteCache
func (*RemoteCache) GetConcept ¶
func (this *RemoteCache) GetConcept(conceptId string) (concept models.Concept, err error)
func (*RemoteCache) GetDeviceGroup ¶ added in v0.0.2
func (this *RemoteCache) GetDeviceGroup(deviceGroupId string, token string) (deviceGroup models.DeviceGroup, err error)
func (*RemoteCache) GetFunction ¶ added in v0.0.2
func (this *RemoteCache) GetFunction(functionId string) (function models.Function, err error)
func (*RemoteCache) GetLastValuesFromCache ¶
func (lv *RemoteCache) GetLastValuesFromCache(request model.QueriesRequestElement, forceTZ *string) ([][]interface{}, error)
func (*RemoteCache) GetLocation ¶ added in v0.0.17
func (*RemoteCache) GetSecretQuery ¶
func (this *RemoteCache) GetSecretQuery(secret string) (query model.PreparedQueriesRequestElement, err error)
func (*RemoteCache) GetSelectables ¶ added in v0.0.2
func (this *RemoteCache) GetSelectables(userid string, token string, criteria []models.DeviceGroupFilterCriteria, options *deviceSelection.GetSelectablesOptions) (res []dsmodel.Selectable, code int, err error)
func (*RemoteCache) GetService ¶
func (this *RemoteCache) GetService(serviceId string) (service models.Service, err error)
func (*RemoteCache) StoreSecretQuery ¶
func (this *RemoteCache) StoreSecretQuery(query model.PreparedQueriesRequestElement) (secret string, err error)
Click to show internal directories.
Click to hide internal directories.