moul / protoc-gen-gotemplate

:open_file_folder: generic protocol generator based on golang's text/template (grpc/protobuf)
https://manfred.life/protoc-gen-gotemplate
MIT License
430 stars 70 forks source link

Question: grpc system to do html and JSON data binding #138

Open ghost opened 5 years ago

ghost commented 5 years ago

This is a really fascinating project. Using grpc and templating makes it possible to do allot of codegen.

I think what I want to do is not possible with this project but here goes:

I need to model a hierarchical html to JSON databinding system. The use case is that users have html and JSON and want a grpc client that they can call from their language in order to produce the final html with the data merged.

A bit like mustache but using grpc so any other language can use it.

Again I am not sure that the architecture of this project facilitates this because in this project protobuf is uses as the SDL defining the data itself. Then you take templates and hey presto you get your output ( anything you want ).

If you can comment on my thought I would appreciate it