allinkl

package module
v0.0.0-...-3f5e1e5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 9 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/ljelschen/libdns-all-inkl"
)

func main() {
	provider := allinkl.Provider{
		KasLogin:        "<your-login>",
		KasAuthPassword: "<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 <PROVIDER NAME>. TODO: This package is a template only. Customize all godocs for actual implementation.

Index

Constants

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

Variables

View Source
var ChachedRecords = make(map[string][]allinklRecord)

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// TODO: Put config fields here (with snake_case json struct tags on exported fields), for example:
	KasLogin        string
	KasAuthPassword string
}

Provider facilitates DNS record manipulation with <TODO: PROVIDER NAME>.

func (*Provider) AppendRecord

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

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)

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)

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)

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