Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudflareProvider ¶
type CloudflareProvider struct { API *cloudflare.API // contains filtered or unexported fields }
CloudflareProvider implements the DNSProvider interface for Cloudflare
func NewCloudflareProvider ¶
func NewCloudflareProvider(email string, token string, logger *zap.SugaredLogger) (*CloudflareProvider, error)
NewCloudflareProvider generates a CloudflareProvider using the given credentials
func (*CloudflareProvider) AddHostnameMapping ¶
func (provider *CloudflareProvider) AddHostnameMapping(mapping *types.DNSMapping) error
AddHostnameMapping adds the given DNSMapping as an A record In case an A record already exists, it will succeed, since the desired state has already been obtained It will not modify any records that are not A records.
func (*CloudflareProvider) RemoveHostnameMapping ¶
func (provider *CloudflareProvider) RemoveHostnameMapping(mapping *types.DNSMapping) error
RemoveHostnameMapping will remove the given DNSMapping from an A record In case no A record or no mapping exists, the call will succeed, given that the required has already been achieved It will not modify any records that are not A records
type DryrunProvider ¶
DryrunProvider simulates a public DNS provider using an in memory map As the name suggests, it is useful in tests and to validate settings
func NewDryrunProvider ¶
func NewDryrunProvider(logger *zap.SugaredLogger) (*DryrunProvider, error)
NewDryrunProvider generates a DryrunProvider
func (*DryrunProvider) AddHostnameMapping ¶
func (provider *DryrunProvider) AddHostnameMapping(mapping *types.DNSMapping) error
AddHostnameMapping adds the given DNSMapping to an A record In case an A record already exists, it will append the mapping, trying to keep the current information intact It will not modify any records that are not A records.
func (*DryrunProvider) RemoveHostnameMapping ¶
func (provider *DryrunProvider) RemoveHostnameMapping(mapping *types.DNSMapping) error
RemoveHostnameMapping will remove the given DNSMapping from an A record In case no A record or no mapping exists, the call will succeed, given that the required has already been achieved It will not modify any records that are not A records
type Provider ¶
type Provider interface { AddHostnameMapping(mapping *types.DNSMapping) error RemoveHostnameMapping(mapping *types.DNSMapping) error }
Provider provides a common abstraction over the APIs of various DNS services