Rename ConfigStorageInterface to ConfigBackendInterface

This commit is contained in:
Rafa de la Torre
2016-10-03 17:35:33 +02:00
parent 0d87a95270
commit 12aebb7eee
7 changed files with 12 additions and 12 deletions
@@ -5,7 +5,7 @@ from cartodb_services.refactor.storage.redis_config import RedisOrgConfigStorage
class OrgConfigBackendFactory(object): class OrgConfigBackendFactory(object):
""" """
This class abstracts the creation of an org configuration storage. It will return This class abstracts the creation of an org configuration storage. It will return
an implementation of the ConfigStorageInterface appropriate to the org, depending an implementation of the ConfigBackendInterface appropriate to the org, depending
on the environment. on the environment.
""" """
@@ -5,7 +5,7 @@ from cartodb_services.refactor.storage.redis_config import RedisUserConfigStorag
class UserConfigBackendFactory(object): class UserConfigBackendFactory(object):
""" """
This class abstracts the creation of a user configuration storage. It will return This class abstracts the creation of a user configuration storage. It will return
an implementation of the ConfigStorageInterface appropriate to the user, depending an implementation of the ConfigBackendInterface appropriate to the user, depending
on the environment. on the environment.
""" """
@@ -1,7 +1,7 @@
import abc import abc
class ConfigStorageInterface(object): class ConfigBackendInterface(object):
"""This is an interface that all config storages must abide to""" """This is an interface that all config backends must abide to"""
__metaclass__ = abc.ABCMeta __metaclass__ = abc.ABCMeta
@@ -1,6 +1,6 @@
from interfaces import ConfigStorageInterface from ..core.interfaces import ConfigBackendInterface
class InMemoryConfigStorage(ConfigStorageInterface): class InMemoryConfigStorage(ConfigBackendInterface):
def __init__(self, config_hash={}): def __init__(self, config_hash={}):
self._config_hash = config_hash self._config_hash = config_hash
@@ -1,6 +1,6 @@
from interfaces import ConfigStorageInterface from ..core.interfaces import ConfigBackendInterface
class NullConfigStorage(ConfigStorageInterface): class NullConfigStorage(ConfigBackendInterface):
def get(self, key): def get(self, key):
return None return None
@@ -1,8 +1,8 @@
from interfaces import ConfigStorageInterface from ..core.interfaces import ConfigBackendInterface
from null_config import NullConfigStorage from null_config import NullConfigStorage
class RedisConfigStorage(ConfigStorageInterface): class RedisConfigStorage(ConfigBackendInterface):
def __init__(self, connection, config_key): def __init__(self, connection, config_key):
self._connection = connection self._connection = connection
@@ -1,8 +1,8 @@
import json import json
import cartodb_services import cartodb_services
from interfaces import ConfigStorageInterface from ..core.interfaces import ConfigBackendInterface
class InDbServerConfigStorage(ConfigStorageInterface): class InDbServerConfigStorage(ConfigBackendInterface):
def get(self, key): def get(self, key):
sql = "SELECT cdb_dataservices_server.cdb_conf_getconf('{0}') as conf".format(key) sql = "SELECT cdb_dataservices_server.cdb_conf_getconf('{0}') as conf".format(key)