api

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// PathAuth accepts 'username' and 'password' parameters.
	PathAuth = "/auth"
	// PathInfo has no parameters and returns an InfoDump.
	PathInfo = "/info"
	// PathDNSGet fetches records for a domain.
	PathDNSGet = "/dnsget"
	// PathDNSAdd adds a record to a domain.
	PathDNSAdd = "/dnsadd"
	// PathDNSEdit modifies a record for a domain.
	PathDNSEdit = "/dnsedit"
	// PathDNSDelete removes a record from a domain.
	PathDNSDelete = "/dnsdelete"
	// PathDNSNuke wipes out all but the primary A and AAAA records for a domain.
	PathDNSNuke = "/dnsnuke"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	http.Client
	URL      string
	Token    string
	Username string
	Password string
}

Client is the structure used by end-user software to access lbproxy middleman servers.

func NewClient

func NewClient(api, username, password string) *Client

NewClient creates a client structure with a HTTP client for the specified proxy.

func (*Client) AddARecord

func (c *Client) AddARecord(domain, address, host string, ttl int64, six bool) error

AddARecord adds A or AAAA records.

func (*Client) AddCNAME

func (c *Client) AddCNAME(domain, value, host string, ttl int64) error

AddCNAME does exactly that.

func (*Client) AddMX

func (c *Client) AddMX(domain, value, host string, ttl int64, priority uint16) error

AddMX adds MX records for mail servers.

func (*Client) AddNS

func (c *Client) AddNS(domain, value, host string, ttl int64, priority uint16) error

AddNS adds name server records.

func (*Client) AddSRV

func (c *Client) AddSRV(domain, value, host string, ttl int64, priority, port, weight uint16) error

AddSRV adds SRV records.

func (*Client) AddTXT

func (c *Client) AddTXT(domain, value, host string, ttl int64, priority uint16) error

AddTXT adds TXT records.

func (*Client) Authenticate

func (c *Client) Authenticate() bool

func (*Client) DNSActive

func (c *Client) DNSActive(string) bool

func (*Client) DeleteARecord

func (c *Client) DeleteARecord(domain, value, host string, six bool) error

DeleteARecord deletes A or AAAA records.

func (*Client) DeleteCNAME

func (c *Client) DeleteCNAME(domain, value, host string) error

DeleteCNAME does exactly that.

func (*Client) DeleteMX

func (c *Client) DeleteMX(domain, value, host string) error

DeleteMX holds no surprises.

func (*Client) DeleteNS

func (c *Client) DeleteNS(domain, value, host string) error

DeleteNS is as boring as the above.

func (*Client) DeleteSRV

func (c *Client) DeleteSRV(domain, value, host string, port, weight uint16) error

DeleteSRV deletes SRV records.

func (*Client) DeleteTXT

func (c *Client) DeleteTXT(domain, value, host string) error

DeleteTXT deletes TXT records.

func (*Client) EditARecord

func (c *Client) EditARecord(domain, oldip, newip, host string, ttl int64, six bool) error

EditARecord modifies A or AAAA records.

func (*Client) EditCNAME

func (c *Client) EditCNAME(domain, oldip, newip, host string, ttl int64) error

func (*Client) EditMX

func (c *Client) EditMX(domain, oldip, newip, host string, ttl int64, priority uint16) error

func (*Client) EditNS

func (c *Client) EditNS(domain, oldip, newip, host string, ttl int64) error

func (*Client) EditSOA

func (c *Client) EditSOA(domain, person string, refresh, retry, expire, ttl int64) error

EditSOA modifies a SOA (Start of Authority) record.

func (*Client) EditSRV

func (c *Client) EditSRV(domain, oldval, newval, host string, ttl int64, priority, port, weight uint) error

EditSRV modifies a SRV record.

func (*Client) EditTXT

func (c *Client) EditTXT(domain, oldip, newip, host string, ttl int64) error

func (*Client) GetDNSRecords

func (c *Client) GetDNSRecords(domain, value, host, t string, page int) (*lbapi.DNSRecordList, error)

GetDNSRecords gets the first up to 50 records of one type for a domain. Pass a higher page number to get the next set of up to 50.

Jump to

Keyboard shortcuts

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