Documentation
¶
Overview ¶
Package cloudflare is a tiny Cloudflare DNS API client used for ACME DNS-01 challenges. It implements only the endpoints statute needs (list zones, create/delete TXT records) and depends solely on the standard library. Kept in internal/ so it is not part of the public API surface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a tiny Cloudflare DNS API client. It implements only the endpoints needed for DNS-01 challenges: list zones and create/delete TXT records. The full-featured cloudflare-go library is intentionally avoided — it pulls in many transitive deps for capabilities we never use.
func (*Client) AddTXTRecord ¶
AddTXTRecord creates a TXT record under the given zone and returns its ID so it can be deleted after the challenge resolves. TTL is set to the minimum (60s on Cloudflare's free plan) so propagation is fast.
func (*Client) DeleteRecord ¶
DeleteRecord removes a record. Errors are returned to the caller; callers should not abort renewal on cleanup failure (the TXT record is useless after the challenge resolves and Cloudflare expires it).
func (*Client) FindZoneID ¶
FindZoneID returns the zone ID for the zone whose name is a suffix of the given domain. The lookup walks the DNS labels from most-specific to least (a record at sub.example.com tries sub.example.com, then example.com).