Documentation ¶
Index ¶
- Constants
- Variables
- type CommandLine
- type Config
- func (c *Config) AfterValidate(ctx echo.Context) error
- func (c *Config) BeforeValidate(ctx echo.Context) error
- func (c *Config) BinderKeyNormalizer(key string) string
- func (c *Config) Commit() error
- func (c *Config) ExecWebhooks(tagValues *dnsdomain.TagValues) error
- func (c *Config) FindService(provider string) *DNSService
- func (c *Config) HasWebhook() bool
- func (c *Config) IsValid() bool
- type DNSDomain
- type DNSService
- type Filter
- type NetIPConfig
- type NetInterface
Constants ¶
View Source
const ( NotifyDisabled = 0 NotifyIfError = 1 NotifyAll = 2 )
View Source
const RegexpPrefix = `regexp:`
Variables ¶
View Source
var CommandDefaultTimeout = 10 * time.Second
View Source
var ErrCommandRequired = errors.New(`命令行命令不能为空`)
View Source
var TTLs = echo.NewKVData().
Add(``, `自动`).Add(`1`, `1秒`).Add(`5`, `5秒`).Add(`10`, `10秒`).
Add(`60`, `1分钟`).Add(`120`, `2分钟`).Add(`300`, `5分钟`).
Add(`600`, `10分钟`).Add(`1800`, `30分钟`).
Add(`3600`, `1小时`)
Functions ¶
This section is empty.
Types ¶
type CommandLine ¶ added in v3.6.1
type CommandLine struct { Command string // 命令 EnvVars string // 环境变量 WorkDir string // 工作目录 Timeout time.Duration }
func (*CommandLine) Exec ¶ added in v3.6.1
func (c *CommandLine) Exec() ([]byte, error)
type Config ¶
type Config struct { Closed bool IPv4 *NetIPConfig IPv6 *NetIPConfig DNSServices []*DNSService DNSResolver string // example: 8.8.8.8 NotifyMode int // 0-关闭通知; 1-仅仅出错时发送通知;2-发送全部通知 NotifyTemplate map[string]string // 通知模板{html:"",markdown:""} Webhooks []*webhook.Webhook Interval time.Duration }
func (*Config) BinderKeyNormalizer ¶
func (*Config) ExecWebhooks ¶ added in v3.6.1
func (*Config) FindService ¶
func (c *Config) FindService(provider string) *DNSService
func (*Config) HasWebhook ¶ added in v3.6.1
type DNSService ¶
type DNSService struct { Enabled bool Provider string Settings echo.H IPv4Domains []*DNSDomain IPv6Domains []*DNSDomain }
func (*DNSService) Clone ¶
func (d *DNSService) Clone() *DNSService
type NetIPConfig ¶
type NetIPConfig struct { Enabled bool Type string // netInterface / api / cmd NetInterface *NetInterface NetIPApiUrl string CommandLine *CommandLine }
func NewNetIPConfig ¶
func NewNetIPConfig() *NetIPConfig
type NetInterface ¶
func NewNetInterface ¶
func NewNetInterface() *NetInterface
Click to show internal directories.
Click to hide internal directories.