The Little Host for libdns
This package implements the libdns interfaces for The Little Host, allowing you to manage DNS records programmatically.
provider := &thelittlehost.Provider{
APIToken: "tlh_your_api_token_here",
}| Field | Type | Required | Description |
|---|---|---|---|
APIToken |
string |
Yes | Bearer token for API authentication. Generate one in the The Little Host control panel. Tokens are prefixed with tlh_. |
This package does not read environment variables directly. Set struct fields explicitly, or use environment variables as defaults in your application:
provider := &thelittlehost.Provider{
APIToken: os.Getenv("THELITTLEHOST_API_TOKEN"),
}import "github.com/libdns/thelittlehost"
provider := &thelittlehost.Provider{
APIToken: "tlh_...",
}In Caddy JSON config:
{
"module": "thelittlehost",
"api_token": "tlh_..."
}- MX records: Priority is encoded in the
Datafield as"<preference> <target>"per the libdns convention and is split out for the API automatically. - DeleteRecords wildcards: Empty
Type,TTL, orDatafields on an input record act as wildcards — any existing record matching the non-empty fields will be deleted. - Concurrency: All methods are safe for concurrent use.
MIT — see LICENSE.