summaryrefslogtreecommitdiff
path: root/src/leap/soledad/server/interfaces.py
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-07-13 02:02:39 -0300
committerdrebs <drebs@leap.se>2017-07-21 10:58:47 -0300
commit5d521e5a1c5fdd4cf926062dc26147dbcd110b05 (patch)
tree97a2e5e7bb20c3b01e89ca5ab79cc1cc124502e9 /src/leap/soledad/server/interfaces.py
parent64107009a869a6ddb6cea129e65735d9740e697b (diff)
[feature] add possibility to count on blob manager
By using `only_count=True` parameter, instead of returning a full list, server just count the amount of blobs. -- Resolves: #8871
Diffstat (limited to 'src/leap/soledad/server/interfaces.py')
-rw-r--r--src/leap/soledad/server/interfaces.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/soledad/server/interfaces.py b/src/leap/soledad/server/interfaces.py
index ee73aac8..1f97624b 100644
--- a/src/leap/soledad/server/interfaces.py
+++ b/src/leap/soledad/server/interfaces.py
@@ -49,6 +49,11 @@ class IBlobsBackend(Interface):
Get the size of the given blob id.
"""
+ def count(user, request, namespace=''):
+ """
+ Counts the total number of blobs.
+ """
+
def list_blobs(user, request, namespace='', order_by=None):
"""
Returns a json-encoded list of ids from user's blobs storage,