records

package
v0.0.0-...-be1e11a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateObservation

func GenerateObservation(in cloudflare.DNSRecord) v1alpha1.RecordObservation

GenerateObservation creates an observation of a cloudflare Record.

func IsRecordNotFound

func IsRecordNotFound(err error) bool

IsRecordNotFound returns true if the passed error indicates a Record was not found.

func LateInitialize

func LateInitialize(spec *v1alpha1.RecordParameters, o cloudflare.DNSRecord) bool

LateInitialize initializes RecordParameters based on the remote resource.

func UpToDate

func UpToDate(spec *v1alpha1.RecordParameters, o cloudflare.DNSRecord) bool

UpToDate checks if the remote Record is up to date with the requested resource parameters.

func UpdateRecord

func UpdateRecord(ctx context.Context, client Client, recordID string, spec *v1alpha1.RecordParameters) error

UpdateRecord updates mutable values on a DNS Record.

Types

type Client

type Client interface {
	CreateDNSRecord(ctx context.Context, zoneID string, rr cloudflare.DNSRecord) (*cloudflare.DNSRecordResponse, error)
	UpdateDNSRecord(ctx context.Context, zoneID, recordID string, rr cloudflare.DNSRecord) error
	DNSRecord(ctx context.Context, zoneID, recordID string) (cloudflare.DNSRecord, error)
	DeleteDNSRecord(ctx context.Context, zoneID, recordID string) error
}

Client is a Cloudflare API client that implements methods for working with DNS Records.

func NewClient

func NewClient(cfg clients.Config, hc *http.Client) (Client, error)

NewClient returns a new Cloudflare API client for working with DNS Records.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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