Documentation ¶
Index ¶
- func AnnotationsBasedOnParent(parentNS *objectcontext.ObjectContext, nsName string) map[string]string
- func ComposeNamespace(name string, labels map[string]string, annotations map[string]string) *corev1.Namespace
- func Depth(namespace client.Object) int
- func DisplayName(namespace client.Object) string
- func DisplayNameSlice(ns *objectcontext.ObjectContext) []string
- func IsChildless(namespace *objectcontext.ObjectContext) bool
- func IsNamespace(obj client.Object) bool
- func IsRoot(namespace client.Object) bool
- func IsSecondaryRoot(namespace client.Object) bool
- func LabelsBasedOnParent(parentNS *objectcontext.ObjectContext, nsName string) map[string]string
- func Parent(namespace client.Object) string
- func SNSFromNamespace(namespace *objectcontext.ObjectContext) (*objectcontext.ObjectContext, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotationsBasedOnParent ¶
func AnnotationsBasedOnParent(parentNS *objectcontext.ObjectContext, nsName string) map[string]string
AnnotationsBasedOnParent returns labels for a namespace based on the ones of the namespace of the parent.
func ComposeNamespace ¶
func ComposeNamespace(name string, labels map[string]string, annotations map[string]string) *corev1.Namespace
ComposeNamespace returns a namespace object based on the given parameters.
func DisplayName ¶
DisplayName returns the displayName annotation of a namespace.
func DisplayNameSlice ¶
func DisplayNameSlice(ns *objectcontext.ObjectContext) []string
DisplayNameSlice returns a slice of strings that contains the hierarchy of a namespace in accordance to its display-name.
func IsChildless ¶
func IsChildless(namespace *objectcontext.ObjectContext) bool
IsChildless checks if the given namespace has any subnamespaces, and returns true if it does not have any subnamespaces.
func IsNamespace ¶
IsNamespace returns true if an object is of type namespace.
func IsSecondaryRoot ¶
IsSecondaryRoot returns true if a namespace is a secondary root.
func LabelsBasedOnParent ¶
func LabelsBasedOnParent(parentNS *objectcontext.ObjectContext, nsName string) map[string]string
LabelsBasedOnParent returns labels for a namespace based on the ones of the namespace of the parent.
func SNSFromNamespace ¶
func SNSFromNamespace(namespace *objectcontext.ObjectContext) (*objectcontext.ObjectContext, error)
SNSFromNamespace returns the subnamespace corresponding to a namespace.
Types ¶
This section is empty.