Documentation
¶
Overview ¶
Package plugin provides the type-keyed capability registry used by the GoModularAuth plugin runtime.
A plugin MODULE is the installable component (organizations.New()). A plugin CAPABILITY is the type the application consumes (plugins.Organization). Modules register capabilities in the Registry; applications retrieve them with auth.Get[T]().
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when no module provides the requested capability. ErrNotFound = errors.New("plugin: capability not registered") // ErrDuplicate is returned when a module ID or capability is registered twice. ErrDuplicate = errors.New("plugin: duplicate registration") )
Functions ¶
Types ¶
type Registry ¶ added in v1.3.0
type Registry struct {
// contains filtered or unexported fields
}
Registry stores modules by ID and capabilities by their static type. It is safe for concurrent use.
func NewRegistry ¶ added in v1.3.0
func NewRegistry() *Registry
NewRegistry returns an empty registry.
Click to show internal directories.
Click to hide internal directories.