project

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package project provides validators for Google Cloud Project identifiers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidProjectID

func IsValidProjectID(id string) bool

IsValidProjectID validates a Google Cloud Project ID.

A valid Project ID must:

  • Be 6 to 30 characters long
  • Start with a lowercase letter
  • Contain only ASCII lowercase letters, digits, and hyphens
  • Not end with a hyphen

func IsValidProjectLocationParent

func IsValidProjectLocationParent(parent string) bool

IsValidProjectLocationParent validates a project/location parent path.

Accepted structure:

  • projects/{project}/locations/{location}

Segment rules:

  • {project} must satisfy IsValidProjectID
  • {location} must satisfy location.IsValidLocation

Note: This validates structure only, not whether the resource exists.

func IsValidProjectName

func IsValidProjectName(name string) bool

IsValidProjectName validates a Google Cloud Project display name.

A valid Project Name must:

  • Be 4 to 30 characters long
  • Contain only letters, numbers, single quotes, hyphens, spaces, or exclamation points

Types

This section is empty.

Jump to

Keyboard shortcuts

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