applications

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertIPs

func ConvertIPs(ips []string) ([]net.IP, error)

ConvertIPs converts slice of IPs in string form into net.IP for ease of use in YAML returns nil, error if any of the IPs are invalid

func GenerateObservation

func GenerateObservation(in cloudflare.SpectrumApplication) v1alpha1.ApplicationObservation

GenerateObservation creates an observation of a cloudflare Spectrum Application.

func IsApplicationNotFound

func IsApplicationNotFound(err error) bool

IsApplicationNotFound returns true if the passed error indicates a spectrum application was not found.

func LateInitialize

func LateInitialize(spec *v1alpha1.ApplicationParameters, o cloudflare.SpectrumApplication) bool

LateInitialize initializes ApplicationParameters based on the remote resource

func UpToDate

func UpToDate(spec *v1alpha1.ApplicationParameters, o cloudflare.SpectrumApplication) bool

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

func UpdateSpectrumApplication

func UpdateSpectrumApplication(ctx context.Context, client Client, applicationID string, spec *v1alpha1.ApplicationParameters) error

UpdateSpectrumApplication updates mutable values on a Spectrum Application.

Types

type Client

type Client interface {
	CreateSpectrumApplication(ctx context.Context, zoneID string, appDetails cloudflare.SpectrumApplication) (cloudflare.SpectrumApplication, error)
	SpectrumApplication(ctx context.Context, zoneID string, applicationID string) (cloudflare.SpectrumApplication, error)
	UpdateSpectrumApplication(ctx context.Context, zoneID, appID string, appDetails cloudflare.SpectrumApplication) (cloudflare.SpectrumApplication, error)
	DeleteSpectrumApplication(ctx context.Context, zoneID string, applicationID string) error
}

Client is a Cloudflare API client that implements methods for working with Spectrum Applications.

func NewClient

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

NewClient returns a new Cloudflare API client for working with Spectrum Applications.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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