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

framework/controller: Improve support for injecting request-specific dependencies #181

Merged
merged 5 commits into from
Jul 2, 2022

Conversation

matthewmueller
Copy link
Contributor

@matthewmueller matthewmueller commented Jul 2, 2022

The following PR improves support for injecting request-specific dependencies that include *http.Request and/or http.ResponseWriter. This will form the basis for higher-level APIs like sessions.

This PR also changes the provider signature to be easier to generate. Now all hoisted dependencies come before all external dependencies. Within hoisted and non-hoisted dependencies, they're sorted in alphabetical order.

Finally, this PR also refactors the controller generation code to use *di.Provider instead of the home-grown structs in the controller state.

Todo:

  • Fix issue with log package in controller interfering with log package in app.

@matthewmueller matthewmueller marked this pull request as draft July 2, 2022 07:36
@matthewmueller matthewmueller marked this pull request as ready for review July 2, 2022 07:52
@matthewmueller matthewmueller changed the title Add set cookie framework/controller: Improve support for injecting request-specific dependencies Jul 2, 2022
@matthewmueller matthewmueller merged commit f387233 into main Jul 2, 2022
@matthewmueller matthewmueller deleted the add-set-cookie branch July 2, 2022 17:07
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