Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre/post middleware support to command handlers #106

Merged
merged 6 commits into from
Feb 7, 2025

Conversation

wesen
Copy link
Collaborator

@wesen wesen commented Feb 7, 2025

Adds support for pre and post middleware execution in command handlers:

  • Add preMiddlewares and postMiddlewares fields to GenericCommandHandler
  • Add WithPreMiddlewares() and WithPostMiddlewares() options
  • Execute middleware chain in order: pre -> parameter filter -> post
  • Fix middleware execution order in parameter filter
  • Add extensive documentation for middleware patterns and usage
  • Add parameter filter options for whitelist/blacklist configuration
  • Fix template lookup initialization
  • Add error handling for handler initialization

Breaking changes:

  • NewCommandHandler() now returns error
  • NewGenericCommandHandler() now returns error
  • Parameter filter middleware execution order changed

@wesen wesen merged commit bc16f5c into go-go-golems:main Feb 7, 2025
2 checks passed
@wesen wesen deleted the task/add-docs branch February 7, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant