Download the PHP package tourze/volcano-ark-api-bundle without Composer

On this page you can find all versions of the php package tourze/volcano-ark-api-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package volcano-ark-api-bundle

Volcano Ark API Bundle

中文

一个用于集成 Volcano Ark(火山方舟)API 的 Symfony Bundle,提供了完整的 API 密钥管理、使用量统计和审计日志功能。

功能特性

安装

配置

基础配置

Doctrine 配置

使用方法

命令行工具

API 密钥管理

数据同步

服务层使用

使用 ApiKeyService

使用 UsageService

使用 AuditLogService

OpenAI 兼容客户端

自定义客户端

数据模型

ApiKey

API 密钥实体,包含以下字段:

ApiKeyUsage

API 密钥使用统计实体,包含以下字段:

AuditLog

审计日志实体,包含以下字段:

管理后台

Bundle 集成了 EasyAdmin,提供完整的管理界面:

访问 /admin 即可进入管理后台。

事件系统

Bundle 提供了丰富的事件系统,允许您在关键节点执行自定义逻辑:

ApiKeyUsedEvent

当 API 密钥被使用时触发:

UsageSyncedEvent

当使用量数据同步完成时触发。

AuditLogSyncedEvent

当审计日志同步完成时触发。

测试

性能优化

缓存策略

Bundle 内置了多种缓存策略来优化性能:

异步处理

对于大量的数据同步操作,建议使用队列系统:

安全考虑

  1. 密钥加密 - 所有 API 密钥和密钥值在数据库中都经过加密存储
  2. 访问控制 - 管理后台需要适当的权限验证
  3. 审计追踪 - 所有 API 调用都有完整的审计日志
  4. 密钥轮换 - 支持自动和手动的密钥轮换

故障排除

常见问题

  1. No active API key found

    • 确保至少有一个激活的 API 密钥
    • 检查密钥的 isActive 字段是否为 true
  2. API request failed

    • 验证 API 密钥和密钥值是否正确
    • 检查网络连接和防火墙设置
    • 确认区域设置是否正确
  3. Database connection errors
    • 确保 Doctrine 配置正确
    • 检查数据库连接和权限

调试模式

启用调试模式获取更详细的日志信息:

贡献

欢迎提交 Issue 和 Pull Request!

许可证

MIT


All versions of volcano-ark-api-bundle with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tourze/volcano-ark-api-bundle contains the following files

Loading the files please wait ...