A protocol buffer3 compiler plugin to generater source file for mmdata
- golang
- protocol buffer3
- mmdata Read/write data structure for shared memory
- kcfg Headonly C++ json config mapping library.
- go get -t -u github.com/yinqiwen/protoc-gen-mmdata
- protoc -plugin=$GOPATH/bin/protoc-gen-mmdata --mmdata_out=./ -I
<protoc-gen-mmdata_dir>
-I<protobuf_include_dir>
mydata.proto
syntax = "proto3";
import "mmdata_base.proto";
package RECMD_SHM_DATA_V3;
message WhiteListItem
{
int64 testid = 1;
int64 ruleid = 2;
}
message WhiteListData
{
string imei = 1 [(Key) = true];
repeated WhiteListItem items = 2 [(Value) = true];
}