MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / get_available_credentials_list

Method get_available_credentials_list

src/storage/psql_manager.py:321–335  ·  view source on GitHub ↗

获取所有可用凭证列表

(self)

Source from the content-addressed store, hash-verified

319 return None
320
321 async def get_available_credentials_list(self) -> List[str]:
322 """获取所有可用凭证列表"""
323 self._ensure_initialized()
324
325 try:
326 async with self._pool.acquire() as conn:
327 rows = await conn.fetch("""
328 SELECT filename FROM credentials
329 WHERE disabled = 0
330 ORDER BY rotation_order ASC
331 """)
332 return [r["filename"] for r in rows]
333 except Exception as e:
334 log.error(f"Error getting available credentials list: {e}")
335 return []
336
337 # ============ StorageBackend 协议方法 ============
338

Callers

nothing calls this directly

Calls 2

_ensure_initializedMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected