api

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ACMETxtKey key = 0

ACMETxtKey is a context key for ACMETxt struct

Variables

This section is empty.

Functions

This section is empty.

Types

type AcmednsAPI

type AcmednsAPI struct {
	Config *acmedns.AcmeDnsConfig
	DB     acmedns.AcmednsDB
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func Init

func Init(config *acmedns.AcmeDnsConfig, db acmedns.AcmednsDB, logger *zap.SugaredLogger, errChan chan error) AcmednsAPI

func (*AcmednsAPI) Auth

func (a *AcmednsAPI) Auth(update httprouter.Handle) httprouter.Handle

Auth middleware for update request

func (*AcmednsAPI) Shutdown

func (a *AcmednsAPI) Shutdown(ctx context.Context) error

func (*AcmednsAPI) Start

func (a *AcmednsAPI) Start(dnsservers []acmedns.AcmednsNS)

type ChallengeProvider

type ChallengeProvider struct {
	// contains filtered or unexported fields
}

ChallengeProvider implements go-acme/lego Provider interface which is used for ACME DNS challenge handling

func NewChallengeProvider

func NewChallengeProvider(servers []acmedns.AcmednsNS) ChallengeProvider

NewChallengeProvider creates a new instance of ChallengeProvider

func (*ChallengeProvider) CleanUp

func (c *ChallengeProvider) CleanUp(ctx context.Context, _ acme.Challenge) error

CleanUp is called after the run to remove the ACME DNS challenge tokens from DNS records

func (*ChallengeProvider) Present

func (c *ChallengeProvider) Present(ctx context.Context, challenge acme.Challenge) error

Present is used for making the ACME DNS challenge token available for DNS

func (*ChallengeProvider) Wait

Wait is a dummy function as we are just going to be ready to answer the challenge from the get-go

type RegResponse

type RegResponse struct {
	Username   string   `json:"username"`
	Password   string   `json:"password"`
	Fulldomain string   `json:"fulldomain"`
	Subdomain  string   `json:"subdomain"`
	Allowfrom  []string `json:"allowfrom"`
}

RegResponse is a struct for registration response JSON

Jump to

Keyboard shortcuts

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