internal

package
v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseURL = "https://api.loopia.se/RPCSERV"

DefaultBaseURL is url to the XML-RPC api.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	APIUser     string
	APIPassword string
	BaseURL     string
	HTTPClient  *http.Client
}

Client the Loopia client.

func NewClient

func NewClient(apiUser, apiPassword string) *Client

NewClient creates a new Loopia Client.

func (*Client) AddTXTRecord

func (c *Client) AddTXTRecord(domain string, subdomain string, ttl int, value string) error

AddTXTRecord adds a TXT record.

func (*Client) GetTXTRecords

func (c *Client) GetTXTRecords(domain string, subdomain string) ([]RecordObj, error)

GetTXTRecords gets TXT records.

func (*Client) RemoveSubdomain

func (c *Client) RemoveSubdomain(domain, subdomain string) error

RemoveSubdomain remove a sub-domain.

func (*Client) RemoveTXTRecord

func (c *Client) RemoveTXTRecord(domain string, subdomain string, recordID int) error

RemoveTXTRecord removes a TXT record.

type RecordObj

type RecordObj struct {
	Type     string
	TTL      int
	Priority int
	Rdata    string
	RecordID int
}

func (*RecordObj) UnmarshalXML

func (r *RecordObj) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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