fallbackorigins

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.CustomHostnameFallbackOrigin) v1alpha1.FallbackOriginObservation

GenerateObservation creates an observation of a cloudflare Fallback Origin

func IsFallbackOriginNotFound

func IsFallbackOriginNotFound(err error) bool

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

func UpToDate

func UpToDate(spec *v1alpha1.FallbackOriginParameters, o cloudflare.CustomHostnameFallbackOrigin) bool

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

func UpdateFallbackOrigin

func UpdateFallbackOrigin(ctx context.Context, client Client, spec *v1alpha1.FallbackOriginParameters) error

UpdateFallbackOrigin updates mutable values on a Fallback Origin

Types

type Client

type Client interface {
	UpdateCustomHostnameFallbackOrigin(ctx context.Context, zoneID string, chfo cloudflare.CustomHostnameFallbackOrigin) (*cloudflare.CustomHostnameFallbackOriginResponse, error)
	DeleteCustomHostnameFallbackOrigin(ctx context.Context, zoneID string) error
	CustomHostnameFallbackOrigin(ctx context.Context, zoneID string) (cloudflare.CustomHostnameFallbackOrigin, 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 Fallback Origins.

type ErrNotFound

type ErrNotFound struct{}

ErrNotFound is an error type so that we can return it in the controller test mocks

func (*ErrNotFound) Error

func (e *ErrNotFound) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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