ApierV2.GetAccounts

This commit is contained in:
DanB
2015-02-06 13:24:51 +01:00
parent 8576d8f6fc
commit ff68023ca5
5 changed files with 185 additions and 13 deletions

View File

@@ -52,8 +52,14 @@ func (ms *MapStorage) Flush(ignore string) error {
return nil
}
func (ms *MapStorage) GetKeysForPrefix(string) ([]string, error) {
return nil, nil
func (ms *MapStorage) GetKeysForPrefix(prefix string) ([]string, error) {
keysForPrefix := make([]string, 0)
for key := range ms.dict {
if strings.HasPrefix(key, prefix) {
keysForPrefix = append(keysForPrefix, key)
}
}
return keysForPrefix, nil
}
func (ms *MapStorage) CacheRating(dKeys, rpKeys, rpfKeys, alsKeys, lcrKeys []string) error {