stackql/stackql-provider-registry
GitHub: stackql/stackql-provider-registry
云与 SaaS 提供程序接口文档的注册、分发与版本管理解决方案。
Stars: 27 | Forks: 3
```markdown
[](https://github.com/stackql/stackql-provider-registry/actions/workflows/main.yml)

# StackQL Provider Registry
一个支持 [stackql](https://stackql.io/) 的 `provider` 接口文档仓库([stackql GitHub 仓库](https://github.com/stackql/stackql))。
## 上下文
StackQL provider 接口文档告知 stackql 应用程序如何与指定的提供程序(如 `aws`、`azure`、`google` 等)进行交互,包括该提供程序中可用的方法以及如何使用 SQL 语义调用这些方法。提供程序接口文档是带有扩展的 OpenAPI 规范,格式为 `yaml`。
这些文档按提供程序进行版本管理,并构建为签名和压缩的打包工件。打包工件注册并发布到 AWS S3 中的 StackQL Provider Registry 工件仓库。提供程序注册表 API 是一个 [Deno Deploy](https://deno.com/deploy) 应用程序,使用 `REGISTRY LIST` 和 `REGISTRY PULL` 命令向 stackql 应用程序提供提供程序接口文档。
下图显示了提供程序注册表的上下文:
```
C4Context
System_Ext(github_repo, "stackql-provider-registry", "GitHub Repository")
System_Ext(github_actions, "Build and Deploy", "GitHub Actions")
SystemDb(artifact_repo, "Artifact Repository", "AWS S3")
System(deno_registry, "Provider Registry API", "Deno Deploy")
System(stackql, "StackQL Application", "stackql")
Rel(github_repo, github_actions, "triggers...")
Rel(github_actions, artifact_repo, "registers and pushes to...", "signed tgz package")
Rel(github_actions, deno_registry, "pushes to...", "signed tgz package")
Rel(stackql, deno_registry, "list and pulls registry docs from...", "REGISTRY LIST | REGISTRY PULL")
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="0")
UpdateRelStyle(github_repo, github_actions, $offsetY="10", $offsetX="-20")
UpdateRelStyle(github_actions, artifact_repo, $offsetY="44", $offsetX="-55")
UpdateRelStyle(github_actions, deno_registry, $offsetY="-18", $offsetX="-130")
UpdateRelStyle(stackql, deno_registry, $offsetY="40", $offsetX="-40")
```
公共 StackQL Provider Registry 通过 [Deno Deploy](https://deno.com/deploy) 分发,使用以下端点:
| 端点 | 描述 |
| --- | --- |
| [registry.stackql.app](https://registry.stackql.app/ping) | 生产注册表(基于 `main` 构建) |
| [registry-dev.stackql.app](https://registry.stackql.app/ping) | 开发注册表(基于 `develop` 构建) |
## 开发提供程序
StackQL 提供程序从 OpenAPI 或 Swagger 规范生成(可由提供程序提供,或通过其他脚本构成,例如 [google-discovery-to-openapi](https://github.com/stackql/google-discovery-to-openapi) 或 [stackql-azure-openapi](https://github.com/stackql/stackql-azure-openapi))。
一旦拥有 OpenAPI 规范,就可以使用 [openapisaurus](https://github.com/stackql/openapisaurus) 工具项目生成 StackQL 提供程序文档。
## 构建与部署工作流
提供程序注册表使用 GitHub Actions 构建和部署。提供程序文档在工作流步骤中经过验证和测试,然后打包并存储在工件仓库中。最新打包版本会发布到注册表 API(一个 [Deno Deploy](https://deno.com/deploy) 应用程序),其中可通过 `stackql` 应用程序使用 `REGISTRY LIST` 或 `REGISTRY PULL` 获取。更多详细信息请参见 [docs/build-and-deployment.md](docs/build-and-deployment.md)。
## 使用 `dev` 注册表测试提供程序
使用以下步骤通过 `dev` 注册表测试提供程序:
```
export DEV_REG="{ \"url\": \"https://registry-dev.stackql.app/providers\" }"
./stackql --registry="${DEV_REG}" shell
```
```
标签:API 网关, Artifact Registry, AWS S3, Cloud Provider Registry, Deno Deploy, EVTX分析, GitHub Actions, OpenAPI 3, Provider Interface, RESTful API, SaaS 提供商, SaaS 集成, SQL 语义, StackQL, YAML 规范, 云提供商, 关键词, 压缩包, 威胁情报, 安全可观测性, 工件仓库, 开发者工具, 开源框架, 扩展接口, 持续部署, 持续集成, 提供者注册表, 提示词优化, 搜索优化, 文档服务, 注册与发布, 版本控制, 签名包, 自动化构建, 自动笔记