Update proto files and scripts

This commit is contained in:
Nex 2018-09-07 12:53:15 +08:00
parent e005d60971
commit e9ca38a078
5 changed files with 26 additions and 7 deletions

View File

@ -1,8 +1,13 @@
syntax = "proto3";
package api;
package bg.api;
import "common.proto";
import "bg/api/common.proto";
option go_package = "bg/api/protobuf/ac_chain";
option java_package = "bg.protobuf";
option java_outer_classname = "AcChainProto";
option java_multiple_files = true;
service AcChain {
rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse);

View File

@ -1,6 +1,11 @@
syntax = "proto3";
package api;
package bg.api;
option go_package = "bg/api/protobuf/common";
option java_package = "bg.protobuf";
option java_outer_classname = "CommonProto";
option java_multiple_files = true;
enum MessageType {
RECORD = 0; //

View File

@ -1,8 +1,13 @@
syntax = "proto3";
package api;
package bg.api;
import "common.proto";
import "bg/api/common.proto";
option go_package = "bg/api/protobuf/tx_ledger";
option java_package = "bg.protobuf";
option java_outer_classname = "TxLedgerProto";
option java_multiple_files = true;
service TxLedger {
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);

View File

@ -1,2 +1,4 @@
mkdir go
protoc -I=. --go_out=plugins=grpc:go common.proto tx_ledger.proto ac_chain.proto
protoc -I . --go_out=plugins=grpc:go bg/api/common.proto
protoc -I . --go_out=plugins=grpc:go bg/api/tx_ledger.proto
protoc -I . --go_out=plugins=grpc:go bg/api/ac_chain.proto

4
gen.sh
View File

@ -1,2 +1,4 @@
mkdir go
protoc -I=. --go_out=plugins=grpc:go common.proto tx_ledger.proto ac_chain.proto
protoc -I . --go_out=plugins=grpc:go bg/api/common.proto
protoc -I . --go_out=plugins=grpc:go bg/api/tx_ledger.proto
protoc -I . --go_out=plugins=grpc:go bg/api/ac_chain.proto