Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetISO3166Alpha2Codes ¶
func GetISO3166Alpha2Codes() []string
func IsISO3166Alpha2Code ¶
IsISO3166Alpha2Code returns true if it's a valid ISO_3166 Alpha 2 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
func RegisterProvider ¶
func RegisterProvider(name string, c ProviderConstructor)
RegisterProvider will register a provider constructor, so it can be used within the application. 'name' should be unique, and should be used to identify this provider.
func SanitizeError ¶
SanitizeError removes request specific data from error messages in order to make them consistent across multiple similar requests to the provider. e.g AWS SDK Request ids `request id: 051c860b-9b30-4c19-be1a-1280c3e9fdc4`
Types ¶
type Factory ¶
type Factory interface {
ProviderFor(context.Context, v1alpha1.ProviderAccessor) (Provider, error)
}
Factory is an interface that can be used to obtain Provider implementations. It determines which provider implementation to use by introspecting the given ProviderAccessor resource.
func NewFactory ¶
NewFactory returns a new provider factory with the given client.
type ManagedZoneOutput ¶
type Provider ¶
type Provider interface { // Ensure will create or update record. Ensure(record *v1alpha1.DNSRecord, managedZone *v1alpha1.ManagedZone) error // Delete will delete record. Delete(record *v1alpha1.DNSRecord, managedZone *v1alpha1.ManagedZone) error // Ensure will create or update a managed zone, returns an array of NameServers for that zone. EnsureManagedZone(managedZone *v1alpha1.ManagedZone) (ManagedZoneOutput, error) // Delete will delete a managed zone. DeleteManagedZone(managedZone *v1alpha1.ManagedZone) error }
Provider knows how to manage DNS zones only as pertains to routing.
type ProviderConstructor ¶
ProviderConstructor constructs a provider given a Secret resource and a Context. An error will be returned if the appropriate provider is not registered.