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

genhandler: create own registry #98

Open
utrack opened this issue Sep 3, 2020 · 0 comments
Open

genhandler: create own registry #98

utrack opened this issue Sep 3, 2020 · 0 comments

Comments

@utrack
Copy link
Owner

utrack commented Sep 3, 2020

ref #97, preparation for v3

Currently, genhandler is closely tied up to protobuf & grpc-gateway structures.

Instead of using external abstractions and calling functions from the template, we should build our own registry that'll already have all the data we would need to generate that template. This will make it easier to change templates.

See this example: https://github.com/utrack/clay/blob/master/cmd/protoc-gen-goclay/genhandler/tpl_servicedesc.go#L8
It'll be easier if every Service would already have .GoTypeName field embedded in it.

This map contains all the functions that are called from the template: https://github.com/utrack/clay/blob/master/cmd/protoc-gen-goclay/genhandler/template.go#L224

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

No branches or pull requests

1 participant