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

Standardize how CLI commands and REST + socket endpoints are registered #629

Closed
faboweb opened this issue Mar 15, 2018 · 4 comments
Closed

Comments

@faboweb
Copy link
Contributor

faboweb commented Mar 15, 2018

Currently registering REST endpoints and CLI commands is highly individual. A developer would create a REST hanler and a CLI handler that parse their own data and apply them to some logic. This produces a lot of duplicate code.
We discussed, that it would make sense to to have one standardized way/method to register endpoints. This method would in one go register REST, CLI and sockets.

But we also said, that this would again be a big refactor and we will probably be doing this after launch.

Pulling in @rigelrozanski @mappum @jaekwon @gamarin2

@jackzampolin
Copy link
Member

We have, since this issue was opened, standardized the endpoints a bit on our modules. We have also moved to using queriers to standardize database queries and used those functions to feed both the lite-client and the gaiacli. I think we can close this issue in favor of #1081 (the remaining work here)

@faboweb
Copy link
Contributor Author

faboweb commented Oct 12, 2018

I was speaking more of something like have one function: RegisterCmd('GET' 'keys', handler) that would setup a cli cmd gaiacli keys that outputs data and sets up a REST route GET /keys that returns data. This would make working with the SDK as an SDK a lot easier I guess.

#post-launch

@jackzampolin
Copy link
Member

@faboweb we already have that I think... Please open another issue with details there if you could

@faboweb
Copy link
Contributor Author

faboweb commented Oct 15, 2018

@cwgoes can you confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants