Documentation
¶
Overview ¶
Package customize implements the functions, types, and interfaces for the module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFromName ¶
func ConfigFromName(cc *configv1.Customize, name string) *configv1.Customize_Config
ConfigFromName returns the config with the given name.
func ConfigsFromType ¶
func ConfigsFromType(cm *configv1.CustomizeMap, typo string) []*configv1.Customize_Config
ConfigsFromType returns all configs with the given type.
func GetTypedConfig ¶
func GetTypedConfig[T proto.Message](m *configv1.CustomizeMap, configType, name string, result T) (bool, error)
GetTypedConfig retrieves a configuration of the specified type and name from the CustomizeMap 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 configv1.CustomizeMap 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.