Documentation ¶
Index ¶
- Constants
- func Enable() error
- func GetDownloadUrl(goos, goArch, version string) (string, error)
- func GetLastReleaseVersion() (string, error)
- func Install(goos, goArch, version, installTo, configPath, systemdPath string) error
- func InstallLastRelease() error
- func IsInstalled() (bool, error)
- func IsRunning() (bool, error)
- func Reload() error
- func SetConfig(configPath, host string, listenPort, targetPort int, path string, ...) error
- func SetConfigToSystem(host string, listenPort, targetPort int, path string, ...) error
- func Start() error
- func Stop() error
Constants ¶
View Source
const ( PortHttp = 80 PortHttps = 443 )
View Source
const ConfigPath = "/etc/caddy/Caddyfile"
View Source
const InstallTo = "/usr/local/bin"
View Source
const SystemdPath = "/etc/systemd/system/caddy.service"
Variables ¶
This section is empty.
Functions ¶
func GetDownloadUrl ¶
GetDownloadUrl 获取版本的下载链接
func GetLastReleaseVersion ¶
GetLastReleaseVersion 获取Caddy最后一个版本的版本号
func SetConfig ¶ added in v1.0.1
func SetConfig(configPath, host string, listenPort, targetPort int, path string, https, cloudreve, http2 bool) error
SetConfig 添加Caddy的配置
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.