dns_set

package module
v0.0.0-...-9743a8d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Providers = map[string]DnsAPI{
	"porkbun": &Porkbun{},
}

Functions

func IPv6ToReverseDNS

func IPv6ToReverseDNS(ip netip.Prefix) string

Types

type Auth

type Auth struct {
	Username string
	Password string

	ApiKey       string
	ApiSecretKey string
}

type DnsAPI

type DnsAPI interface {
	SetAuth(Auth) DnsAPI

	SetDns(context.Context, []Record) error
	GetDns(context.Context, []DomainSub) ([]Record, error)
	GetSuppoertedRecords() ([]string, error)
}

type DomainSub

type DomainSub struct {
	Domain string
	Sub    string
}

type Porkbun

type Porkbun struct {
	// contains filtered or unexported fields
}

func (Porkbun) GetDns

func (p Porkbun) GetDns(ctx context.Context, domains []DomainSub) ([]Record, error)

func (Porkbun) GetSuppoertedRecords

func (p Porkbun) GetSuppoertedRecords() ([]string, error)

func (Porkbun) SetAuth

func (p Porkbun) SetAuth(a Auth) DnsAPI

func (Porkbun) SetDns

func (p Porkbun) SetDns(ctx context.Context, records []Record) error

type Record

type Record struct {
	Domain   DomainSub
	Disabled bool
	Type     string
	Content  string
	TTL      string
	Prio     string
	Notes    string
}

func (*Record) SetDefaults

func (r *Record) SetDefaults()

Directories

Path Synopsis
cmd command

Jump to

Keyboard shortcuts

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