Documentation
¶
Overview ¶
Package libdnstemplate implements a DNS record management client compatible with the libdns interfaces for all-ink.com.
Index ¶
- Constants
- Variables
- type Provider
- func (p *Provider) AppendRecord(ctx context.Context, zone string, record libdns.Record) ([]libdns.Record, error)
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecord(ctx context.Context, zone string, record libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetAllRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) SetRecord(ctx context.Context, zone string, record libdns.Record) ([]libdns.Record, error)
- func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
Constants ¶
const ApiBase = "https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl"
ApiBase is the URL for the KAS API WSDL.
const TimeoutTime = 15000 * time.Millisecond
TimeoutTime is the default timeout for API requests.
Variables ¶
var ChachedRecords = make(map[string][]allinklRecord)
ChachedRecords stores cached DNS records for zones to minimize API calls.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
KasUsername string `json:"kas_username,omitempty"`
KasPassword string `json:"kas_password,omitempty"`
}
Provider facilitates DNS record manipulation with all-ink.com.
func (*Provider) AppendRecord ¶
func (p *Provider) AppendRecord(ctx context.Context, zone string, record libdns.Record) ([]libdns.Record, error)
AppendRecord adds a single DNS record to the specified zone.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone. It returns the records that were added.
func (*Provider) DeleteRecord ¶
func (p *Provider) DeleteRecord(ctx context.Context, zone string, record libdns.Record) ([]libdns.Record, error)
DeleteRecord removes a single DNS record from the specified zone.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the specified records from the zone. It returns the records that were deleted.
func (*Provider) GetAllRecords ¶
GetAllRecords retrieves all DNS records for the specified zone from the KAS API.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.