pluginconfig

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPluginVersionCompatibility

func CheckPluginVersionCompatibility(
	installedPluginVersion string,
	versionConstraint string,
) (bool, error)

CheckPluginVersionCompatibility checks if the installed plugin version is compatible with the given version constraint. Version constraints are in the format of:

  • `^1.2.3` for minor range constraint
  • `~1.2.3` for patch range constraint
  • `1.2.3` for exact version

func ToConfigDefinitionProviders

func ToConfigDefinitionProviders[PluginSuperType DefinitionProvider](
	providers map[string]PluginSuperType,
) map[string]DefinitionProvider

ToConfigDefinitionProviders is a helper function that converts a map of plugins (either transformers or providers) to a map of the simplified PluginConfigDefinitionProvider interface. Maps and slices of an interface aren't interchangeable between super type and subtypes.

Types

type DefinitionProvider

type DefinitionProvider interface {
	ConfigDefinition(ctx context.Context) (*core.ConfigDefinition, error)
}

DefinitionProvider is an interface that defines any plugin type that provides a config definition schema.

type Preparer

type Preparer interface {
	// Prepare validates and populates default values for the provided configuration
	// using the plugin-provided config definition schemas.
	// It returns diagnostics for validation errors,
	// and an error if something went wrong during validation and preparation.
	// If validate is set to false, this will skip validation
	// and only populate default values.
	Prepare(
		ctx context.Context,
		blueprintOpConfig *types.BlueprintOperationConfig,
		validate bool,
	) (*types.BlueprintOperationConfig, []*core.Diagnostic, error)
}

Preparer provides an interface for a service that validates and prepares plugin-specific configuration against the plugin-provided config definition schema.

func NewDefaultPreparer

func NewDefaultPreparer(
	providers map[string]DefinitionProvider,
	transformers map[string]DefinitionProvider,
	pluginManager pluginservicev1.Manager,
) Preparer

NewDefaultPreparer creates a new default implementation of a service that validates and populates defaults for plugin-specific configuration using the plugin-provided config definition schemas.

Jump to

Keyboard shortcuts

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