dns

package
v0.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RecordSetSuccessfulState represents a RecordSet that is ready and has a successful last operation.
	RecordSetSuccessfulState = "Succeeded"
	// RecordSetDeletingState represents a RecordSet that is deleting.
	RecordSetDeletingState = "Deleting"
)

Variables

This section is empty.

Functions

func NewRecordSetParameters

func NewRecordSetParameters(r *v1alpha1.RecordSetParameters) dns.RecordSet

NewRecordSetParameters returns an Azure DNS RecordSet object.

func NewZoneParameters

func NewZoneParameters(r *v1alpha1.Zone) dns.Zone

NewZoneParameters returns an Azure DNS Zone object.

func RecordSetIsUpToDate

func RecordSetIsUpToDate(r *v1alpha1.RecordSetParameters, az *dns.RecordSetProperties) bool

RecordSetIsUpToDate decides if an upgrade is needed.

func UpdateRecordSetStatusFromAzure

func UpdateRecordSetStatusFromAzure(v *v1alpha1.RecordSet, az dns.RecordSet)

UpdateRecordSetStatusFromAzure updates the status related to the external Azure DNS RecordSet in the RecordSetStatus

func UpdateZoneStatusFromAzure

func UpdateZoneStatusFromAzure(v *v1alpha1.Zone, az dns.Zone)

UpdateZoneStatusFromAzure updates the status related to the external Azure DNS Zone in the ZoneStatus

func ZoneIsUpToDate

func ZoneIsUpToDate(r *v1alpha1.Zone, az dns.Zone) bool

ZoneIsUpToDate decides if an upgrade is needed.

Types

type RecordSetAPI

type RecordSetAPI interface {
	Get(ctx context.Context, r *v1alpha1.RecordSet) (dns.RecordSet, error)
	CreateOrUpdate(ctx context.Context, r *v1alpha1.RecordSet) error
	Delete(ctx context.Context, r *v1alpha1.RecordSet) error
}

RecordSetAPI represents the API interface for a DNS RecordSet client

type RecordSetClient

type RecordSetClient struct {
	dns.RecordSetsClient
}

RecordSetClient is the concrete implementation of the ZoneAP interface for RecordSet that calls Azure API.

func NewRecordSetClient

func NewRecordSetClient(cl dns.RecordSetsClient) *RecordSetClient

NewRecordSetClient creates and initializes a RecordSet instance.

func (*RecordSetClient) CreateOrUpdate

func (c *RecordSetClient) CreateOrUpdate(ctx context.Context, r *v1alpha1.RecordSet) error

CreateOrUpdate creates or updates a DNS RecordSet

func (*RecordSetClient) Delete

Delete deletes the given DNS RecordSet

func (*RecordSetClient) Get

Get retrieves the requested DNS RecordSet

type ZoneAPI

type ZoneAPI interface {
	Get(ctx context.Context, z *v1alpha1.Zone) (dns.Zone, error)
	CreateOrUpdate(ctx context.Context, z *v1alpha1.Zone) error
	Delete(ctx context.Context, z *v1alpha1.Zone) error
}

ZoneAPI represents the API interface for a DNS Zone client

type ZoneClient

type ZoneClient struct {
	dns.ZonesClient
}

ZoneClient is the concrete implementation of the ZoneAP interface for DNS Zone that calls Azure API.

func NewZoneClient

func NewZoneClient(cl dns.ZonesClient) *ZoneClient

NewZoneClient creates and initializes a ZoneClient instance.

func (*ZoneClient) CreateOrUpdate

func (c *ZoneClient) CreateOrUpdate(ctx context.Context, z *v1alpha1.Zone) error

CreateOrUpdate creates or updates a DNS Zone

func (*ZoneClient) Delete

func (c *ZoneClient) Delete(ctx context.Context, z *v1alpha1.Zone) error

Delete deletes the given DNS Zone

func (*ZoneClient) Get

func (c *ZoneClient) Get(ctx context.Context, z *v1alpha1.Zone) (dns.Zone, error)

Get retrieves the requested DNS Zone

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL