rpc icon indicating copy to clipboard operation
rpc copied to clipboard

Plugin for RPC

Open platelk opened this issue 10 years ago • 5 comments

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.

platelk avatar Jul 31 '15 15:07 platelk

That is a good point. @FaisalAbid is currently looking into adding plugins to the RPC package. It should be on its way.

wibling avatar Sep 17 '15 06:09 wibling

Yea it's on this way, sometime early next week I'll get a PR going.

FaisalAbid avatar Sep 17 '15 13:09 FaisalAbid

Update on this, been super busy with work, but it's coming!

FaisalAbid avatar Sep 22 '15 00:09 FaisalAbid

Can you push the WIP to a seperate branch maybe? @FaisalAbid

RdeWilde avatar Apr 27 '16 13:04 RdeWilde

@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.

rahulakash avatar Jul 21 '16 15:07 rahulakash