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 ¶
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 ¶
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 ¶
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.