Documentation
¶
Overview ¶
Package plugin provides the interface for Grove plugins and a registry for managing them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin interface {
// Name returns the plugin identifier.
Name() string
// Init is called once when the plugin is registered with a DB.
Init(ctx context.Context, db any) error
}
Plugin is the interface that all Grove plugins must implement.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages registered plugins.
type WithHooks ¶
type WithHooks interface {
Plugin
// RegisterHooks is called to let the plugin register its hooks.
RegisterHooks(hookEngine any) error
}
WithHooks is an optional interface for plugins that register hooks.
type WithMigrations ¶
type WithMigrations interface {
Plugin
// MigrationGroup returns the plugin's migration group.
MigrationGroup() any
}
WithMigrations is an optional interface for plugins that provide migrations.
Click to show internal directories.
Click to hide internal directories.