Documentation
¶
Overview ¶
Package gvkimplementation provides a flexible registry that maps Kubernetes GroupVersionKinds (GVKs) to their corresponding handler and importer implementations.
This design enables easy extension beyond GitLab resources. For example, additional GVKs for Azure AD Groups or other providers can be registered without modifying existing logic—simply add new entries to the registry.
Functions:
- IsAllowed: checks if a GVK is supported.
- LookupByGVK: retrieves the implementation for a GVK.
Extending for other providers:
To support Azure AD Groups or other resource types, define the new GVK and register its handler/importer in ImplementationByGVK. No changes to the processing logic are required.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAllowed ¶
func IsAllowed(gvk schema.GroupVersionKind) bool
IsAllowed checks whether the given GroupVersionKind (GVK) is present in the allowedGVKs set. It returns true if the GVK is permitted for processing, and false otherwise.
Types ¶
type Implementation ¶
Implementation contains Handler and Importer for specific resource implementation.
func LookupByGKV ¶
func LookupByGKV(gkv schema.GroupVersionKind) (Implementation, bool)
LookupByGKV retrieves the implementation (handler and importer) associated with the given GroupVersionKind (GVK) from the implementationByGVK registry. It returns the implementation and a boolean indicating whether the GVK was found.