background
In the process of using the Golang
language to develop "multiple" services, I have done a lot of CURD
business, and I stopped and thought about it and found:
- out of demand
- Create a table as needed
- Define the grpc field through the table, that is, define proto.
- proto generates the pb.go file.
- Port layer outbound interface definition, in json format.
It is to extract the mysql
field, and then generate go结构体
, proto message
, so I wonder if I can make a tool to solve this problem.
The author is a chicken, so I usegolang
to engage incurd
la~
So, I just want to have a tool that can define create table sql and automatically create proto files and json structures.
pigeon
I did what I said, but after stumbling and stumbling for more than a year, pigeons and pigeons, it finally came out.
Looking at last year's submission, it takes so long to do such a simple thing~
project address
Visit http://tools.itjsz.com
use
SQL
- Generate Go struct through SQL, Proto
Here we pass in the Wordpress
library's wp_user
table.
It is not supported to generate create table SQL from other types of data.
Yaml
- Generate data in other formats through yaml
Here is an example of yaml created bydeploy
k8s
Toml
- Convert data into other formats through
Toml
Projects often use Toml
as the configuration file. Here we pass Toml
text
other types
Others include json
, xml
, proto
format, so we will not demonstrate them one by one, and the usage methods are similar.
At last
The product has been launched, and you are welcome to experience it. If you encounter any problems in use, or have any suggestions, please let me know through the following company number.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。