service backend
This commit is contained in:
19
api/proto/common/accounting/v1/posting.proto
Normal file
19
api/proto/common/accounting/v1/posting.proto
Normal file
@@ -0,0 +1,19 @@
|
||||
syntax = "proto3";
|
||||
package common.accounting.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/accounting/v1;accountingv1";
|
||||
|
||||
// Direction on a line; safe to share.
|
||||
enum EntrySide {
|
||||
ENTRY_SIDE_UNSPECIFIED = 0;
|
||||
ENTRY_SIDE_DEBIT = 1;
|
||||
ENTRY_SIDE_CREDIT = 2;
|
||||
}
|
||||
|
||||
// Generic line semantics used across services for derived lines.
|
||||
enum PostingLineType {
|
||||
POSTING_LINE_TYPE_UNSPECIFIED = 0;
|
||||
POSTING_LINE_FEE = 1;
|
||||
POSTING_LINE_TAX = 2;
|
||||
POSTING_LINE_SPREAD = 3;
|
||||
POSTING_LINE_REVERSAL = 4;
|
||||
}
|
||||
14
api/proto/common/fx/v1/fx.proto
Normal file
14
api/proto/common/fx/v1/fx.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
package common.fx.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/fx/v1;fxv1";
|
||||
|
||||
message CurrencyPair {
|
||||
string base = 1;
|
||||
string quote = 2;
|
||||
}
|
||||
|
||||
enum Side {
|
||||
SIDE_UNSPECIFIED = 0;
|
||||
BUY_BASE_SELL_QUOTE = 1;
|
||||
SELL_BASE_BUY_QUOTE = 2;
|
||||
}
|
||||
23
api/proto/common/money/v1/money.proto
Normal file
23
api/proto/common/money/v1/money.proto
Normal file
@@ -0,0 +1,23 @@
|
||||
syntax = "proto3";
|
||||
package common.money.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/money/v1;moneyv1";
|
||||
|
||||
message Decimal { string value = 1; } // exact decimal as string
|
||||
|
||||
message Money {
|
||||
string amount = 1; // decimal string
|
||||
string currency = 2; // ISO 4217 or your code set
|
||||
}
|
||||
|
||||
enum RoundingMode {
|
||||
ROUNDING_MODE_UNSPECIFIED = 0;
|
||||
ROUND_HALF_EVEN = 1;
|
||||
ROUND_HALF_UP = 2;
|
||||
ROUND_DOWN = 3;
|
||||
}
|
||||
|
||||
message CurrencyMeta {
|
||||
string code = 1;
|
||||
uint32 decimals = 2;
|
||||
RoundingMode rounding = 3;
|
||||
}
|
||||
12
api/proto/common/pagination/v1/cursor.proto
Normal file
12
api/proto/common/pagination/v1/cursor.proto
Normal file
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package common.pagination.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/pagination/v1;paginationv1";
|
||||
|
||||
message CursorPageRequest {
|
||||
string cursor = 1; // opaque
|
||||
int32 limit = 2; // page size
|
||||
}
|
||||
|
||||
message CursorPageResponse {
|
||||
string next_cursor = 1; // opaque
|
||||
}
|
||||
9
api/proto/common/trace/v1/trace.proto
Normal file
9
api/proto/common/trace/v1/trace.proto
Normal file
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
package common.trace.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/trace/v1;tracev1";
|
||||
|
||||
message TraceContext {
|
||||
string request_ref = 1;
|
||||
string idempotency_key = 2;
|
||||
string trace_ref = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user