Documentation ¶
Index ¶
- func ConvertIPs(ips []string) ([]net.IP, error)
- func GenerateObservation(in cloudflare.SpectrumApplication) v1alpha1.ApplicationObservation
- func IsApplicationNotFound(err error) bool
- func LateInitialize(spec *v1alpha1.ApplicationParameters, o cloudflare.SpectrumApplication) bool
- func UpToDate(spec *v1alpha1.ApplicationParameters, o cloudflare.SpectrumApplication) bool
- func UpdateSpectrumApplication(ctx context.Context, client Client, applicationID string, ...) error
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertIPs ¶
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 ¶
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.