Rename ConfigStorageInterface to ConfigBackendInterface
This commit is contained in:
parent
0d87a95270
commit
12aebb7eee
@ -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.
|
||||
"""
|
||||
|
||||
|
@ -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.
|
||||
"""
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user