Documentation
¶
Overview ¶
Package location provides validators for Google Cloud location identifiers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidLocation ¶
IsValidLocation validates a Google Cloud location identifier.
A valid location must be either:
- A valid region (validated by IsValidRegion)
- A valid zone (validated by IsValidZone)
- The literal string "global"
Note: This validates syntax only, not whether the location currently exists or is available for a given service.
func IsValidRegion ¶
IsValidRegion validates a Google Cloud region identifier.
A valid region must:
- Be non-empty
- Contain only lowercase letters, digits, and hyphens
- Match the general region code style (e.g., us-central1, europe-west4)
- Be no longer than 100 characters (internal safety bound)
Note: This validates syntax only, not whether the region currently exists or is available for a given service.
func IsValidZone ¶
IsValidZone validates a Google Cloud zone identifier.
A valid zone must:
- Be non-empty
- Follow the zone naming pattern: <region>-<zone-letter> (e.g., us-central1-a)
- Be no longer than 100 characters (internal safety bound)
Note: This validates syntax only, not whether the zone currently exists.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.