caddy

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy(sourceDir, caddyPath, folderName, safeDomain string) error

Deploy 部署证书到 Caddy 证书目录并生成可 import 的 Caddyfile 片段。

func DeployAndReloadWithContext

func DeployAndReloadWithContext(ctx context.Context, sourceDir, caddyPath, folderName, safeDomain, caddyConfig string) error

DeployAndReloadWithContext 将片段生成与可选 reload 纳入同一发布事务。

func DeployWithContext

func DeployWithContext(ctx context.Context, sourceDir, caddyPath, folderName, safeDomain string) error

DeployWithContext 部署证书并将调用方 context 传递给原子发布事务。

func GenerateCaddyTLSSnippet

func GenerateCaddyTLSSnippet(caddyPath, folderName, safeDomain string) error

GenerateCaddyTLSSnippet 生成可在站点 block 中 import 的 tls 指令片段。

func IsCaddyAvailable

func IsCaddyAvailable() bool

IsCaddyAvailable 检查 caddy 命令是否可用。

func ReloadCaddyWithContext

func ReloadCaddyWithContext(parent context.Context, caddyConfig string) error

ReloadCaddyWithContext 通过 caddy reload 热加载配置。

func TestConnectionWithContext

func TestConnectionWithContext(ctx context.Context, caddyPath, caddyConfig string) error

TestConnectionWithContext 检查 Caddy 目录,并在可用时校验 Caddyfile。

func ValidateCaddyConfigWithContext

func ValidateCaddyConfigWithContext(parent context.Context, caddyConfig string) error

ValidateCaddyConfigWithContext 使用 caddy validate 校验配置。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL