mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00

* use auto generated schemas * go version bump and dependencies upgrade * clarify some error messages --------- Co-authored-by: yusing <yusing@6uo.me>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { DomainNames } from "../types";
|
|
import { AutocertConfig } from "./autocert";
|
|
import { EntrypointConfig } from "./entrypoint";
|
|
import { HomepageConfig } from "./homepage";
|
|
import { Providers } from "./providers";
|
|
|
|
export type Config = {
|
|
/** Optional autocert configuration
|
|
*
|
|
* @examples require(".").autocertExamples
|
|
*/
|
|
autocert?: AutocertConfig;
|
|
/* Optional entrypoint configuration */
|
|
entrypoint?: EntrypointConfig;
|
|
/* Providers configuration (include file, docker, notification) */
|
|
providers: Providers;
|
|
/** Optional list of domains to match
|
|
*
|
|
* @minItems 1
|
|
* @examples require(".").matchDomainsExamples
|
|
*/
|
|
match_domains?: DomainNames;
|
|
/* Optional homepage configuration */
|
|
homepage?: HomepageConfig;
|
|
/**
|
|
* Optional timeout before shutdown
|
|
* @default 3
|
|
* @minimum 1
|
|
*/
|
|
timeout_shutdown?: number;
|
|
};
|
|
|
|
export const autocertExamples = [
|
|
{ provider: "local" },
|
|
{
|
|
provider: "cloudflare",
|
|
email: "abc@gmail",
|
|
domains: ["example.com"],
|
|
options: { auth_token: "c1234565789-abcdefghijklmnopqrst" },
|
|
},
|
|
{
|
|
provider: "clouddns",
|
|
email: "abc@gmail",
|
|
domains: ["example.com"],
|
|
options: {
|
|
client_id: "c1234565789",
|
|
email: "abc@gmail",
|
|
password: "password",
|
|
},
|
|
},
|
|
];
|
|
export const matchDomainsExamples = ["example.com", "*.example.com"] as const;
|