api

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGatewayCtor added in v0.1.6

type APIGatewayCtor func(name string) modular.Module

APIGatewayCtor creates an APIGateway-compatible modular.Module for the given name.

type CommandHandlerCtor added in v0.1.6

type CommandHandlerCtor func(name string) modular.Module

CommandHandlerCtor creates a CommandHandler-compatible modular.Module for the given name.

type DataTransformerCtor added in v0.1.6

type DataTransformerCtor func(name string) modular.Module

DataTransformerCtor creates a DataTransformer-compatible modular.Module for the given name.

type Plugin

type Plugin struct {
	plugin.BaseEnginePlugin
	// contains filtered or unexported fields
}

Plugin provides REST API and CQRS capabilities: api.query, api.command, api.handler, api.gateway, workflow.registry, data.transformer, and processing.step modules.

func New

func New() *Plugin

New creates a new API plugin using the default concrete module constructors.

func (*Plugin) Capabilities

func (p *Plugin) Capabilities() []capability.Contract

Capabilities returns the capability contracts this plugin defines.

func (*Plugin) ModuleFactories

func (p *Plugin) ModuleFactories() map[string]plugin.ModuleFactory

ModuleFactories returns factories for all API module types. Each factory delegates construction to the injectable constructor stored on the Plugin, so callers can substitute implementations without modifying this file (see WithQueryHandlerCtor, WithCommandHandlerCtor, etc.). Post-construction config wiring uses interface assertions so that custom implementations only need to implement the methods they support.

func (*Plugin) ModuleSchemas

func (p *Plugin) ModuleSchemas() []*schema.ModuleSchema

ModuleSchemas returns UI schema definitions for API module types.

func (*Plugin) WithAPIGatewayCtor added in v0.1.6

func (p *Plugin) WithAPIGatewayCtor(ctor APIGatewayCtor) *Plugin

WithAPIGatewayCtor overrides the constructor used to create api.gateway modules.

func (*Plugin) WithCommandHandlerCtor added in v0.1.6

func (p *Plugin) WithCommandHandlerCtor(ctor CommandHandlerCtor) *Plugin

WithCommandHandlerCtor overrides the constructor used to create api.command modules.

func (*Plugin) WithDataTransformerCtor added in v0.1.6

func (p *Plugin) WithDataTransformerCtor(ctor DataTransformerCtor) *Plugin

WithDataTransformerCtor overrides the constructor used to create data.transformer modules.

func (*Plugin) WithProcessingStepCtor added in v0.1.6

func (p *Plugin) WithProcessingStepCtor(ctor ProcessingStepCtor) *Plugin

WithProcessingStepCtor overrides the constructor used to create processing.step modules.

func (*Plugin) WithQueryHandlerCtor added in v0.1.6

func (p *Plugin) WithQueryHandlerCtor(ctor QueryHandlerCtor) *Plugin

WithQueryHandlerCtor overrides the constructor used to create api.query modules.

func (*Plugin) WithRESTAPIHandlerCtor added in v0.1.6

func (p *Plugin) WithRESTAPIHandlerCtor(ctor RESTAPIHandlerCtor) *Plugin

WithRESTAPIHandlerCtor overrides the constructor used to create api.handler modules.

func (*Plugin) WithWorkflowRegistryCtor added in v0.1.6

func (p *Plugin) WithWorkflowRegistryCtor(ctor WorkflowRegistryCtor) *Plugin

WithWorkflowRegistryCtor overrides the constructor used to create workflow.registry modules.

type ProcessingStepCtor added in v0.1.6

type ProcessingStepCtor func(name string, stepConfig module.ProcessingStepConfig) modular.Module

ProcessingStepCtor creates a ProcessingStep-compatible modular.Module. stepConfig is built from the factory's config map before calling this.

type QueryHandlerCtor added in v0.1.6

type QueryHandlerCtor func(name string) modular.Module

QueryHandlerCtor creates a QueryHandler-compatible modular.Module for the given name.

type RESTAPIHandlerCtor added in v0.1.6

type RESTAPIHandlerCtor func(name, resourceName string) modular.Module

RESTAPIHandlerCtor creates a RESTAPIHandler-compatible modular.Module. resourceName is extracted from config by the factory before calling this.

type WorkflowRegistryCtor added in v0.1.6

type WorkflowRegistryCtor func(name, storageBackend string) modular.Module

WorkflowRegistryCtor creates a WorkflowRegistry-compatible modular.Module. storageBackend is extracted from config by the factory before calling this.

Jump to

Keyboard shortcuts

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