Documentation ¶
Index ¶
- Variables
- func ProviderHasCabability(pType string, cap Capability) bool
- func RegisterCustomRecordType(name, provider, realType string)
- func RegisterDomainServiceProviderType(name string, init DspInitializer, pm ...ProviderMetadata)
- func RegisterRegistrarType(name string, init RegistrarInitializer, pm ...ProviderMetadata)
- type Capability
- type CustomRType
- type DNSServiceProvider
- type DocumentationNote
- type DocumentationNotes
- type DomainCreator
- type DspInitializer
- type None
- type ProviderMetadata
- type Registrar
- type RegistrarInitializer
Constants ¶
This section is empty.
Variables ¶
var DNSProviderTypes = map[string]DspInitializer{}
DNSProviderTypes stores initializer for each DSP.
var Notes = map[string]DocumentationNotes{}
Notes is a collection of all documentation notes, keyed by provider type
var RegistrarTypes = map[string]RegistrarInitializer{}
RegistrarTypes stores initializer for each registrar.
Functions ¶
func ProviderHasCabability ¶ added in v0.1.5
func ProviderHasCabability(pType string, cap Capability) bool
ProviderHasCabability returns true if provider has capability.
func RegisterCustomRecordType ¶ added in v0.1.5
func RegisterCustomRecordType(name, provider, realType string)
RegisterCustomRecordType registers a record type that is only valid for one provider. provider is the registered type of provider this is valid with name is the record type as it will appear in the js. (should be something like $PROVIDER_FOO) realType is the record type it will be replaced with after validation
func RegisterDomainServiceProviderType ¶
func RegisterDomainServiceProviderType(name string, init DspInitializer, pm ...ProviderMetadata)
RegisterDomainServiceProviderType adds a dsp to the registry with the given initialization function.
func RegisterRegistrarType ¶
func RegisterRegistrarType(name string, init RegistrarInitializer, pm ...ProviderMetadata)
RegisterRegistrarType adds a registrar type to the registry by providing a suitable initialization function.
Types ¶
type Capability ¶ added in v0.1.5
type Capability uint32
Capability is a bitmasked set of "features" that a provider supports. Only use constants from this package.
const ( // CanUseAlias indicates the provider support ALIAS records (or flattened CNAMES). Up to the provider to translate them to the appropriate record type. CanUseAlias Capability = iota // CanUseCAA indicates the provider can handle CAA records CanUseCAA // CanUsePTR indicates the provider can handle PTR records CanUsePTR // CanUseSRV indicates the provider can handle SRV records CanUseSRV // CanUseTLSA indicates the provider can handle TLSA records CanUseTLSA // CanUseTXTMulti indicates the provider can handle TXT records with multiple strings CanUseTXTMulti // CantUseNOPURGE indicates NO_PURGE is broken for this provider. To make it // work would require complex emulation of an incremental update mechanism, // so it is easier to simply mark this feature as not working for this // provider. CantUseNOPURGE // DocOfficiallySupported means it is actively used and maintained by stack exchange DocOfficiallySupported // DocDualHost means provider allows full management of apex NS records, so we can safely dual-host with anothe provider DocDualHost // DocCreateDomains means provider can add domains with the `dnscontrol create-domains` command DocCreateDomains // CanUseRoute53Alias indicates the provider support the specific R53_ALIAS records that only the Route53 provider supports CanUseRoute53Alias )
type CustomRType ¶ added in v0.1.5
CustomRType stores an rtype that is only valid for this DSP.
func GetCustomRecordType ¶ added in v0.1.5
func GetCustomRecordType(rType string) *CustomRType
GetCustomRecordType returns a registered custom record type, or nil if none
type DNSServiceProvider ¶
type DNSServiceProvider interface { models.DNSProvider }
DNSServiceProvider is able to generate a set of corrections that need to be made to correct records for a domain
func CreateDNSProvider ¶ added in v0.1.5
func CreateDNSProvider(dType string, config map[string]string, meta json.RawMessage) (DNSServiceProvider, error)
CreateDNSProvider initializes a dns provider instance from given credentials.
type DocumentationNote ¶ added in v0.2.2
DocumentationNote is a way for providers to give more detail about what features they support.
func Can ¶ added in v0.2.2
func Can(comments ...string) *DocumentationNote
Can is a small helper for concisely creating Documentation Notes comments are variadic for easy ommission. First is comment, second is link, the rest are ignored.
func Cannot ¶ added in v0.2.2
func Cannot(comments ...string) *DocumentationNote
Cannot is a small helper for concisely creating Documentation Notes comments are variadic for easy ommission. First is comment, second is link, the rest are ignored.
func Unimplemented ¶ added in v0.2.3
func Unimplemented(comments ...string) *DocumentationNote
Unimplemented is a small helper for concisely creating Documentation Notes comments are variadic for easy ommission. First is comment, second is link, the rest are ignored.
type DocumentationNotes ¶ added in v0.2.2
type DocumentationNotes map[Capability]*DocumentationNote
DocumentationNotes is a full list of notes for a single provider
type DomainCreator ¶
DomainCreator should be implemented by providers that have the ability to add domains to an account. the create-domains command can be run to ensure all domains are present before running preview/push
type DspInitializer ¶
type DspInitializer func(map[string]string, json.RawMessage) (DNSServiceProvider, error)
DspInitializer is a function to create a DNS service provider. Function will be passed the unprocessed json payload from the configuration file for the given provider.
type None ¶
type None struct{}
None is a basic provider type that does absolutely nothing. Can be useful as a placeholder for third parties or unimplemented providers.
func (None) GetDomainCorrections ¶
func (n None) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error)
GetDomainCorrections returns corrections to update a domain.
func (None) GetNameservers ¶
func (n None) GetNameservers(string) ([]*models.Nameserver, error)
GetNameservers returns the current nameservers for a domain.
func (None) GetRegistrarCorrections ¶
func (n None) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error)
GetRegistrarCorrections returns corrections to update registrars.
type ProviderMetadata ¶ added in v0.2.2
type ProviderMetadata interface{}
ProviderMetadata is a common interface for DocumentationNotes and Capability to be used interchangably
Directories ¶
Path | Synopsis |
---|---|
Package all is simply a container to reference all known provider implementations for easy import into other packages
|
Package all is simply a container to reference all known provider implementations for easy import into other packages |
Package config provides functions for reading and parsing the provider credentials json file.
|
Package config provides functions for reading and parsing the provider credentials json file. |
Package namedotcom implements a registrar that uses the name.com api to set name servers.
|
Package namedotcom implements a registrar that uses the name.com api to set name servers. |