Documentation
¶
Index ¶
- Constants
- func ExtractAlias(identifier string) string
- func Generate() string
- func ParseName(input string) (identifier string, tag *string, err error)
- func SplitIdentifier(identifier string) (namespace *string, alias string)
- func ValidateAndDeduplicateTags(tags []string) ([]string, error)
- func ValidateNamespaceMatchesTeam(identifier, teamSlug string) error
- func ValidateSandboxID(sandboxID string) error
- func WithNamespace(namespace, alias string) string
- func WithTag(identifier, tag string) string
Constants ¶
const ( DefaultTag = "default" TagSeparator = ":" NamespaceSeparator = "/" )
Variables ¶
This section is empty.
Functions ¶
func ExtractAlias ¶
ExtractAlias returns just the alias portion from an identifier (namespace/alias or alias).
func ParseName ¶
ParseName parses and validates "namespace/alias:tag" or "alias:tag". Returns the cleaned identifier (namespace/alias or alias) and optional tag. All components are validated and normalized (lowercase, trimmed).
func SplitIdentifier ¶
SplitIdentifier splits "namespace/alias" into its parts. Returns nil namespace for bare aliases, pointer for explicit namespace.
func ValidateNamespaceMatchesTeam ¶
ValidateNamespaceMatchesTeam checks if an explicit namespace in the identifier matches the team's slug. Returns an error if the namespace doesn't match. If the identifier has no explicit namespace, returns nil (valid).
func ValidateSandboxID ¶
ValidateSandboxID checks that a sandbox ID contains only lowercase alphanumeric characters.
func WithNamespace ¶
WithNamespace returns identifier with the given namespace prefix.
Types ¶
This section is empty.