caddy

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MulanPSL-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 Enable

func Enable() error

Enable 设置为开机启动

func GetDownloadUrl

func GetDownloadUrl(goos, goArch, version string) (string, error)

GetDownloadUrl 获取版本的下载链接

func GetLastReleaseVersion

func GetLastReleaseVersion() (string, error)

GetLastReleaseVersion 获取Caddy最后一个版本的版本号

func Install

func Install(goos, goArch, version, installTo, configPath, systemdPath string) error

Install 安装Caddy

func InstallLastRelease

func InstallLastRelease() error

InstallLastRelease 安装最新版本

func IsInstalled added in v1.0.2

func IsInstalled() (bool, error)

IsInstalled 检测是否已安装

func IsRunning

func IsRunning() (bool, error)

IsRunning 检查Caddy是否在运行状态

func Reload added in v1.0.2

func Reload() error

func SetConfig added in v1.0.1

func SetConfig(configPath, host string, listenPort, targetPort int, path string, https, cloudreve, http2 bool) error

SetConfig 添加Caddy的配置

func SetConfigToSystem added in v1.0.1

func SetConfigToSystem(host string, listenPort, targetPort int, path string, https, cloudreve, http2 bool) error

SetConfigToSystem 设置Caddy

func Start

func Start() error

Start 启动Caddy服务

func Stop

func Stop() error

Stop 停止Caddy服务

Types

This section is empty.

Jump to

Keyboard shortcuts

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