08f427899c
Summary: change go_package path Test Plan: none Reviewers: nex, wuyi Reviewed By: nex Differential Revision: https://phabricator.internetapi.cn/D29
43 lines
988 B
Protocol Buffer
43 lines
988 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package bdledger.api;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "bdledger/api/common.proto";
|
|
|
|
option go_package = "bdware.org/bdledger/pkg/api/grpc/proto";
|
|
option java_package = "bdledger.api.grpc.ledger";
|
|
option java_outer_classname = "LedgerProto";
|
|
option java_multiple_files = true;
|
|
|
|
service TransactionLedger {
|
|
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
|
|
rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse);
|
|
rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse);
|
|
}
|
|
|
|
message CreateLedgerRequest {
|
|
string name = 1;
|
|
}
|
|
message CreateLedgerResponse {
|
|
bool ok = 1;
|
|
}
|
|
|
|
message GetLedgersResponse {
|
|
repeated string ledgers = 1;
|
|
}
|
|
|
|
message SendTransactionRequest {
|
|
string ledger = 1;
|
|
message Transaction {
|
|
TransactionType type = 1;
|
|
bytes from = 2;
|
|
bytes to = 3;
|
|
bytes data = 4;
|
|
}
|
|
Transaction transaction = 2;
|
|
}
|
|
message SendTransactionResponse {
|
|
bytes hash = 1;
|
|
}
|