restful-protobuf:将protobuf与REST API一起使用的示例代码

时间:2024-05-23 18:55:45
【文件属性】:

文件名称:restful-protobuf:将protobuf与REST API一起使用的示例代码

文件大小:15KB

文件格式:ZIP

更新时间:2024-05-23 18:55:45

JavaScript

RESTful + Protobuf 该项目试图演示RESTful API对protobuf协议的用法。 该服务使用Go编写,并且使用Javascript和Ruby提供了两个客户端。 先决条件 码头工人 protoc(如果您想尝试编译protobuf文件) 试用代码 make build # start the go server make start-server # run js client make run-js # run ruby client make run-rb # run both clients (js then ruby) make run 编译一个protobuf文件 删除并重新生成protobuf文件。 make clean-proto make proto 查看使用的命令的更多详细信息,并使用protoc --help查看可用选项。


【文件预览】:
restful-protobuf-master
----hello.proto(535B)
----server()
--------Dockerfile.server(86B)
--------main.go(1KB)
--------go.sum(828B)
--------proto()
--------go.mod(225B)
----Makefile(913B)
----README.md(739B)
----clients()
--------js()
--------ruby()

网友评论