allinkl

package module
v0.2.103 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 11 Imported by: 0

README

all-inkl for libdns

Go Reference

This package implements the libdns interfaces for all-inkl, allowing you to manage DNS records.

Authentication

To authenticate you need to supply your KAS-Username and KAS-Password to the Provider.

Example

package main

import (
	"context"
	"fmt"

	allinkl "github.com/libdns/all-inkl"
)

func main() {
	provider := allinkl.Provider{
		KasUsername:    "<your-login>",
		KasPassword:    "<your-password>",
	}

	records, err := provider.GetRecords(context.TODO(), "example.de")
	if err != nil {
		fmt.Println(err.Error())
	}

	for _, record := range records {
		rr := record.RR()
		fmt.Printf("%s (%s): %s\n", rr.Name, rr.Type, rr.Data)
	}
}

License

MIT License

Copyright (c) 2025 Lars Jelschen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Documentation

Overview

Package libdnstemplate implements a DNS record management client compatible with the libdns interfaces for all-ink.com.

Index

Constants

View Source
const ApiBase = "https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl"

ApiBase is the URL for the KAS API WSDL.

View Source
const TimeoutTime = 15000 * time.Millisecond

TimeoutTime is the default timeout for API requests.

Variables

View Source
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

func (p *Provider) GetAllRecords(ctx context.Context, zone string) ([]libdns.Record, error)

GetAllRecords retrieves all DNS records for the specified zone from the KAS API.

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)

GetRecords lists all the records in the zone.

func (*Provider) SetRecord

func (p *Provider) SetRecord(ctx context.Context, zone string, record libdns.Record) ([]libdns.Record, error)

SetRecord updates a single DNS record in the specified zone.

func (*Provider) SetRecords

func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

SetRecords sets the records in the zone, either by updating existing records or creating new ones. It returns the updated records.

Jump to

Keyboard shortcuts

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