本文主要对proto3语法翻译。参考网址:https://developers.google.com/protocol-buffers/docs/proto3
defining a message type 定义一个消息类型
Scala value types 标量类型
default values 默认值
enumerations 枚举
Using other message Types 使用其他消息类型
Nested Types 嵌套类型
UpdataIng a message types 更新消息类型
Unknown fields 为止字段
any
Oneof
maps
packages 包装
defining services 定义服务
Json Mapping json 映射
Options 选择 选项
Generating Your Classes 创建你的类
this guide describes how to use the protocol buffer language to structure your
指导你怎么使用protocol buffer 语言和搭建自己的protocol buffer数据,包括.proto语法和建造自己的proto数据结构。这篇文章覆盖了proto3的整个语言,proto2语法地址参照:《proto2 语法指南》
syntax = "proto3"; message SearchRequest { string query = 1; int32 page_number = 2; int32 result_per_page = 3; }
原文:https://www.cnblogs.com/oceanran/p/11112895.html