dnsmadeeasy

package module
v0.0.0-...-d44db6b Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 5 Imported by: 0

README

DNS Made Easy module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records with DNS Made Easy

Caddy module name

dns.providers.dnsmadeeasy

Config examples

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "dnsmadeeasy",
				"api_key": "<DNSMADEEASY_API_KEY>"
				"secret_key": "<DNSMADEEASY_SECRET_KEY>"
				"api_endpoint": "https://<API_ENDPOINT>"
			}
		}
	}
}

or with the Caddyfile:

# globally
{
	acme_dns dnsmadeeasy {
		api_key {env.DNSMADEEASY_API_KEY}
		secret_key {env.DNSMADEEASY_SECRET_KEY}
		api_endpoint {env.DNSMADEEASY_API_ENDPOINT}
	}
}

api_endpoint is optional and will default to the Production endpoint

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *dnsmadeeasy.Provider }

Provider wraps the provider implementation as a Caddy module.

func (Provider) CaddyModule

func (Provider) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Provider) Provision

func (p *Provider) Provision(ctx caddy.Context) error

Before using the provider config, resolve placeholders in the API token. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

func (p *Provider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the DNS provider from Caddyfile tokens. Syntax:

	dnsmadeeasy {
	    api_key <api_key>
	    secret_key <secret_key>
	    api_endpoint https://api.dnsmadeeasy.com/V2.0/
	}

	api_endpoint is optional, and points to the Production endpoint by default
     valid endpoints can be found at:
	    https://github.com/John-K/dnsmadeeasy/blob/v1.0.0/client.go#L24-L27

Expansion of placeholders is left to the JSON config caddy.Provisioner (above).

Jump to

Keyboard shortcuts

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