-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
private/apigen: Allow to customize handlers logic
The API generator doesn't have a way to customize each Go handler endpoint unless that the Go generator is modified. This commit adds a way to customize each endpoint injecting instances of types that implement an interface (Middleware) that return the code to inject. To show how it works, the commit get rid of the 2 fields that we used to customize the authentication request with the logic that the satellite/console/consoleweb/consoleapi needs and replace the hardcoded customization using this new way to customize handlers. This new way should allow to hook the satellite/admin/back-office authorization into the handlers using a Middleware implementation. Change-Id: I894aa0026b30fa2f4a5604a6c34c22e0ed582e2b
- Loading branch information
1 parent
479fbb6
commit adcd810
Showing
10 changed files
with
432 additions
and
174 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.