Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUnifiProvider ¶
func NewUnifiProvider(domainFilter endpoint.DomainFilter, config *Config) (provider.Provider, error)
NewUnifiProvider initializes a new DNSProvider.
Types ¶
type ClientURLs ¶
type Config ¶
type Config struct { Host string `env:"UNIFI_HOST,notEmpty"` ApiKey string `env:"UNIFI_API_KEY" envDefault:""` User string `env:"UNIFI_USER" envDefault:""` Password string `env:"UNIFI_PASS" envDefault:""` Site string `env:"UNIFI_SITE" envDefault:"default"` ExternalController bool `env:"UNIFI_EXTERNAL_CONTROLLER" envDefault:"false"` SkipTLSVerify bool `env:"UNIFI_SKIP_TLS_VERIFY" envDefault:"true"` }
Config represents the configuration for the UniFi API.
type DNSRecord ¶
type DNSRecord struct { ID string `json:"_id,omitempty"` Enabled bool `json:"enabled,omitempty"` Key string `json:"key"` Port *int `json:"port,omitempty"` Priority *int `json:"priority,omitempty"` RecordType string `json:"record_type"` TTL endpoint.TTL `json:"ttl,omitempty"` Value string `json:"value"` Weight *int `json:"weight,omitempty"` }
DNSRecord represents a DNS record in the UniFi API.
type Login ¶
type Login struct { Username string `json:"username"` Password string `json:"password"` Remember bool `json:"remember"` }
Login represents a login request to the UniFi API.
type Provider ¶
type Provider struct { provider.BaseProvider // contains filtered or unexported fields }
Provider type for interfacing with UniFi
func (*Provider) ApplyChanges ¶
ApplyChanges applies a given set of changes in the DNS provider.
func (*Provider) GetDomainFilter ¶
func (p *Provider) GetDomainFilter() endpoint.DomainFilterInterface
GetDomainFilter returns the domain filter for the provider.
Click to show internal directories.
Click to hide internal directories.