gcloud

package
Version: v4.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 17 Imported by: 5

Documentation

Overview

Package gcloud implements a DNS provider for solving the DNS-01 challenge using Google Cloud DNS.

Index

Constants

View Source
const (
	EnvServiceAccount   = envNamespace + "SERVICE_ACCOUNT"
	EnvProject          = envNamespace + "PROJECT"
	EnvAllowPrivateZone = envNamespace + "ALLOW_PRIVATE_ZONE"
	EnvDebug            = envNamespace + "DEBUG"

	EnvTTL                = envNamespace + "TTL"
	EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
	EnvPollingInterval    = envNamespace + "POLLING_INTERVAL"
)

Environment variables names.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug              bool
	Project            string
	AllowPrivateZone   bool
	PropagationTimeout time.Duration
	PollingInterval    time.Duration
	TTL                int
	HTTPClient         *http.Client
}

Config is used to configure the creation of the DNSProvider.

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig returns a default configuration for the DNSProvider.

type DNSProvider

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

DNSProvider implements the challenge.Provider interface.

func NewDNSProvider

func NewDNSProvider() (*DNSProvider, error)

NewDNSProvider returns a DNSProvider instance configured for Google Cloud DNS. By default, the project name is auto-detected by using the metadata service, it can be overridden using the GCE_PROJECT environment variable. A Service Account can be passed in the environment variable: GCE_SERVICE_ACCOUNT or by specifying the keyfile location: GCE_SERVICE_ACCOUNT_FILE.

func NewDNSProviderConfig

func NewDNSProviderConfig(config *Config) (*DNSProvider, error)

NewDNSProviderConfig return a DNSProvider instance configured for Google Cloud DNS.

func NewDNSProviderCredentials

func NewDNSProviderCredentials(project string) (*DNSProvider, error)

NewDNSProviderCredentials uses the supplied credentials to return a DNSProvider instance configured for Google Cloud DNS.

func NewDNSProviderServiceAccount

func NewDNSProviderServiceAccount(saFile string) (*DNSProvider, error)

NewDNSProviderServiceAccount uses the supplied service account JSON file to return a DNSProvider instance configured for Google Cloud DNS.

func NewDNSProviderServiceAccountKey

func NewDNSProviderServiceAccountKey(saKey []byte) (*DNSProvider, error)

NewDNSProviderServiceAccountKey uses the supplied service account JSON to return a DNSProvider instance configured for Google Cloud DNS.

func (*DNSProvider) CleanUp

func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error

CleanUp removes the TXT record matching the specified parameters.

func (*DNSProvider) Present

func (d *DNSProvider) Present(domain, token, keyAuth string) error

Present creates a TXT record to fulfill the dns-01 challenge.

func (*DNSProvider) Timeout

func (d *DNSProvider) Timeout() (timeout, interval time.Duration)

Timeout customizes the timeout values used by the ACME package for checking DNS record validity.

Source Files

Jump to

Keyboard shortcuts

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