vertexai

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: 5 Imported by: 0

Documentation

Overview

Package vertexai provides validators for Google Cloud Vertex AI identifiers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidVertexEndpointName

func IsValidVertexEndpointName(name string) bool

IsValidVertexEndpointName validates a Vertex AI endpoint name.

A valid endpoint name must:

  • Contain only letters, numbers, dashes, underscores, and periods
  • Be case-sensitive
  • Start with a letter
  • Be no more than 128 characters long
  • Periods (.) are allowed because they appear in Google's model names (e.g., gemini-2.5-flash), though they are not typically used in user-created endpoint names

See: https://docs.cloud.google.com/vertex-ai/docs/general/resource-naming

Note: The naming rules are identical to IsValidVertexModelName.

func IsValidVertexModelName

func IsValidVertexModelName(name string) bool

IsValidVertexModelName validates a Vertex AI model name.

A valid model name must:

  • Contain only letters, numbers, dashes, underscores, and periods
  • Be case-sensitive
  • Start with a letter
  • Be no more than 128 characters long
  • Periods (.) are allowed because they appear in Google's model names (e.g., gemini-2.5-flash), though they are not typically used in user-created model names

See: https://docs.cloud.google.com/vertex-ai/docs/general/resource-naming

Note: This validates the display name, not server-assigned numeric IDs or publisher model IDs.

func IsValidVertexModelResourceName

func IsValidVertexModelResourceName(path string) bool

IsValidVertexModelResourceName validates a Vertex AI model resource path.

Accepted path structures:

  • projects/{project}/locations/{location}/models/{modelId}
  • projects/{project}/locations/{location}/publishers/{publisher}/models/{modelId}

Segment rules:

  • {project} must satisfy project.IsValidProjectID
  • {location} must satisfy location.IsValidLocation
  • {publisher} must be non-empty and contain no slashes
  • {modelId} must be non-empty and contain no slashes

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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