-
Notifications
You must be signed in to change notification settings - Fork 2
/
transaction.proto
104 lines (85 loc) · 2.33 KB
/
transaction.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
syntax = "proto3";
option go_package = "github.com/darcys22/godbledger/proto/transaction";
package transaction;
service Transactor {
rpc AddTransaction(TransactionRequest) returns (TransactionResponse) {}
rpc DeleteTransaction(DeleteRequest) returns (TransactionResponse) {}
rpc VoidTransaction(DeleteRequest) returns (TransactionResponse) {}
rpc NodeVersion(VersionRequest) returns (VersionResponse) {}
rpc AddTag(AccountTagRequest) returns (TransactionResponse) {}
rpc DeleteTag(DeleteAccountTagRequest) returns (TransactionResponse) {}
rpc AddCurrency(CurrencyRequest) returns (TransactionResponse) {}
rpc DeleteCurrency(DeleteCurrencyRequest) returns (TransactionResponse) {}
rpc GetTB(TBRequest) returns (TBResponse) {}
rpc GetListing(ReportRequest) returns (ListingResponse) {}
rpc AddAccount(AccountTagRequest) returns (TransactionResponse) {}
rpc DeleteAccount(DeleteAccountTagRequest) returns (TransactionResponse) {}
rpc ReconcileTransactions(ReconciliationRequest) returns (TransactionResponse) {}
}
message LineItem {
string accountname = 1;
string description = 2;
string currency = 3;
int64 amount = 4;
}
message Transaction {
string date = 1;
string description = 2;
repeated LineItem lines = 3;
}
message TransactionRequest {
string date = 1;
string description = 2;
repeated LineItem lines = 3;
}
message DeleteRequest {
string identifier = 1;
}
message TransactionResponse {
string message = 1;
}
message AccountTagRequest {
string account = 1;
repeated string tag = 2;
}
message DeleteAccountTagRequest {
string account = 1;
repeated string tag = 2;
}
message CurrencyRequest {
string currency = 1;
int64 decimals = 2;
}
message DeleteCurrencyRequest {
string currency = 1;
}
message TBLine {
string accountname = 1;
repeated string tags = 2;
int64 amount = 3;
string currency = 4;
int64 decimals = 5;
string amountStr = 6;
}
message TBRequest {
string date = 1;
}
message ReportRequest {
string date = 1;
string startdate = 2;
}
message TBResponse {
repeated TBLine lines = 1;
}
message ListingResponse {
repeated Transaction transactions = 1;
}
message ReconciliationRequest {
repeated string splitID = 1;
}
message VersionRequest {
string message = 1;
}
message VersionResponse {
string message = 1;
}