dns

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const RECORD_TYPE_A = "A"
View Source
const RECORD_TYPE_AAAA = "AAAA"
View Source
const RECORD_TYPE_CNAME = "CNAME"
View Source
const RECORD_TYPE_TXT = "TXT"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRecordParams

type AddRecordParams struct {
	Domain string
	Type   string
	Value  string
}

type DelRecordParams

type DelRecordParams struct {
	Domain string
	Type   string
}

type DomainResolved

type DomainResolved struct {
	// ali: 主域名(veikr.com),   cloudflare: zoneid
	DomainName string
	RR         string
}

type EditRecordParams

type EditRecordParams struct {
	Domain string
	Type   string
	Value  string
}

type IDns

type IDns interface {
	ListMainDomains() ([]string, error)
	ListAllRecords(domain string) ([]Record, error)
	QueryRecords(params QueryRecordParams) ([]Record, error)
	AddRecord(params AddRecordParams) error
	EditRecord(params EditRecordParams) error
	DelRecord(params DelRecordParams) error
}

type QueryRecordParams

type QueryRecordParams struct {
	Domain string
	Type   string
}

type Record

type Record struct {
	Id      string
	Domain  string
	Type    string
	Value   string
	Enabled bool
}

type UpdateRecordParams

type UpdateRecordParams struct {
	Id     string
	Domain string
	Type   string
	Value  string
}

Jump to

Keyboard shortcuts

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