refactor: rename plugin manager to plugin client and rename path from manager to impl (#18876)

This commit is contained in:
Yeuoly 2025-04-27 14:22:25 +08:00 committed by GitHub
commit abafa68647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 116 additions and 103 deletions

View file

@ -0,0 +1,12 @@
from core.plugin.impl.base import BasePluginClient
class PluginAssetManager(BasePluginClient):
def fetch_asset(self, tenant_id: str, id: str) -> bytes:
"""
Fetch an asset by id.
"""
response = self._request(method="GET", path=f"plugin/{tenant_id}/asset/{id}")
if response.status_code != 200:
raise ValueError(f"can not found asset {id}")
return response.content