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

View File

@ -5,7 +5,7 @@ from cartodb_services.refactor.storage.redis_config import RedisOrgConfigStorage
class OrgConfigBackendFactory(object):
"""
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.
"""

View File

@ -5,7 +5,7 @@ from cartodb_services.refactor.storage.redis_config import RedisUserConfigStorag
class UserConfigBackendFactory(object):
"""
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.
"""

View File

@ -1,7 +1,7 @@
import abc
class ConfigStorageInterface(object):
"""This is an interface that all config storages must abide to"""
class ConfigBackendInterface(object):
"""This is an interface that all config backends must abide to"""
__metaclass__ = abc.ABCMeta

View File

@ -1,6 +1,6 @@
from interfaces import ConfigStorageInterface
from ..core.interfaces import ConfigBackendInterface
class InMemoryConfigStorage(ConfigStorageInterface):
class InMemoryConfigStorage(ConfigBackendInterface):
def __init__(self, config_hash={}):
self._config_hash = config_hash

View File

@ -1,6 +1,6 @@
from interfaces import ConfigStorageInterface
from ..core.interfaces import ConfigBackendInterface
class NullConfigStorage(ConfigStorageInterface):
class NullConfigStorage(ConfigBackendInterface):
def get(self, key):
return None

View File

@ -1,8 +1,8 @@
from interfaces import ConfigStorageInterface
from ..core.interfaces import ConfigBackendInterface
from null_config import NullConfigStorage
class RedisConfigStorage(ConfigStorageInterface):
class RedisConfigStorage(ConfigBackendInterface):
def __init__(self, connection, config_key):
self._connection = connection

View File

@ -1,8 +1,8 @@
import json
import cartodb_services
from interfaces import ConfigStorageInterface
from ..core.interfaces import ConfigBackendInterface
class InDbServerConfigStorage(ConfigStorageInterface):
class InDbServerConfigStorage(ConfigBackendInterface):
def get(self, key):
sql = "SELECT cdb_dataservices_server.cdb_conf_getconf('{0}') as conf".format(key)