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

Method list_credentials

src/storage/psql_manager.py:400–413  ·  view source on GitHub ↗

列出所有凭证文件名(包括禁用的)

(self, mode: str = "geminicli")

Source from the content-addressed store, hash-verified

398 return None
399
400 async def list_credentials(self, mode: str = "geminicli") -> List[str]:
401 """列出所有凭证文件名(包括禁用的)"""
402 self._ensure_initialized()
403
404 try:
405 table_name = self._get_table_name(mode)
406 async with self._pool.acquire() as conn:
407 rows = await conn.fetch(
408 f"SELECT filename FROM {table_name} ORDER BY rotation_order"
409 )
410 return [r["filename"] for r in rows]
411 except Exception as e:
412 log.error(f"Error listing credentials: {e}")
413 return []
414
415 async def delete_credential(self, filename: str, mode: str = "geminicli") -> bool:
416 """删除凭证"""

Callers 1

Calls 3

_ensure_initializedMethod · 0.95
_get_table_nameMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected