customhostnames

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCustomHostname

func CreateCustomHostname(ctx context.Context, client Client, spec v1alpha1.CustomHostnameParameters) (*cloudflare.CustomHostnameResponse, error)

CreateCustomHostname creates a new Custom Hostname.

func CustomHostnameToParameters

func CustomHostnameToParameters(in cloudflare.CustomHostname) v1alpha1.CustomHostnameParameters

CustomHostnameToParameters returns a CustomHostnameParameters representation of a Cloudflare Custom Hostname.

func GenerateObservation

func GenerateObservation(in cloudflare.CustomHostname) v1alpha1.CustomHostnameObservation

GenerateObservation creates an observation of a cloudflare Custom Hostname

func IsCustomHostnameNotFound

func IsCustomHostnameNotFound(err error) bool

IsCustomHostnameNotFound returns true if the passed error indicates that the CustomHostname is not found (been deleted or not set at all).

func ParametersToCustomHostname

func ParametersToCustomHostname(in v1alpha1.CustomHostnameParameters) cloudflare.CustomHostname

ParametersToCustomHostname returns a Cloudflare API representation of a Custom Hostname from our CustomHostnameParameters.

func UpToDate

func UpToDate(spec *v1alpha1.CustomHostnameParameters, o cloudflare.CustomHostname) bool

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

func UpdateCustomHostname

func UpdateCustomHostname(ctx context.Context, client Client, id string, spec v1alpha1.CustomHostnameParameters) error

UpdateCustomHostname updates mutable values on a Custom Hostname.

Types

type Client

type Client interface {
	UpdateCustomHostnameSSL(ctx context.Context, zoneID string, customHostnameID string, ssl cloudflare.CustomHostnameSSL) (*cloudflare.CustomHostnameResponse, error)
	UpdateCustomHostname(ctx context.Context, zoneID string, customHostnameID string, ch cloudflare.CustomHostname) (*cloudflare.CustomHostnameResponse, error)
	DeleteCustomHostname(ctx context.Context, zoneID string, customHostnameID string) error
	CreateCustomHostname(ctx context.Context, zoneID string, ch cloudflare.CustomHostname) (*cloudflare.CustomHostnameResponse, error)
	CustomHostname(ctx context.Context, zoneID string, customHostnameID string) (cloudflare.CustomHostname, error)
}

Client is a Cloudflare API client that implements methods for working with Fallback Origins.

func NewClient

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

NewClient returns a new Cloudflare API client for working with Custom Hostnames.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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