Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete custom hostname (and custom hostname ssl) status constants #1109

Closed
rcj4747 opened this issue Oct 17, 2022 · 1 comment
Closed

Comments

@rcj4747
Copy link

rcj4747 commented Oct 17, 2022

Current cloudflare-go version

v0.52.0

Description

custom_hostname.go has definitions for a subset of CustomHostnameStatus values (pending, active, moved, deleted, & blocked) but this is incomplete based on the API's custom hostname object definition. Missing values are: active_redeploying, pending_deletion, pending_blocked, pending_migration, pending_provisioned, test_pending, test_active, test_active_apex, test_blocked, test_failed, provisioned

Additionally, there are no constants for the CustomHostnameSSL.Status which is defined as a string. Valid values per the API doc are initializing, pending_validation, deleted, pending_issuance, pending_deployment, pending_deletion, pending_expiration, expired, active, initializing_timed_out, validation_timed_out, issuance_timed_out, deployment_timed_out, deletion_timed_out, pending_cleanup, staging_deployment, staging_active, deactivating, inactive, backup_issued, holding_deployment

Use cases

A user of cloudflare-go would like to the status value in a custom hostname object (and custom hostname SSL object) using the constants defined in the go library without adding hard-coded strings to their code.

Potential cloudflare-go usage

switch currentRecord.Status {
	case cloudflare.MOVED, cloudflare.DELETED:
		// do things
	// !! ACTIVE_REDEPLOYING is not defined today
	case cloudflare.ACTIVE, cloudflare.ACTIVE_REDEPLOYING, cloudflare.PENDING:
		// do things
	case cloudflare.BLOCKED:
		// do things

References

No response

@jacobbednarz
Copy link
Member

closing this one off as these are present in v2 (https://github.com/cloudflare/cloudflare-go/blob/v2/custom_hostnames/customhostname.go#L432) however, we won't be backporting them to v0 at this point in time.

if they are missing some values, we should raise a support ticket or chat to your account team about raising a ticket for the service team to update the enum value used here.

@jacobbednarz jacobbednarz closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@jacobbednarz @rcj4747 and others