Documentation
¶
Index ¶
- func ConfigFromName(cc *extensionv1.Extension, name string) *extensionv1.Extension_Config
- func ConfigsFromType(cm *extensionv1.ExtensionMap, typo string) []*extensionv1.Extension_Config
- func GetTypedConfig[T proto.Message](m *extensionv1.ExtensionMap, configType, name string, result T) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFromName ¶
func ConfigFromName(cc *extensionv1.Extension, name string) *extensionv1.Extension_Config
ConfigFromName returns the config with the given name.
func ConfigsFromType ¶
func ConfigsFromType(cm *extensionv1.ExtensionMap, typo string) []*extensionv1.Extension_Config
ConfigsFromType returns all configs with the given type.
func GetTypedConfig ¶
func GetTypedConfig[T proto.Message](m *extensionv1.ExtensionMap, configType, name string, result T) (bool, error)
GetTypedConfig retrieves a configuration of the specified type and name from the ExtensionMap and deserializes it into the result object. This function uses generics, requiring the generic type T to implement the proto.Message interface.
Parameters:
- m: A pointer to extensionv1.ExtensionMap containing configuration information.
- configType: The type of the configuration.
- name: The name of the configuration.
- result: An object used to receive the deserialized configuration.
Returns:
- bool: Indicates whether the configuration was successfully found and deserialized.
- error: Represents any errors that occurred during the operation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.