plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 15 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecipeConfiguration

func RecipeConfiguration(jsonSchema map[string]any) (*structpb.Struct, error)

func ValidatePluginPolicy

func ValidatePluginPolicy(policyDoc vtypes.PluginPolicy, spec *rtypes.RecipeSchema) error

func WithMigrations

func WithMigrations[T any](
	logger *logrus.Logger,
	pool *pgxpool.Pool,
	constructor func(*pgxpool.Pool) T,
	migrationsDir string,
) (T, error)

Types

type MigrationManager

type MigrationManager struct {
	// contains filtered or unexported fields
}

MigrationManager handles plugin-specific migrations

func NewMigrationManager

func NewMigrationManager(logger *logrus.Logger, pool *pgxpool.Pool, dir string) *MigrationManager

func (*MigrationManager) Migrate

func (m *MigrationManager) Migrate() error

type Spec

type Spec interface {
	GetRecipeSpecification() (*rtypes.RecipeSchema, error)
	ValidatePluginPolicy(policyDoc types.PluginPolicy) error
	Suggest(configuration map[string]any) (*rtypes.PolicySuggest, error)
}

type Unimplemented

type Unimplemented struct {
}

Unimplemented for backward compatibility in the case of new interface methods

func (*Unimplemented) GetRecipeSpecification

func (*Unimplemented) GetRecipeSpecification() (*rtypes.RecipeSchema, error)

func (*Unimplemented) Suggest

func (*Unimplemented) Suggest(map[string]any) (*rtypes.PolicySuggest, error)

func (*Unimplemented) ValidatePluginPolicy

func (*Unimplemented) ValidatePluginPolicy(_ types.PluginPolicy) error

Jump to

Keyboard shortcuts

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