loopia

package module
v0.0.0-...-1e2158f Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 3 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

Loopia DNS module for Caddy

This module contains a DNS provider package for Caddy. It can be used to manage DNS records with the Loopia API.

Loopia API

Caddy module name

dns.providers.loopia

Loopia API account requirements

You will need to create a API user account that is separate from the normal Loopia user account.

The API user will need to have access to the following methods.

  • getSubdomains
  • addSubdomain
  • removeSubdomain
  • getZoneRecords
  • addZoneRecord
  • removeZoneRecord

Config examples

This can be used together with the ACME DNS challenge.

Loopia can use up to 15 minutes, but usually less, to propagate the changes so a high enough timeout is needed.

Caddyfile

You can put the config in a Caddyfile tls block.

tls {
    issuer acme {
        timeout "10m0s"
        dns loopia {
                username "<your user>@loopiaapi"
                password "<your password>"
        }
    }
}
JSON

Or using JSON notation with the ACME module.

{
    "module": "acme",
    "challenges": {
        "dns": {
            "propagation_timeout": "10m0s",
            "provider": {
                "name": "loopia",
                "username": "<your user>@loopiaapi",
                "password": "<your password>"
            }
        }
    }
}

Example Caddyfile

<host>.<your>.<domain>
tls {
        issuer acme {
                email "<your email for acme notifications>"
                timeout "10m0s"
                dns loopia {
                        username "<api user>@loopiaapi"
                        password "<api password>"
                }
        }
}
respond "Hello, world!"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *libdnsloopia.Provider }

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:

loopia [<username> <password>] {
    username <username>
    password <password>
    customer <customer no>
}

Jump to

Keyboard shortcuts

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