extension

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL