config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(filename string, config Config) error

SaveConfig 保存配置文件

Types

type AcmeInfo

type AcmeInfo struct {
	Email string `yaml:"email"`
}

type AliYun added in v1.0.4

type AliYun struct {
	Kodo *Kodo `yaml:"kodo"`
}

type BaiduYun added in v1.0.4

type BaiduYun struct {
	CDN *BaiduYunCDN `yaml:"cdn"`
}

type BaiduYunCDN added in v1.0.4

type BaiduYunCDN struct {
	Origin    []api.OriginPeer `yaml:"origin"`
	Form      string           `yaml:"form"`
	Dsa       *api.DSAConfig   `yaml:"dsa"`
	CnameInfo *Cname           `yaml:"cname"`
	IPv6      bool             `yaml:"ipv6"`
	QUIC      bool             `yaml:"quic"`
	HTTP2     bool             `yaml:"http2"`
	HTTP3     bool             `yaml:"http3"`
	Seo       *api.SeoSwitch   `yaml:"seo"`
}

type Cname added in v1.0.1

type Cname struct {
	Enabled bool   `yaml:"enabled"`
	Value   string `yaml:"value"`
}

type Config

type Config struct {
	Acme    AcmeInfo     `yaml:"acme"`
	Domains []DomainInfo `yaml:"domains"`
}

func LoadConfig

func LoadConfig(filename string) (Config, error)

LoadConfig 读取配置文件

type DomainInfo

type DomainInfo struct {
	Domain   string    `yaml:"domain"`
	Provider string    `yaml:"provider"`
	To       string    `yaml:"to"`
	Baidu    *BaiduYun `yaml:"baidu,omitempty"`
	AliYun   *AliYun   `yaml:"ali,omitempty"`
}

type Kodo added in v1.0.4

type Kodo struct {
	Bucket    string `yaml:"bucket"`
	Region    string `yaml:"region"`
	CnameInfo *Cname `yaml:"cname"`
}

Jump to

Keyboard shortcuts

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