dnsdomain

package
v3.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DelimLeft = `#{`
View Source
var DelimRight = `}`
View Source
var TagValueDescs = echo.NewKVData().
	Add(Tag(`ipv4Addr`), `新的IPv4地址`).
	Add(Tag(`ipv4Result`), `IPv4地址更新结果(JSON格式)`).
	Add(Tag(`ipv4Domains`), `IPv4的域名,多个以","分割`).
	Add(Tag(`ipv6Addr`), `新的IPv6地址`).
	Add(Tag(`ipv6Result`), `IPv6地址更新结果(JSON格式)`).
	Add(Tag(`ipv6Domains`), `IPv6的域名,多个以","分割`).
	Add(Tag(`error`), `错误信息`).
	Add(Tag(`ip`), `新的IP地址(自动选择IPv4/IPv6)`)
View Source
var TrackerTypes = echo.NewKVData().
	Add(`api`, `通过接口获取`).
	Add(`netInterface`, `通过网卡获取`).
	Add(`cmd`, `通过命令行获取`)

Functions

func Tag

func Tag(tag string) string

Types

type Domain

type Domain struct {
	IPFormat     string           // IP格式模板(支持变量标签#{ip})
	DomainName   string           // 根域名(如“webx.top”)
	SubDomain    string           // 子域名主机头(如“foo”则代表子域名“foo.webx.top”)
	Line         string           // 线路类型
	UpdateStatus UpdateStatusType // 更新状态
	Extra        echo.H           // 扩展数据
}

Domain 域名实体

func (Domain) GetFullDomain

func (d Domain) GetFullDomain() string

GetFullDomain 获得全部的,子域名

func (Domain) GetSubDomain

func (d Domain) GetSubDomain() string

GetSubDomain 获得子域名,为空返回@ 阿里云,dnspod需要

func (Domain) IP

func (d Domain) IP(ip string) string

func (Domain) Result

func (d Domain) Result() *Result

func (Domain) String

func (d Domain) String() string

type Result

type Result struct {
	Domain string
	Status string
}

type Results

type Results map[string][]*Result

func (*Results) Add

func (r *Results) Add(provider string, result *Result)

func (*Results) String

func (r *Results) String() string

type Support added in v3.6.1

type Support struct {
	A    bool
	AAAA bool
	Line bool
}

type TagValues

type TagValues struct {
	IPv4Addr    string
	IPv4Result  Results
	IPv4Domains []string
	IPv6Addr    string
	IPv6Result  Results
	IPv6Domains []string
	IPAddr      string
	Error       string
	// contains filtered or unexported fields
}

func NewTagValues

func NewTagValues() *TagValues

func (*TagValues) Parse

func (t *TagValues) Parse(content string) string

func (*TagValues) ParseQuery added in v3.6.1

func (t *TagValues) ParseQuery(urlQuery string) string

type UpdateStatusType

type UpdateStatusType string

UpdateStatusType 更新状态

const (
	// UpdatedNothing 未改变
	UpdatedNothing UpdateStatusType = "未改变"
	// UpdatedFailed 更新失败
	UpdatedFailed UpdateStatusType = "失败"
	// UpdatedSuccess 更新成功
	UpdatedSuccess UpdateStatusType = "成功"
	UpdatedIdle    UpdateStatusType = ""
)

Jump to

Keyboard shortcuts

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