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

How to group server handle methods into single interface? #2408

Open
aclowkey opened this issue Sep 28, 2020 · 1 comment
Open

How to group server handle methods into single interface? #2408

aclowkey opened this issue Sep 28, 2020 · 1 comment

Comments

@aclowkey
Copy link

aclowkey commented Sep 28, 2020

Problem statement

I wanted to know if it's possible to group the interface generated into a single interface.

i.e. instead of

handler = myHandler{}
api.GetV1EntityHandler = handler
api.PostV1EntityPathHandler = handler

Have a single interface for the Tag "Entity"

api.EntityHandler =  myHandler{}

Right now I have 50 different routes, all of them have terrible names, if there are other organization tips I'd also be happy to hear.

@fredbi
Copy link
Contributor

fredbi commented Nov 14, 2020

@aclowkey you may define tags: this splits the handlers into small sub-packages, which have their own interface

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

2 participants