clay
clay copied to clipboard
genhandler: create own registry
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