Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | ) -> PagedResult[Content]: | ||||
Returns: | Returns: | ||||
PagedResult of Content model objects within the partition. If | PagedResult of Content model objects within the partition. If | ||||
next_page_token is None, there is no longer data to retrieve. | next_page_token is None, there is no longer data to retrieve. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("content/metadata") | @remote_api_endpoint("content/metadata") | ||||
def content_get(self, contents: List[Sha1]) -> List[Optional[Content]]: | def content_get( | ||||
self, contents: List[bytes], algo: str = "sha1" | |||||
) -> List[Optional[Content]]: | |||||
"""Retrieve content metadata in bulk | """Retrieve content metadata in bulk | ||||
Args: | Args: | ||||
content: List of content identifiers | content: List of content identifiers | ||||
algo: one of the checksum algorithm in | |||||
:data:`swh.model.hashutil.DEFAULT_ALGORITHMS` | |||||
Returns: | Returns: | ||||
List of contents model objects when they exist, None otherwise. | List of contents model objects when they exist, None otherwise. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("content/missing") | @remote_api_endpoint("content/missing") | ||||
▲ Show 20 Lines • Show All 1,065 Lines • Show Last 20 Lines |