target

package
v0.0.0-...-35953f5 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliDNS

type AliDNS struct {
	Client *alidns.Client
	Config *simplyddns.TargetConfig
	// contains filtered or unexported fields
}

AliDNS is the target for aliyun dns

func NewAliDNS

func NewAliDNS(config *simplyddns.TargetConfig) (*AliDNS, error)

NewAliDNS for creating a new instance of AliDNS

func (*AliDNS) All

All to get all domains

func (*AliDNS) CreateRecord

func (a *AliDNS) CreateRecord(domain string, ip *net.IP) (*alidns.AddDomainRecordResponse, error)

CreateRecord to create a new DNS record

func (*AliDNS) GetRecord

func (a *AliDNS) GetRecord(domain string) (*alidns.Record, error)

GetRecord to get a single DNS record

func (*AliDNS) UpdateRecord

func (a *AliDNS) UpdateRecord(domain string, ip *net.IP) (*alidns.UpdateDomainRecordResponse, error)

UpdateRecord for update a existsed record

type NameCom

type NameCom struct {
	Key     string
	Token   string
	Records map[string]*namedotcom.Record
	// contains filtered or unexported fields
}

func (*NameCom) CreateRecord

func (c *NameCom) CreateRecord(domain string, addr *net.IP) (*namedotcom.Record, error)

CreateRecord function is used to create the record from namedotcom instance

func (*NameCom) FindRecord

func (c *NameCom) FindRecord(domain string) (*namedotcom.Record, error)

FindRecord function is used to find the record from namedotcom instance

func (*NameCom) Ping

func (c *NameCom) Ping() error

Ping function is used to test if the namedotcom instance is available

func (*NameCom) UpdateRecord

func (c *NameCom) UpdateRecord(record *namedotcom.Record) (*namedotcom.Record, error)

UpdateRecord function is used to update the record from namedotcom instance

Jump to

Keyboard shortcuts

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