summaryrefslogtreecommitdiff
path: root/src/leap/soledad/server/interfaces.py
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-06-26 05:25:55 -0300
committerVictor Shyba <victor1984@riseup.net>2017-07-02 01:40:32 -0300
commitab297c4efe10c70949fac5384a63cbf553ba5da9 (patch)
tree43e0dea081dc38440bd18f90f7910762a1c8fd46 /src/leap/soledad/server/interfaces.py
parentb672d210fb34013a7c1b9c663eaa6afecbfacd80 (diff)
[feature] namespace capability to BlobsBackend
Adds an extra parameter called "namespace" on the backend interface and on FileSystemBlobsBackend. This parameter overrides default id partitioning and uses a separate folder for a custom namespace. -- Resolves: #8889
Diffstat (limited to 'src/leap/soledad/server/interfaces.py')
-rw-r--r--src/leap/soledad/server/interfaces.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/soledad/server/interfaces.py b/src/leap/soledad/server/interfaces.py
index 67b04bc3..ccb2ffdc 100644
--- a/src/leap/soledad/server/interfaces.py
+++ b/src/leap/soledad/server/interfaces.py
@@ -25,31 +25,31 @@ class IBlobsBackend(Interface):
An interface for a BlobsBackend.
"""
- def read_blob(user, blob_id, request):
+ def read_blob(user, blob_id, request, namespace=''):
"""
Read blob with a given blob_id, and write it to the passed request.
:returns: a deferred that fires upon finishing.
"""
- def write_blob(user, blob_id, request):
+ def write_blob(user, blob_id, request, namespace=''):
"""
Write blob to the storage, reading it from the passed request.
:returns: a deferred that fires upon finishing.
"""
- def delete_blob(user, blob_id):
+ def delete_blob(user, blob_id, namespace=''):
"""
Delete the given blob_id.
"""
- def get_blob_size(user, blob_id):
+ def get_blob_size(user, blob_id, namespace=''):
"""
Get the size of the given blob id.
"""
- def list_blobs(user, request):
+ def list_blobs(user, request, namespace=''):
"""
Returns a json-encoded list of ids from user's blob.
@@ -62,7 +62,7 @@ class IBlobsBackend(Interface):
unders its namespace.
"""
- def add_tag_header(user, blob_id, request):
+ def add_tag_header(user, blob_id, request, namespace=''):
"""
Adds a header 'Tag' to the passed request object, containing the last
16 bytes of the encoded blob, which according to the spec contains the