WIP: plugins: add compile-time plugin system, migrate aws + ripeatlas#869
Open
brainexe wants to merge 1 commit into
Open
WIP: plugins: add compile-time plugin system, migrate aws + ripeatlas#869brainexe wants to merge 1 commit into
brainexe wants to merge 1 commit into
Conversation
Turn the bot into a framework with a proper plugin system built on the existing bot.RegisterPlugin registry (Caddy/xcaddy-style compile-time composition). Plugins register commands, read their own config, use storage, run async tasks and access the Slack client. - bot/config: add Config.LoadPlugin (reads "plugins: <name>:" with a legacy top-level key fallback) and Config.IsPluginEnabled kill switch; promote the viper key delimiter to a const and fix Config.Set to use it; drop the dead Plugins []string field - bot/plugin.go: gate loadPlugins on IsPluginEnabled, warn on dup names - plugins are own Go modules so their deps stay out of the core module: the AWS SDK now lives only in plugins/aws, not in slack-bot itself - migrate command/clouds/aws -> plugins/aws and command/ripeatlas -> plugins/ripeatlas; add plugins/example reference plugin - cmd/bot + cmd/cli become own modules that blank-import the plugins; a go.work workspace ties everything together (make dep -> go work vendor) - Makefile/CI/gosec use the module-path pattern to span all modules, lint runs per module; examples build with GOWORK=off - docs/plugins.md authoring guide, config.example.yaml + readme updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turn the bot into a framework with a proper plugin system built on the existing bot.RegisterPlugin registry (Caddy/xcaddy-style compile-time composition). Plugins register commands, read their own config, use storage, run async tasks and access the Slack client.