{"modulePath":"github.com/GoCodeAlone/workflow","version":"v0.87.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Types\n\n```go\ntype APIGatewayCtor func(name string) modular.Module\n```\nAPIGatewayCtor creates an APIGateway-compatible modular.Module for the given name.\n\n```go\ntype CommandHandlerCtor func(name string) modular.Module\n```\nCommandHandlerCtor creates a CommandHandler-compatible modular.Module for the given name.\n\n```go\ntype DataTransformerCtor func(name string) modular.Module\n```\nDataTransformerCtor creates a DataTransformer-compatible modular.Module for the given name.\n\n```go\ntype Plugin struct {\n\tplugin.BaseEnginePlugin\n\t// contains filtered or unexported fields\n}\n```\nPlugin provides REST API and CQRS capabilities: api.query, api.command, api.handler, api.gateway, workflow.registry, data.transformer, and processing.step modules.\n\n```go\nfunc New() *Plugin\n```\nNew creates a new API plugin using the default concrete module constructors.\n\n```go\nfunc (p *Plugin) Capabilities() []capability.Contract\n```\nCapabilities returns the capability contracts this plugin defines.\n\n```go\nfunc (p *Plugin) ModuleFactories() map[string]plugin.ModuleFactory\n```\nModuleFactories 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.\n\n```go\nfunc (p *Plugin) ModuleSchemas() []*schema.ModuleSchema\n```\nModuleSchemas returns UI schema definitions for API module types.\n\n```go\nfunc (p *Plugin) WithAPIGatewayCtor(ctor APIGatewayCtor) *Plugin\n```\nWithAPIGatewayCtor overrides the constructor used to create api.gateway modules.\n\n```go\nfunc (p *Plugin) WithCommandHandlerCtor(ctor CommandHandlerCtor) *Plugin\n```\nWithCommandHandlerCtor overrides the constructor used to create api.command modules.\n\n```go\nfunc (p *Plugin) WithDataTransformerCtor(ctor DataTransformerCtor) *Plugin\n```\nWithDataTransformerCtor overrides the constructor used to create data.transformer modules.\n\n```go\nfunc (p *Plugin) WithProcessingStepCtor(ctor ProcessingStepCtor) *Plugin\n```\nWithProcessingStepCtor overrides the constructor used to create processing.step modules.\n\n```go\nfunc (p *Plugin) WithQueryHandlerCtor(ctor QueryHandlerCtor) *Plugin\n```\nWithQueryHandlerCtor overrides the constructor used to create api.query modules.\n\n```go\nfunc (p *Plugin) WithRESTAPIHandlerCtor(ctor RESTAPIHandlerCtor) *Plugin\n```\nWithRESTAPIHandlerCtor overrides the constructor used to create api.handler modules.\n\n```go\nfunc (p *Plugin) WithWorkflowRegistryCtor(ctor WorkflowRegistryCtor) *Plugin\n```\nWithWorkflowRegistryCtor overrides the constructor used to create workflow.registry modules.\n\n```go\ntype ProcessingStepCtor func(name string, stepConfig module.ProcessingStepConfig) modular.Module\n```\nProcessingStepCtor creates a ProcessingStep-compatible modular.Module. stepConfig is built from the factory's config map before calling this.\n\n```go\ntype QueryHandlerCtor func(name string) modular.Module\n```\nQueryHandlerCtor creates a QueryHandler-compatible modular.Module for the given name.\n\n```go\ntype RESTAPIHandlerCtor func(name, resourceName string) modular.Module\n```\nRESTAPIHandlerCtor creates a RESTAPIHandler-compatible modular.Module. resourceName is extracted from config by the factory before calling this.\n\n```go\ntype WorkflowRegistryCtor func(name, storageBackend string) modular.Module\n```\nWorkflowRegistryCtor creates a WorkflowRegistry-compatible modular.Module. storageBackend is extracted from config by the factory before calling this.\n\n","path":"github.com/GoCodeAlone/workflow/plugins/api","name":"api","synopsis":"","isRedistributable":true}
