type ObjectName … // NewObjectName constructs a new one func NewObjectName(namespace, name string) ObjectName { … } // Parts is the inverse of the constructor func (objName ObjectName) Parts() (namespace, name string) { … } // String returns the standard string encoding, // which is designed to match the historical behavior of MetaNamespaceKeyFunc. // Note this behavior is different from the String method of types.NamespacedName. func (objName ObjectName) String() string { … } // ParseObjectName tries to parse the standard encoding func ParseObjectName(str string) (ObjectName, error) { … } // NamespacedNameAsObjectName rebrands the given NamespacedName as an ObjectName func NamespacedNameAsObjectName(nn types.NamespacedName) ObjectName { … } // AsNamespacedName rebrands as a NamespacedName func (objName ObjectName) AsNamespacedName() types.NamespacedName { … }