Documentation ¶
Index ¶
- Constants
- type DNSClient
- type DNSRecordOptions
- type FakeDNSClient
- func (c *FakeDNSClient) CreateOrUpdateRecordSet(ctx context.Context, zoneID, name, recordType string, rrdatas []string, ...) error
- func (c *FakeDNSClient) DeleteRecordSet(ctx context.Context, zoneID, name, recordType string) error
- func (c *FakeDNSClient) GetManagedZones(ctx context.Context) (map[string]string, error)
- type Record
Constants ¶
const API_TOKEN_FIELD = "apiToken"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSClient ¶
type DNSClient interface { GetManagedZones(ctx context.Context) (map[string]string, error) CreateOrUpdateRecordSet( ctx context.Context, managedZone, name, recordType string, rrdatas []string, opts DNSRecordOptions) error DeleteRecordSet(ctx context.Context, managedZone, name, recordType string) error }
func NewDNSClient ¶
NewDNSClient creates a new dns client with a cloudflare api token.
func NewDNSClientFromSecretRef ¶
func NewDNSClientFromSecretRef(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (DNSClient, error)
NewDNSClientFromSecretRef creates a bew dns client from a secret containing an apiToken.
type DNSRecordOptions ¶ added in v0.0.4
type FakeDNSClient ¶ added in v0.0.4
func NewFakeDNSClient ¶ added in v0.0.4
func NewFakeDNSClient( zones map[string]string, records map[string]Record, ) *FakeDNSClient
NewDNSClient creates a new dns client with a cloudflare api token.
func (*FakeDNSClient) CreateOrUpdateRecordSet ¶ added in v0.0.4
func (c *FakeDNSClient) CreateOrUpdateRecordSet( ctx context.Context, zoneID, name, recordType string, rrdatas []string, opts DNSRecordOptions, ) error
CreateOrUpdateRecordSet creates or updates the resource recordset with the given name, record type, rrdatas, and ttl in the managed zone with the given name or ID.
func (*FakeDNSClient) DeleteRecordSet ¶ added in v0.0.4
func (c *FakeDNSClient) DeleteRecordSet(ctx context.Context, zoneID, name, recordType string) error
DeleteRecordSet deletes the resource recordset with the given name and record type in the managed zone with the given name or ID.
func (*FakeDNSClient) GetManagedZones ¶ added in v0.0.4
GetManagedZones returns a map of all managed zone DNS names mapped to their IDs, composed of the project ID and their user assigned resource names.