dsdm

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const DynDirect string = "https://v1.dyn.direct/"
View Source
const (
	ProviderZeroSSL = "zerossl"
)

Variables

View Source
var (
	ErrAccountCreationError = errors.New("account creation failed")
	ErrUnsupportedProvider  = errors.New("unsupported provider")
)

Functions

func GetDomainForIP

func GetDomainForIP(rootDomain string, ip net.IP) string

Types

type APIError

type APIError struct {
	Status    int
	ErrorCode string
	Message   string
}

func (APIError) Error

func (e APIError) Error() string

type AcquireCertificateRequest added in v0.2.0

type AcquireCertificateRequest struct {
	ID         uuid.UUID
	Domain     string
	Token      string
	Provider   string
	KeyType    certcrypto.KeyType
	Timeout    time.Duration
	SilenceLog bool
}

type CertificateResponse added in v0.2.0

type CertificateResponse struct {
	Domain            string
	CertURL           string
	CertStableURL     string
	PrivateKey        []byte
	Certificate       []byte
	IssuerCertificate []byte
	CSR               []byte
}

type Client

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

func New

func New(server string) (*Client, error)

func (*Client) AcquireCertificate added in v0.2.0

func (c *Client) AcquireCertificate(
	ctx context.Context,
	request AcquireCertificateRequest,
) (*CertificateResponse, error)

func (*Client) GetOverview

func (c *Client) GetOverview(ctx context.Context) (*OverviewResponse, error)

func (*Client) NewDNSChallengeProvider added in v0.2.0

func (c *Client) NewDNSChallengeProvider(
	ctx context.Context,
	id uuid.UUID,
	token string,
) *DNSChallengeProvider

func (*Client) RequestSubdomain

func (c *Client) RequestSubdomain(ctx context.Context) (*SubdomainResponse, error)

func (*Client) SetSubdomainACMEChallenge

func (c *Client) SetSubdomainACMEChallenge(
	ctx context.Context,
	req SubdomainACMEChallengeRequest,
) error

type DNSChallengeProvider added in v0.2.0

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

func (*DNSChallengeProvider) CleanUp added in v0.2.0

func (p *DNSChallengeProvider) CleanUp(_ string, _ string, _ string) error

func (*DNSChallengeProvider) Present added in v0.2.0

func (p *DNSChallengeProvider) Present(domain string, _ string, keyAuth string) error

type OverviewResponse

type OverviewResponse = internal.OverviewResponse

type SubdomainACMEChallengeRequest

type SubdomainACMEChallengeRequest struct {
	ID     uuid.UUID
	Token  string
	Values []string
}

type SubdomainResponse

type SubdomainResponse = internal.NewSubdomainResponse

Directories

Path Synopsis
Package internal provides primitives to interact with the openapi HTTP API.
Package internal provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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