add cloudflare provider
This commit is contained in:
@@ -3,6 +3,7 @@ import { z } from "zod";
|
||||
export const accessTypeMap: Map<string, [string, string]> = new Map([
|
||||
["tencent", ["腾讯云", "/imgs/providers/tencent.svg"]],
|
||||
["aliyun", ["阿里云", "/imgs/providers/aliyun.svg"]],
|
||||
["cloudflare", ["Cloudflare", "/imgs/providers/cloudflare.svg"]],
|
||||
["ssh", ["SSH部署", "/imgs/providers/ssh.svg"]],
|
||||
["webhook", ["Webhook", "/imgs/providers/webhook.svg"]],
|
||||
]);
|
||||
@@ -13,6 +14,7 @@ export const accessFormType = z.union(
|
||||
z.literal("tencent"),
|
||||
z.literal("ssh"),
|
||||
z.literal("webhook"),
|
||||
z.literal("cloudflare"),
|
||||
],
|
||||
{ message: "请选择云服务商" }
|
||||
);
|
||||
@@ -21,7 +23,12 @@ export type Access = {
|
||||
id: string;
|
||||
name: string;
|
||||
configType: string;
|
||||
config: TencentConfig | AliyunConfig | SSHConfig | WebhookConfig;
|
||||
config:
|
||||
| TencentConfig
|
||||
| AliyunConfig
|
||||
| SSHConfig
|
||||
| WebhookConfig
|
||||
| CloudflareConfig;
|
||||
deleted?: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
@@ -31,6 +38,10 @@ export type WebhookConfig = {
|
||||
url: string;
|
||||
};
|
||||
|
||||
export type CloudflareConfig = {
|
||||
dnsApiToken: string;
|
||||
};
|
||||
|
||||
export type TencentConfig = {
|
||||
secretId: string;
|
||||
secretKey: string;
|
||||
|
||||
Reference in New Issue
Block a user