https://github.com/yinqiwen/protoc-gen-mmdata
https://github.com/yinqiwen/protoc-gen-mmdata
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yinqiwen/protoc-gen-mmdata
- Owner: yinqiwen
- Created: 2017-12-25T11:03:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-14T02:16:02.000Z (over 6 years ago)
- Last Synced: 2025-02-23T19:14:13.666Z (8 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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];
}
```