spaceship

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Spaceship DNS provider module for Caddy

CI

This package contains a DNS provider module for Caddy. It manages DNS records using the Spaceship DNS API through the libdns adapter.

Caddy module name

dns.providers.spaceship

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": "spaceship",
				"api_token": "YOUR_SPACESHIP_API_TOKEN",
				"api_secret": "YOUR_SPACESHIP_API_SECRET",
			}
		}
	}
}
Caddyfile usage

You can configure the provider globally or per-site. Supported directives inside the provider block:

  • api_key <value> – (required) Spaceship API key
  • api_secret <value> (alias: apisecret) – (required) Spaceship API secret
  • api_url <value> (aliases: api_baseurl, base_url) – override base API URL (default https://spaceship.dev/api)
  • api_pagesize <n> (aliases: pagesize, page_size) – page size for listing operations (default 100)
  • api_timeout <seconds> (alias: timeout) – HTTP client timeout in seconds (default 30)

Inline form (key + secret):

tls {
	dns spaceship YOUR_API_KEY YOUR_API_SECRET
}

Block form:

tls {
	dns spaceship {
		api_key    {env.LIBDNS_SPACESHIP_APIKEY}
		api_secret {env.LIBDNS_SPACESHIP_APISECRET}
		api_timeout 20
		api_pagesize 200
	}
}

Global example:

{
	acme_dns spaceship {
		api_key    {env.LIBDNS_SPACESHIP_APIKEY}
		api_secret {env.LIBDNS_SPACESHIP_APISECRET}
	}
}

Environment variable fallbacks recognized by the underlying provider: LIBDNS_SPACESHIP_APIKEY, LIBDNS_SPACESHIP_APISECRET, LIBDNS_SPACESHIP_BASEURL, LIBDNS_SPACESHIP_PAGESIZE, LIBDNS_SPACESHIP_TIMEOUT.

Compatibility

This module requires Caddy v2.10.0 or newer (tested with v2.10.2). Older Caddy versions (≤ v2.4.x) use an earlier libdns API and will not compile with this provider.

Use Caddy's placeholder {env.VAR} to reference environment variables in the Caddyfile.

License

MIT License (See LICENSE file)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *libdnsspaceship.Provider }

Provider lets Caddy read and manipulate DNS records hosted by the Spaceship DNS provider. It adapts the libdns spaceship provider for use in Caddy.

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

Provision sets up the module. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

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

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

providername [<api_token>] {
    api_token <api_token>
}

**THIS IS JUST AN EXAMPLE AND NEEDS TO BE CUSTOMIZED.**

Jump to

Keyboard shortcuts

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