internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package internal implements the workflow-plugin-audit-chain plugin.

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.0"

Version is set at build time via -ldflags "-X github.com/GoCodeAlone/workflow-plugin-audit-chain/internal.Version=X.Y.Z". Default is a bare semver so plugin loaders that validate semver accept unreleased dev builds; goreleaser overrides with the real release tag.

Functions

func NewPlugin

func NewPlugin() sdk.PluginProvider

NewPlugin returns a new plugin instance. main.go calls sdk.Serve(NewPlugin()).

Types

type AuditChainPlugin

type AuditChainPlugin struct{}

AuditChainPlugin implements sdk.PluginProvider, sdk.TypedModuleProvider, and sdk.TypedStepProvider. Zero map[string]any in plugin code: all module and step boundaries use typed proto messages (anypb.Any).

func (*AuditChainPlugin) CreateModule

func (p *AuditChainPlugin) CreateModule(typeName, _ string, _ map[string]any) (sdk.ModuleInstance, error)

CreateModule satisfies the legacy sdk.ModuleProvider interface. Returns "not yet implemented" for known types (encouraging upgrade to typed path) and "unknown module type" for unrecognised types.

func (*AuditChainPlugin) CreateStep

func (p *AuditChainPlugin) CreateStep(typeName, _ string, _ map[string]any) (sdk.StepInstance, error)

CreateStep satisfies the legacy sdk.StepProvider interface. The gRPC server prefers TypedStepProvider, so this path is only reached by engines that do not support typed steps.

func (*AuditChainPlugin) CreateTrigger

func (p *AuditChainPlugin) CreateTrigger(typeName string, config map[string]any, cb sdk.TriggerCallback) (sdk.TriggerInstance, error)

CreateTrigger creates a trigger instance of the given type.

func (*AuditChainPlugin) CreateTypedModule

func (p *AuditChainPlugin) CreateTypedModule(typeName, name string, config *anypb.Any) (sdk.ModuleInstance, error)

CreateTypedModule creates a module instance from a typed proto config. No map[string]any is used; config is unpacked directly into the target proto.

func (*AuditChainPlugin) CreateTypedStep

func (p *AuditChainPlugin) CreateTypedStep(typeName, name string, config *anypb.Any) (sdk.StepInstance, error)

CreateTypedStep creates a typed step instance. Each factory handles exactly one type; the first match wins. Unknown types return "unknown step type".

func (*AuditChainPlugin) Manifest

func (p *AuditChainPlugin) Manifest() sdk.PluginManifest

Manifest returns the plugin metadata used by the workflow engine for discovery and capability negotiation.

func (*AuditChainPlugin) ModuleTypes

func (p *AuditChainPlugin) ModuleTypes() []string

ModuleTypes satisfies the legacy sdk.ModuleProvider interface. The gRPC server calls TypedModuleProvider first, so this is only reached if the engine does not support typed modules.

func (*AuditChainPlugin) StepTypes

func (p *AuditChainPlugin) StepTypes() []string

StepTypes returns the step type names this plugin provides. Satisfies the legacy sdk.StepProvider interface; TypedStepProvider is preferred by the gRPC server.

func (*AuditChainPlugin) TriggerTypes

func (p *AuditChainPlugin) TriggerTypes() []string

TriggerTypes returns the trigger type names this plugin provides.

func (*AuditChainPlugin) TypedModuleTypes

func (p *AuditChainPlugin) TypedModuleTypes() []string

TypedModuleTypes returns the module type names this plugin provides. The gRPC server prefers TypedModuleProvider over the legacy ModuleProvider.

func (*AuditChainPlugin) TypedStepTypes

func (p *AuditChainPlugin) TypedStepTypes() []string

TypedStepTypes returns the step type names served via the typed gRPC path.

Jump to

Keyboard shortcuts

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