mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 11:29:39 +08:00
22 lines
457 B
Python
22 lines
457 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
|
||
|
|
from ..core import app
|
||
|
|
from . import provider
|
||
|
|
from .providers import localstorage
|
||
|
|
|
||
|
|
|
||
|
|
class StorageMgr:
|
||
|
|
"""存储管理器"""
|
||
|
|
|
||
|
|
ap: app.Application
|
||
|
|
|
||
|
|
storage_provider: provider.StorageProvider
|
||
|
|
|
||
|
|
def __init__(self, ap: app.Application):
|
||
|
|
self.ap = ap
|
||
|
|
self.storage_provider = localstorage.LocalStorageProvider(ap)
|
||
|
|
|
||
|
|
async def initialize(self):
|
||
|
|
await self.storage_provider.initialize()
|