博客
关于我
go_package 别名问题记录
阅读量:647 次
发布时间:2019-03-13

本文共 1262 字,大约阅读时间需要 4 分钟。

 

syntax = "proto3";package entity.v5;option go_package = "next-stage.com.cn/apatodon/protocol/entity/v5;entity.v5";import "google/api/annotations.proto";import "google/protobuf/wrappers.proto";//菜单信息message Menu {    int64   id = 1;             //菜单ID    string  name = 2;           //菜单名称    int64   parentId = 3;       //父级菜单ID    string  parentName = 4;     //父级菜单名称    string  url = 5;            //访问路由    int32   sequence = 6;       //自定义排序    string  icon = 7;           //菜单图标    int32   type = 8;           //菜单类型 0 目录 1 菜单 2 按钮    int32   status = 9;         //状态 0 禁用 1 启用    string  description = 10;   //描述    int64   created = 11;        //创建时间    int64   creator = 12;        //创建人    int64   updated = 13;        //更新时间    int64   updator = 14;        //更新人    int64   syncFlag = 15;       //标志    int64   syncVersion = 16;    //版本号}

生成文件指令:

E:\go\src\next-stage.com.cn\apatodon\bin\protoc.exe -I . entity/v5/menu.proto --grpc-gateway_out=logtostderr=true:. --go_out=plugins=grpc:E:\go\src --swagger_out=logtostderr=true:.

 

menu.proto 文件在目录E:\go\src\next-stage.com.cn\apatodon\protocol\entity\v5\menu.proto

由于别名的原因,要使生成的文件在E:\go\src\next-stage.com.cn\apatodon\protocol\entity\v5\下,go_out输出路径:E:\go\src,如上所示的指令。

原理,现在尚不清楚,留待日后有时间学习一下,或者哪位高人看到帮忙解答一下。

转载地址:http://xqboz.baihongyu.com/

你可能感兴趣的文章
MySQL中interactive_timeout和wait_timeout的区别
查看>>
mysql中int、bigint、smallint 和 tinyint的区别、char和varchar的区别详细介绍
查看>>
mysql中json_extract的使用方法
查看>>
mysql中json_extract的使用方法
查看>>
mysql中kill掉所有锁表的进程
查看>>
mysql中like % %模糊查询
查看>>
MySql中mvcc学习记录
查看>>
mysql中null和空字符串的区别与问题!
查看>>
MySQL中ON DUPLICATE KEY UPDATE的介绍与使用、批量更新、存在即更新不存在则插入
查看>>
MYSQL中TINYINT的取值范围
查看>>
MySQL中UPDATE语句的神奇技巧,让你操作数据库如虎添翼!
查看>>
Mysql中varchar类型数字排序不对踩坑记录
查看>>
MySQL中一条SQL语句到底是如何执行的呢?
查看>>
MySQL中你必须知道的10件事,1.5万字!
查看>>
MySQL中使用IN()查询到底走不走索引?
查看>>
Mysql中使用存储过程插入decimal和时间数据递增的模拟数据
查看>>
MySql中关于geometry类型的数据_空的时候如何插入处理_需用null_空字符串插入会报错_Cannot get geometry object from dat---MySql工作笔记003
查看>>
mysql中出现Incorrect DECIMAL value: '0' for column '' at row -1错误解决方案
查看>>
mysql中出现Unit mysql.service could not be found 的解决方法
查看>>
mysql中出现update-alternatives: 错误: 候选项路径 /etc/mysql/mysql.cnf 不存在 dpkg: 处理软件包 mysql-server-8.0的解决方法(全)
查看>>