config

package
v0.0.0-...-40baeb0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLOUDFLARE_API_KEY    = "CLOUDFLARE_API_KEY"
	CLOUDFLARE_API_EMAIL  = "CLOUDFLARE_API_EMAIL"
	CLOUDFLARE_ZONE_NAME  = "CLOUDFLARE_ZONE_NAME"
	SPECTRUM_APP_DOMAIN   = "SPECTRUM_APP_DOMAIN"
	SPECTRUM_APP_PROTOCOL = "SPECTRUM_APP_PROTOCOL"
	DDNS_DOMAIN           = "DDNS_DOMAIN"
	DNS_SERVER            = "DNS_SERVER"
)

Variables

View Source
var ErrFieldRequired = errors.New("missing required configuration")

Functions

func FieldRequiredError

func FieldRequiredError(env string) error

Types

type Config

type Config struct {
	CloudflareAPIKey    string
	CloudflareAPIEmail  string
	CloudflareZoneName  string
	SpectrumAppDomain   string
	SpectrumAppProtocol spectrumutil.SpectrumProtocol
	DDNSDomain          string
	DNSServer           string
	Polling             bool
	Debug               bool
}

func Load

func Load() *Config

func (*Config) DebugEntry

func (c *Config) DebugEntry(log *logrus.Entry) *logrus.Entry

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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