An open API service indexing awesome lists of open source software.

https://github.com/yinqiwen/protoc-gen-mmdata


https://github.com/yinqiwen/protoc-gen-mmdata

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# protoc-gen-mmdata

A protocol buffer3 compiler plugin to generater source file for [mmdata](https://github.com/yinqiwen/mmdata)

## Dependency

- [golang](https://golang.org/)
- [protocol buffer3](https://github.com/google/protobuf)
- [mmdata](https://github.com/yinqiwen/mmdata) Read/write data structure for shared memory
- [kcfg](https://github.com/yinqiwen/kcfg) Headonly C++ json config mapping library.

## Usage
- go get -t -u github.com/yinqiwen/protoc-gen-mmdata
- protoc -plugin=$GOPATH/bin/protoc-gen-mmdata --mmdata_out=./ -I`` -I`` mydata.proto

## Example
```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];
}
```