- Create a
Use method which accepts any type implementing an interface which looks like:
type PluginImpl interface {
Name() string
Driver() string
}
- Then make a struct which implements the above interface
type PluginDetails struct{
Name, Driver string
}
Use may be called multiple times. Simply add the plugins passed to it in an internal array.
Use can accept multiple plugins in a single invocation. Consider spreading input parameter.
- The router will add the array of plugins registered to
x-sc-plugins extension in the OpenAPI Operation Object of each registered handler.
If you want this feature to be implemented, give it a thumbs up reaction, so that we can determine which features are important to you.
👍
Usemethod which accepts any type implementing an interface which looks like:Usemay be called multiple times. Simply add the plugins passed to it in an internal array.Usecan accept multiple plugins in a single invocation. Consider spreading input parameter.x-sc-pluginsextension in the OpenAPIOperationObject of each registered handler.