Documentation ¶
Index ¶
- func GenerateObservation(in cloudflare.Zone) v1alpha1.ZoneObservation
- func GetChangedSettings(czs, dzs *v1alpha1.ZoneSettings) []cloudflare.ZoneSetting
- func IsZoneNotFound(err error) bool
- func LateInitialize(spec *v1alpha1.ZoneParameters, z cloudflare.Zone, ozs *v1alpha1.ZoneSettings) bool
- func LateInitializeSettings(observed, desired ZoneSettingsMap, initOn *v1alpha1.ZoneSettings) bool
- func LoadSettingsForZone(ctx context.Context, client Client, zoneID string, zs *v1alpha1.ZoneSettings) error
- func UpToDate(spec *v1alpha1.ZoneParameters, z cloudflare.Zone, ozs *v1alpha1.ZoneSettings) bool
- func UpdateZone(ctx context.Context, client Client, zoneID string, ...) error
- type Client
- type ZoneSettingsMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateObservation ¶
func GenerateObservation(in cloudflare.Zone) v1alpha1.ZoneObservation
GenerateObservation creates an observation of a cloudflare Zone
func GetChangedSettings ¶
func GetChangedSettings(czs, dzs *v1alpha1.ZoneSettings) []cloudflare.ZoneSetting
GetChangedSettings builds a map of only the settings whose values need to be updated.
func IsZoneNotFound ¶
IsZoneNotFound returns true if the passed error indicates a Zone was not found.
func LateInitialize ¶
func LateInitialize(spec *v1alpha1.ZoneParameters, z cloudflare.Zone, ozs *v1alpha1.ZoneSettings) bool
LateInitialize initializes ZoneParameters based on the remote resource
func LateInitializeSettings ¶
func LateInitializeSettings(observed, desired ZoneSettingsMap, initOn *v1alpha1.ZoneSettings) bool
LateInitializeSettings initializes Settings based on the remote resource
func LoadSettingsForZone ¶
func LoadSettingsForZone(ctx context.Context, client Client, zoneID string, zs *v1alpha1.ZoneSettings) error
LoadSettingsForZone loads Zone settings from the cloudflare API and returns a ZoneSettingsMap.
func UpToDate ¶
func UpToDate(spec *v1alpha1.ZoneParameters, z cloudflare.Zone, ozs *v1alpha1.ZoneSettings) bool
UpToDate checks if the remote resource is up to date with the requested resource parameters.
func UpdateZone ¶
func UpdateZone(ctx context.Context, client Client, zoneID string, spec v1alpha1.ZoneParameters) error
UpdateZone updates mutable values on a Zone
Types ¶
type Client ¶
type Client interface { CreateZone(ctx context.Context, name string, jumpstart bool, account cloudflare.Account, zoneType string) (cloudflare.Zone, error) DeleteZone(ctx context.Context, zoneID string) (cloudflare.ZoneID, error) EditZone(ctx context.Context, zoneID string, zoneOpts cloudflare.ZoneOptions) (cloudflare.Zone, error) UpdateZoneSettings(ctx context.Context, zoneID string, cs []cloudflare.ZoneSetting) (*cloudflare.ZoneSettingResponse, error) ZoneDetails(ctx context.Context, zoneID string) (cloudflare.Zone, error) ZoneIDByName(zoneName string) (string, error) ZoneSetPlan(ctx context.Context, zoneID string, planType string) error ZoneSettings(ctx context.Context, zoneID string) (*cloudflare.ZoneSettingResponse, error) }
Client is a Cloudflare API client that implements methods for working with Zones.
type ZoneSettingsMap ¶
type ZoneSettingsMap map[string]interface{}
ZoneSettingsMap contains pairs of keys and values that represent settings on a Zone.