Documentation
¶
Overview ¶
Package naming holds the module naming rules shared by the side that writes definition names and the side that reads them back: the render service derives {module}-{apiVersion}-{name} when installing a module, and type resolution derives the same string when an Application refers to a module capability. Both must agree exactly, so the derivation lives in one place.
It deliberately imports nothing outside the standard library. pkg/module reaches pkg/appfile transitively (through pkg/definition and pkg/workflow/providers), so pkg/appfile cannot import pkg/module — the same constraint that pkg/module/service/api solves for the renderer interface. A stdlib-only leaf package is importable from either side with no cycle.
Index ¶
Constants ¶
const ( // MaxObjectNameLen is the Kubernetes limit for a metadata.name. MaxObjectNameLen = 253 // MaxLabelValueLen is the Kubernetes limit for a label value. MaxLabelValueLen = 63 )
Variables ¶
This section is empty.
Functions ¶
func APIVersionPattern ¶
func APIVersionPattern() string
APIVersionPattern returns the source of the apiVersion pattern, for error messages that quote the expected format.
func DefinitionName ¶
DefinitionName derives the installed object name for a module capability. This is the one derivation both the render service and type resolution must agree on: change it here or neither side can find what the other wrote.
func IsValidAPIVersion ¶
IsValidAPIVersion reports whether s is a well-formed module API line version.
func TruncateName ¶
TruncateName keeps a derived definition name within the Kubernetes object-name limit.
func TruncateWithHash ¶
TruncateWithHash keeps s within max bytes, appending a stable 8-char digest of the full value so two long values sharing a prefix stay distinct.
Types ¶
This section is empty.