Plugin for RPC
Hi,
After some times looking at RPC package, i didn't find any section about plugin or what is the recommended way to extends RPC as we can do in redstone here.
Why is want plugin ?
Because it think this is a nice way to extends the functionality of RPC and the annotation system can make it very clean, and easily reusable.
as example here i have create an authentication handler that allow me to check that the user is correctly authenticate before hitting the "/info/detail"
@IsAuth()
@app.Group("/account")
class AccountApi {
AccountApi();
@ToJson()
@app.Route("/info/detail", methods: const[app.GET])
getDetailInfo() {
// ...
}
So i didn't see equivalent in RPC, so is it possible to do the same thing in RPC or not ? This kind of system would allow people to create mapper that can increasingly improve the experience of RPC.
That is a good point. @FaisalAbid is currently looking into adding plugins to the RPC package. It should be on its way.
Yea it's on this way, sometime early next week I'll get a PR going.
Update on this, been super busy with work, but it's coming!
Can you push the WIP to a seperate branch maybe? @FaisalAbid
@wibling @FaisalAbid : Is there any update on this? It would be really awesome to have the plugin support for RPC similar to Redstone Plugin API. This support will be a great add on for RPC moving forward. Thanks in advance.