RationBridgeFunding reads a deposit as late, then several RPC round trips later applies a HOLD referencing that deposit_id — with nothing serializing that gap against webhook-ingestion's own, separate-process handleTransactionCreated marking the SAME deposit received in between. mark_deposit_received_with_entry only releases bridge holds that exist at the moment it runs, so a hold created afterward is permanently unreleasable. Round 25/26's per-tenant locks live in different OS processes and cannot fix this. Fixes it the same way apply_entry already re-validates the reserve floor atomically: ApplyEntryRequest gains an optional require_deposit_outstanding_id, checked under ledger-core's own single mutex before any mutation (apply_entry_checked), returning DepositAlreadyReceived instead of applying the hold. bridge.Service now always sets this on its bridge-hold ApplyEntry call and declines cleanly instead of stranding funds. Reproduced the exact interleaving via a deterministic raceLedger test (confirmed it fails without the fix, passes with it, under go test -race). Live-reproduced the race window against the real 8-service stack; happy path and full build/test matrix unaffected.
1775 lines
58 KiB
Go
1775 lines
58 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.12
|
|
// protoc v6.33.4
|
|
// source: ledger.proto
|
|
|
|
package ledger
|
|
|
|
import (
|
|
common "github.com/caelum0x/ration/pkg/pb/common"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type Tenant struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"`
|
|
ReserveFloorMinorUnits int64 `protobuf:"varint,4,opt,name=reserve_floor_minor_units,json=reserveFloorMinorUnits,proto3" json:"reserve_floor_minor_units,omitempty"`
|
|
CreatedAtUnix int64 `protobuf:"varint,5,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Tenant) Reset() {
|
|
*x = Tenant{}
|
|
mi := &file_ledger_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Tenant) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Tenant) ProtoMessage() {}
|
|
|
|
func (x *Tenant) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Tenant.ProtoReflect.Descriptor instead.
|
|
func (*Tenant) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Tenant) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Tenant) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Tenant) GetCurrency() string {
|
|
if x != nil {
|
|
return x.Currency
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Tenant) GetReserveFloorMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.ReserveFloorMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Tenant) GetCreatedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.CreatedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CreateTenantRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"`
|
|
ReserveFloorMinorUnits int64 `protobuf:"varint,3,opt,name=reserve_floor_minor_units,json=reserveFloorMinorUnits,proto3" json:"reserve_floor_minor_units,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateTenantRequest) Reset() {
|
|
*x = CreateTenantRequest{}
|
|
mi := &file_ledger_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CreateTenantRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CreateTenantRequest) ProtoMessage() {}
|
|
|
|
func (x *CreateTenantRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CreateTenantRequest.ProtoReflect.Descriptor instead.
|
|
func (*CreateTenantRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *CreateTenantRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateTenantRequest) GetCurrency() string {
|
|
if x != nil {
|
|
return x.Currency
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateTenantRequest) GetReserveFloorMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.ReserveFloorMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetTenantRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetTenantRequest) Reset() {
|
|
*x = GetTenantRequest{}
|
|
mi := &file_ledger_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetTenantRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetTenantRequest) ProtoMessage() {}
|
|
|
|
func (x *GetTenantRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetTenantRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetTenantRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *GetTenantRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTenantsRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
|
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListTenantsRequest) Reset() {
|
|
*x = ListTenantsRequest{}
|
|
mi := &file_ledger_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListTenantsRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListTenantsRequest) ProtoMessage() {}
|
|
|
|
func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListTenantsRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListTenantsRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *ListTenantsRequest) GetPageSize() int32 {
|
|
if x != nil {
|
|
return x.PageSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListTenantsRequest) GetPageToken() string {
|
|
if x != nil {
|
|
return x.PageToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTenantsResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Tenants []*Tenant `protobuf:"bytes,1,rep,name=tenants,proto3" json:"tenants,omitempty"`
|
|
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListTenantsResponse) Reset() {
|
|
*x = ListTenantsResponse{}
|
|
mi := &file_ledger_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListTenantsResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListTenantsResponse) ProtoMessage() {}
|
|
|
|
func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListTenantsResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListTenantsResponse) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ListTenantsResponse) GetTenants() []*Tenant {
|
|
if x != nil {
|
|
return x.Tenants
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ListTenantsResponse) GetNextPageToken() string {
|
|
if x != nil {
|
|
return x.NextPageToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Deposit struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
ExpectedAmount *common.Money `protobuf:"bytes,3,opt,name=expected_amount,json=expectedAmount,proto3" json:"expected_amount,omitempty"`
|
|
ExpectedAtUnix int64 `protobuf:"varint,4,opt,name=expected_at_unix,json=expectedAtUnix,proto3" json:"expected_at_unix,omitempty"`
|
|
ReceivedAtUnix int64 `protobuf:"varint,5,opt,name=received_at_unix,json=receivedAtUnix,proto3" json:"received_at_unix,omitempty"` // 0 if not yet received
|
|
Status common.DepositStatus `protobuf:"varint,6,opt,name=status,proto3,enum=ration.common.v1.DepositStatus" json:"status,omitempty"`
|
|
ExternalRef string `protobuf:"bytes,7,opt,name=external_ref,json=externalRef,proto3" json:"external_ref,omitempty"` // Airwallex global account transaction id
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Deposit) Reset() {
|
|
*x = Deposit{}
|
|
mi := &file_ledger_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Deposit) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Deposit) ProtoMessage() {}
|
|
|
|
func (x *Deposit) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Deposit.ProtoReflect.Descriptor instead.
|
|
func (*Deposit) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *Deposit) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Deposit) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Deposit) GetExpectedAmount() *common.Money {
|
|
if x != nil {
|
|
return x.ExpectedAmount
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Deposit) GetExpectedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.ExpectedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Deposit) GetReceivedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.ReceivedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Deposit) GetStatus() common.DepositStatus {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return common.DepositStatus(0)
|
|
}
|
|
|
|
func (x *Deposit) GetExternalRef() string {
|
|
if x != nil {
|
|
return x.ExternalRef
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RecordDepositRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
ExpectedAmount *common.Money `protobuf:"bytes,2,opt,name=expected_amount,json=expectedAmount,proto3" json:"expected_amount,omitempty"`
|
|
ExpectedAtUnix int64 `protobuf:"varint,3,opt,name=expected_at_unix,json=expectedAtUnix,proto3" json:"expected_at_unix,omitempty"`
|
|
ExternalRef string `protobuf:"bytes,4,opt,name=external_ref,json=externalRef,proto3" json:"external_ref,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RecordDepositRequest) Reset() {
|
|
*x = RecordDepositRequest{}
|
|
mi := &file_ledger_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RecordDepositRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RecordDepositRequest) ProtoMessage() {}
|
|
|
|
func (x *RecordDepositRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RecordDepositRequest.ProtoReflect.Descriptor instead.
|
|
func (*RecordDepositRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *RecordDepositRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordDepositRequest) GetExpectedAmount() *common.Money {
|
|
if x != nil {
|
|
return x.ExpectedAmount
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RecordDepositRequest) GetExpectedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.ExpectedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RecordDepositRequest) GetExternalRef() string {
|
|
if x != nil {
|
|
return x.ExternalRef
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type MarkDepositReceivedRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
DepositId string `protobuf:"bytes,1,opt,name=deposit_id,json=depositId,proto3" json:"deposit_id,omitempty"`
|
|
ReceivedAtUnix int64 `protobuf:"varint,2,opt,name=received_at_unix,json=receivedAtUnix,proto3" json:"received_at_unix,omitempty"`
|
|
ExternalRef string `protobuf:"bytes,3,opt,name=external_ref,json=externalRef,proto3" json:"external_ref,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *MarkDepositReceivedRequest) Reset() {
|
|
*x = MarkDepositReceivedRequest{}
|
|
mi := &file_ledger_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MarkDepositReceivedRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MarkDepositReceivedRequest) ProtoMessage() {}
|
|
|
|
func (x *MarkDepositReceivedRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use MarkDepositReceivedRequest.ProtoReflect.Descriptor instead.
|
|
func (*MarkDepositReceivedRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *MarkDepositReceivedRequest) GetDepositId() string {
|
|
if x != nil {
|
|
return x.DepositId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MarkDepositReceivedRequest) GetReceivedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.ReceivedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *MarkDepositReceivedRequest) GetExternalRef() string {
|
|
if x != nil {
|
|
return x.ExternalRef
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListDepositsRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListDepositsRequest) Reset() {
|
|
*x = ListDepositsRequest{}
|
|
mi := &file_ledger_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListDepositsRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListDepositsRequest) ProtoMessage() {}
|
|
|
|
func (x *ListDepositsRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListDepositsRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListDepositsRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *ListDepositsRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListLateDepositsRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
AsOfUnix int64 `protobuf:"varint,1,opt,name=as_of_unix,json=asOfUnix,proto3" json:"as_of_unix,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListLateDepositsRequest) Reset() {
|
|
*x = ListLateDepositsRequest{}
|
|
mi := &file_ledger_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListLateDepositsRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListLateDepositsRequest) ProtoMessage() {}
|
|
|
|
func (x *ListLateDepositsRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[9]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListLateDepositsRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListLateDepositsRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *ListLateDepositsRequest) GetAsOfUnix() int64 {
|
|
if x != nil {
|
|
return x.AsOfUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ListDepositsResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListDepositsResponse) Reset() {
|
|
*x = ListDepositsResponse{}
|
|
mi := &file_ledger_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListDepositsResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListDepositsResponse) ProtoMessage() {}
|
|
|
|
func (x *ListDepositsResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[10]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListDepositsResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListDepositsResponse) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *ListDepositsResponse) GetDeposits() []*Deposit {
|
|
if x != nil {
|
|
return x.Deposits
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ApplyEntryRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
Type common.LedgerEntryType `protobuf:"varint,2,opt,name=type,proto3,enum=ration.common.v1.LedgerEntryType" json:"type,omitempty"`
|
|
Amount *common.Money `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
|
|
Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"`
|
|
IdempotencyKey string `protobuf:"bytes,5,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
|
|
Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"`
|
|
// When non-empty, apply_entry atomically (inside the same lock/
|
|
// transaction that writes this entry) verifies this deposit_id has
|
|
// NOT already been marked received before applying a HOLD — see
|
|
// ApplyEntryResponse.deposit_already_received. Added for
|
|
// bridge-funding (services/card-issuance/internal/bridge.Service),
|
|
// whose HOLD backs a specific late deposit by convention
|
|
// ("bridge:<deposit_id>:..." reference) but, before this field
|
|
// existed, had no atomic way to refuse placing that HOLD if the
|
|
// deposit happened to be marked received by a concurrent
|
|
// webhook-ingestion delivery in the window between bridge's own
|
|
// check (findRelevantLateDeposit) and this call — see round 27's
|
|
// BUILD-LOG entry. Ignored for every other entry type/caller (empty
|
|
// string is the default and skips the check entirely, matching every
|
|
// existing ApplyEntry caller unchanged).
|
|
RequireDepositOutstandingId string `protobuf:"bytes,7,opt,name=require_deposit_outstanding_id,json=requireDepositOutstandingId,proto3" json:"require_deposit_outstanding_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) Reset() {
|
|
*x = ApplyEntryRequest{}
|
|
mi := &file_ledger_proto_msgTypes[11]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ApplyEntryRequest) ProtoMessage() {}
|
|
|
|
func (x *ApplyEntryRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[11]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ApplyEntryRequest.ProtoReflect.Descriptor instead.
|
|
func (*ApplyEntryRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{11}
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetType() common.LedgerEntryType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return common.LedgerEntryType(0)
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetAmount() *common.Money {
|
|
if x != nil {
|
|
return x.Amount
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetReference() string {
|
|
if x != nil {
|
|
return x.Reference
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetIdempotencyKey() string {
|
|
if x != nil {
|
|
return x.IdempotencyKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetMemo() string {
|
|
if x != nil {
|
|
return x.Memo
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ApplyEntryRequest) GetRequireDepositOutstandingId() string {
|
|
if x != nil {
|
|
return x.RequireDepositOutstandingId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ApplyEntryResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Entry *LedgerEntry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
|
|
BalanceAfter *Balance `protobuf:"bytes,2,opt,name=balance_after,json=balanceAfter,proto3" json:"balance_after,omitempty"`
|
|
ReserveFloorViolated bool `protobuf:"varint,3,opt,name=reserve_floor_violated,json=reserveFloorViolated,proto3" json:"reserve_floor_violated,omitempty"`
|
|
// True when require_deposit_outstanding_id was set and that deposit
|
|
// had already been marked received by the time this call acquired
|
|
// ledger-core's lock — the entry was NOT applied, mirroring
|
|
// reserve_floor_violated's own "rejected, not an error" shape.
|
|
DepositAlreadyReceived bool `protobuf:"varint,4,opt,name=deposit_already_received,json=depositAlreadyReceived,proto3" json:"deposit_already_received,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ApplyEntryResponse) Reset() {
|
|
*x = ApplyEntryResponse{}
|
|
mi := &file_ledger_proto_msgTypes[12]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ApplyEntryResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ApplyEntryResponse) ProtoMessage() {}
|
|
|
|
func (x *ApplyEntryResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[12]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ApplyEntryResponse.ProtoReflect.Descriptor instead.
|
|
func (*ApplyEntryResponse) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{12}
|
|
}
|
|
|
|
func (x *ApplyEntryResponse) GetEntry() *LedgerEntry {
|
|
if x != nil {
|
|
return x.Entry
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ApplyEntryResponse) GetBalanceAfter() *Balance {
|
|
if x != nil {
|
|
return x.BalanceAfter
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ApplyEntryResponse) GetReserveFloorViolated() bool {
|
|
if x != nil {
|
|
return x.ReserveFloorViolated
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *ApplyEntryResponse) GetDepositAlreadyReceived() bool {
|
|
if x != nil {
|
|
return x.DepositAlreadyReceived
|
|
}
|
|
return false
|
|
}
|
|
|
|
type LedgerEntry struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
Type common.LedgerEntryType `protobuf:"varint,3,opt,name=type,proto3,enum=ration.common.v1.LedgerEntryType" json:"type,omitempty"`
|
|
Amount *common.Money `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
|
|
BalanceAfterMinorUnits int64 `protobuf:"varint,5,opt,name=balance_after_minor_units,json=balanceAfterMinorUnits,proto3" json:"balance_after_minor_units,omitempty"`
|
|
Reference string `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"`
|
|
Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"`
|
|
CreatedAtUnix int64 `protobuf:"varint,8,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LedgerEntry) Reset() {
|
|
*x = LedgerEntry{}
|
|
mi := &file_ledger_proto_msgTypes[13]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LedgerEntry) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LedgerEntry) ProtoMessage() {}
|
|
|
|
func (x *LedgerEntry) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[13]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use LedgerEntry.ProtoReflect.Descriptor instead.
|
|
func (*LedgerEntry) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{13}
|
|
}
|
|
|
|
func (x *LedgerEntry) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LedgerEntry) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LedgerEntry) GetType() common.LedgerEntryType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return common.LedgerEntryType(0)
|
|
}
|
|
|
|
func (x *LedgerEntry) GetAmount() *common.Money {
|
|
if x != nil {
|
|
return x.Amount
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *LedgerEntry) GetBalanceAfterMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.BalanceAfterMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *LedgerEntry) GetReference() string {
|
|
if x != nil {
|
|
return x.Reference
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LedgerEntry) GetMemo() string {
|
|
if x != nil {
|
|
return x.Memo
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LedgerEntry) GetCreatedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.CreatedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetBalanceRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetBalanceRequest) Reset() {
|
|
*x = GetBalanceRequest{}
|
|
mi := &file_ledger_proto_msgTypes[14]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetBalanceRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetBalanceRequest) ProtoMessage() {}
|
|
|
|
func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[14]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetBalanceRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{14}
|
|
}
|
|
|
|
func (x *GetBalanceRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Balance struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
AvailableMinorUnits int64 `protobuf:"varint,2,opt,name=available_minor_units,json=availableMinorUnits,proto3" json:"available_minor_units,omitempty"`
|
|
HeldMinorUnits int64 `protobuf:"varint,3,opt,name=held_minor_units,json=heldMinorUnits,proto3" json:"held_minor_units,omitempty"`
|
|
Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Balance) Reset() {
|
|
*x = Balance{}
|
|
mi := &file_ledger_proto_msgTypes[15]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Balance) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Balance) ProtoMessage() {}
|
|
|
|
func (x *Balance) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[15]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Balance.ProtoReflect.Descriptor instead.
|
|
func (*Balance) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{15}
|
|
}
|
|
|
|
func (x *Balance) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Balance) GetAvailableMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.AvailableMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Balance) GetHeldMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.HeldMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Balance) GetCurrency() string {
|
|
if x != nil {
|
|
return x.Currency
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListEntriesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
|
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListEntriesRequest) Reset() {
|
|
*x = ListEntriesRequest{}
|
|
mi := &file_ledger_proto_msgTypes[16]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListEntriesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListEntriesRequest) ProtoMessage() {}
|
|
|
|
func (x *ListEntriesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[16]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListEntriesRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListEntriesRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{16}
|
|
}
|
|
|
|
func (x *ListEntriesRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ListEntriesRequest) GetPageSize() int32 {
|
|
if x != nil {
|
|
return x.PageSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListEntriesRequest) GetPageToken() string {
|
|
if x != nil {
|
|
return x.PageToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListEntriesResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Entries []*LedgerEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
|
|
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListEntriesResponse) Reset() {
|
|
*x = ListEntriesResponse{}
|
|
mi := &file_ledger_proto_msgTypes[17]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListEntriesResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListEntriesResponse) ProtoMessage() {}
|
|
|
|
func (x *ListEntriesResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[17]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListEntriesResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListEntriesResponse) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{17}
|
|
}
|
|
|
|
func (x *ListEntriesResponse) GetEntries() []*LedgerEntry {
|
|
if x != nil {
|
|
return x.Entries
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ListEntriesResponse) GetNextPageToken() string {
|
|
if x != nil {
|
|
return x.NextPageToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CheckReserveFloorRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
ProposedDebitMinorUnits int64 `protobuf:"varint,2,opt,name=proposed_debit_minor_units,json=proposedDebitMinorUnits,proto3" json:"proposed_debit_minor_units,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CheckReserveFloorRequest) Reset() {
|
|
*x = CheckReserveFloorRequest{}
|
|
mi := &file_ledger_proto_msgTypes[18]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CheckReserveFloorRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CheckReserveFloorRequest) ProtoMessage() {}
|
|
|
|
func (x *CheckReserveFloorRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[18]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CheckReserveFloorRequest.ProtoReflect.Descriptor instead.
|
|
func (*CheckReserveFloorRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{18}
|
|
}
|
|
|
|
func (x *CheckReserveFloorRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CheckReserveFloorRequest) GetProposedDebitMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.ProposedDebitMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CheckReserveFloorResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Allowed bool `protobuf:"varint,1,opt,name=allowed,proto3" json:"allowed,omitempty"`
|
|
HeadroomMinorUnits int64 `protobuf:"varint,2,opt,name=headroom_minor_units,json=headroomMinorUnits,proto3" json:"headroom_minor_units,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CheckReserveFloorResponse) Reset() {
|
|
*x = CheckReserveFloorResponse{}
|
|
mi := &file_ledger_proto_msgTypes[19]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CheckReserveFloorResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CheckReserveFloorResponse) ProtoMessage() {}
|
|
|
|
func (x *CheckReserveFloorResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[19]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CheckReserveFloorResponse.ProtoReflect.Descriptor instead.
|
|
func (*CheckReserveFloorResponse) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{19}
|
|
}
|
|
|
|
func (x *CheckReserveFloorResponse) GetAllowed() bool {
|
|
if x != nil {
|
|
return x.Allowed
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *CheckReserveFloorResponse) GetHeadroomMinorUnits() int64 {
|
|
if x != nil {
|
|
return x.HeadroomMinorUnits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type AgentDecision struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
Trigger string `protobuf:"bytes,3,opt,name=trigger,proto3" json:"trigger,omitempty"` // e.g. "deposit_late", "card_request", "risk_review"
|
|
Action common.AgentAction `protobuf:"varint,4,opt,name=action,proto3,enum=ration.common.v1.AgentAction" json:"action,omitempty"`
|
|
Rationale string `protobuf:"bytes,5,opt,name=rationale,proto3" json:"rationale,omitempty"`
|
|
PolicySnapshotJson string `protobuf:"bytes,6,opt,name=policy_snapshot_json,json=policySnapshotJson,proto3" json:"policy_snapshot_json,omitempty"`
|
|
CreatedAtUnix int64 `protobuf:"varint,7,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AgentDecision) Reset() {
|
|
*x = AgentDecision{}
|
|
mi := &file_ledger_proto_msgTypes[20]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AgentDecision) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AgentDecision) ProtoMessage() {}
|
|
|
|
func (x *AgentDecision) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[20]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AgentDecision.ProtoReflect.Descriptor instead.
|
|
func (*AgentDecision) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{20}
|
|
}
|
|
|
|
func (x *AgentDecision) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AgentDecision) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AgentDecision) GetTrigger() string {
|
|
if x != nil {
|
|
return x.Trigger
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AgentDecision) GetAction() common.AgentAction {
|
|
if x != nil {
|
|
return x.Action
|
|
}
|
|
return common.AgentAction(0)
|
|
}
|
|
|
|
func (x *AgentDecision) GetRationale() string {
|
|
if x != nil {
|
|
return x.Rationale
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AgentDecision) GetPolicySnapshotJson() string {
|
|
if x != nil {
|
|
return x.PolicySnapshotJson
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AgentDecision) GetCreatedAtUnix() int64 {
|
|
if x != nil {
|
|
return x.CreatedAtUnix
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type RecordAgentDecisionRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
Trigger string `protobuf:"bytes,2,opt,name=trigger,proto3" json:"trigger,omitempty"`
|
|
Action common.AgentAction `protobuf:"varint,3,opt,name=action,proto3,enum=ration.common.v1.AgentAction" json:"action,omitempty"`
|
|
Rationale string `protobuf:"bytes,4,opt,name=rationale,proto3" json:"rationale,omitempty"`
|
|
PolicySnapshotJson string `protobuf:"bytes,5,opt,name=policy_snapshot_json,json=policySnapshotJson,proto3" json:"policy_snapshot_json,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) Reset() {
|
|
*x = RecordAgentDecisionRequest{}
|
|
mi := &file_ledger_proto_msgTypes[21]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RecordAgentDecisionRequest) ProtoMessage() {}
|
|
|
|
func (x *RecordAgentDecisionRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[21]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RecordAgentDecisionRequest.ProtoReflect.Descriptor instead.
|
|
func (*RecordAgentDecisionRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{21}
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) GetTrigger() string {
|
|
if x != nil {
|
|
return x.Trigger
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) GetAction() common.AgentAction {
|
|
if x != nil {
|
|
return x.Action
|
|
}
|
|
return common.AgentAction(0)
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) GetRationale() string {
|
|
if x != nil {
|
|
return x.Rationale
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RecordAgentDecisionRequest) GetPolicySnapshotJson() string {
|
|
if x != nil {
|
|
return x.PolicySnapshotJson
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListAgentDecisionsRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
|
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListAgentDecisionsRequest) Reset() {
|
|
*x = ListAgentDecisionsRequest{}
|
|
mi := &file_ledger_proto_msgTypes[22]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListAgentDecisionsRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListAgentDecisionsRequest) ProtoMessage() {}
|
|
|
|
func (x *ListAgentDecisionsRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[22]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListAgentDecisionsRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListAgentDecisionsRequest) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{22}
|
|
}
|
|
|
|
func (x *ListAgentDecisionsRequest) GetTenantId() string {
|
|
if x != nil {
|
|
return x.TenantId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ListAgentDecisionsRequest) GetLimit() int32 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ListAgentDecisionsResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Decisions []*AgentDecision `protobuf:"bytes,1,rep,name=decisions,proto3" json:"decisions,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListAgentDecisionsResponse) Reset() {
|
|
*x = ListAgentDecisionsResponse{}
|
|
mi := &file_ledger_proto_msgTypes[23]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListAgentDecisionsResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListAgentDecisionsResponse) ProtoMessage() {}
|
|
|
|
func (x *ListAgentDecisionsResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ledger_proto_msgTypes[23]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListAgentDecisionsResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListAgentDecisionsResponse) Descriptor() ([]byte, []int) {
|
|
return file_ledger_proto_rawDescGZIP(), []int{23}
|
|
}
|
|
|
|
func (x *ListAgentDecisionsResponse) GetDecisions() []*AgentDecision {
|
|
if x != nil {
|
|
return x.Decisions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_ledger_proto protoreflect.FileDescriptor
|
|
|
|
const file_ledger_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\fledger.proto\x12\x10ration.ledger.v1\x1a\fcommon.proto\"\xab\x01\n" +
|
|
"\x06Tenant\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
|
"\x04name\x18\x02 \x01(\tR\x04name\x12\x1a\n" +
|
|
"\bcurrency\x18\x03 \x01(\tR\bcurrency\x129\n" +
|
|
"\x19reserve_floor_minor_units\x18\x04 \x01(\x03R\x16reserveFloorMinorUnits\x12&\n" +
|
|
"\x0fcreated_at_unix\x18\x05 \x01(\x03R\rcreatedAtUnix\"\x80\x01\n" +
|
|
"\x13CreateTenantRequest\x12\x12\n" +
|
|
"\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" +
|
|
"\bcurrency\x18\x02 \x01(\tR\bcurrency\x129\n" +
|
|
"\x19reserve_floor_minor_units\x18\x03 \x01(\x03R\x16reserveFloorMinorUnits\"\"\n" +
|
|
"\x10GetTenantRequest\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\"P\n" +
|
|
"\x12ListTenantsRequest\x12\x1b\n" +
|
|
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
|
|
"\n" +
|
|
"page_token\x18\x02 \x01(\tR\tpageToken\"q\n" +
|
|
"\x13ListTenantsResponse\x122\n" +
|
|
"\atenants\x18\x01 \x03(\v2\x18.ration.ledger.v1.TenantR\atenants\x12&\n" +
|
|
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xa8\x02\n" +
|
|
"\aDeposit\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
|
|
"\ttenant_id\x18\x02 \x01(\tR\btenantId\x12@\n" +
|
|
"\x0fexpected_amount\x18\x03 \x01(\v2\x17.ration.common.v1.MoneyR\x0eexpectedAmount\x12(\n" +
|
|
"\x10expected_at_unix\x18\x04 \x01(\x03R\x0eexpectedAtUnix\x12(\n" +
|
|
"\x10received_at_unix\x18\x05 \x01(\x03R\x0ereceivedAtUnix\x127\n" +
|
|
"\x06status\x18\x06 \x01(\x0e2\x1f.ration.common.v1.DepositStatusR\x06status\x12!\n" +
|
|
"\fexternal_ref\x18\a \x01(\tR\vexternalRef\"\xc2\x01\n" +
|
|
"\x14RecordDepositRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12@\n" +
|
|
"\x0fexpected_amount\x18\x02 \x01(\v2\x17.ration.common.v1.MoneyR\x0eexpectedAmount\x12(\n" +
|
|
"\x10expected_at_unix\x18\x03 \x01(\x03R\x0eexpectedAtUnix\x12!\n" +
|
|
"\fexternal_ref\x18\x04 \x01(\tR\vexternalRef\"\x88\x01\n" +
|
|
"\x1aMarkDepositReceivedRequest\x12\x1d\n" +
|
|
"\n" +
|
|
"deposit_id\x18\x01 \x01(\tR\tdepositId\x12(\n" +
|
|
"\x10received_at_unix\x18\x02 \x01(\x03R\x0ereceivedAtUnix\x12!\n" +
|
|
"\fexternal_ref\x18\x03 \x01(\tR\vexternalRef\"2\n" +
|
|
"\x13ListDepositsRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\"7\n" +
|
|
"\x17ListLateDepositsRequest\x12\x1c\n" +
|
|
"\n" +
|
|
"as_of_unix\x18\x01 \x01(\x03R\basOfUnix\"M\n" +
|
|
"\x14ListDepositsResponse\x125\n" +
|
|
"\bdeposits\x18\x01 \x03(\v2\x19.ration.ledger.v1.DepositR\bdeposits\"\xb8\x02\n" +
|
|
"\x11ApplyEntryRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x125\n" +
|
|
"\x04type\x18\x02 \x01(\x0e2!.ration.common.v1.LedgerEntryTypeR\x04type\x12/\n" +
|
|
"\x06amount\x18\x03 \x01(\v2\x17.ration.common.v1.MoneyR\x06amount\x12\x1c\n" +
|
|
"\treference\x18\x04 \x01(\tR\treference\x12'\n" +
|
|
"\x0fidempotency_key\x18\x05 \x01(\tR\x0eidempotencyKey\x12\x12\n" +
|
|
"\x04memo\x18\x06 \x01(\tR\x04memo\x12C\n" +
|
|
"\x1erequire_deposit_outstanding_id\x18\a \x01(\tR\x1brequireDepositOutstandingId\"\xf9\x01\n" +
|
|
"\x12ApplyEntryResponse\x123\n" +
|
|
"\x05entry\x18\x01 \x01(\v2\x1d.ration.ledger.v1.LedgerEntryR\x05entry\x12>\n" +
|
|
"\rbalance_after\x18\x02 \x01(\v2\x19.ration.ledger.v1.BalanceR\fbalanceAfter\x124\n" +
|
|
"\x16reserve_floor_violated\x18\x03 \x01(\bR\x14reserveFloorViolated\x128\n" +
|
|
"\x18deposit_already_received\x18\x04 \x01(\bR\x16depositAlreadyReceived\"\xb7\x02\n" +
|
|
"\vLedgerEntry\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
|
|
"\ttenant_id\x18\x02 \x01(\tR\btenantId\x125\n" +
|
|
"\x04type\x18\x03 \x01(\x0e2!.ration.common.v1.LedgerEntryTypeR\x04type\x12/\n" +
|
|
"\x06amount\x18\x04 \x01(\v2\x17.ration.common.v1.MoneyR\x06amount\x129\n" +
|
|
"\x19balance_after_minor_units\x18\x05 \x01(\x03R\x16balanceAfterMinorUnits\x12\x1c\n" +
|
|
"\treference\x18\x06 \x01(\tR\treference\x12\x12\n" +
|
|
"\x04memo\x18\a \x01(\tR\x04memo\x12&\n" +
|
|
"\x0fcreated_at_unix\x18\b \x01(\x03R\rcreatedAtUnix\"0\n" +
|
|
"\x11GetBalanceRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\"\xa0\x01\n" +
|
|
"\aBalance\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x122\n" +
|
|
"\x15available_minor_units\x18\x02 \x01(\x03R\x13availableMinorUnits\x12(\n" +
|
|
"\x10held_minor_units\x18\x03 \x01(\x03R\x0eheldMinorUnits\x12\x1a\n" +
|
|
"\bcurrency\x18\x04 \x01(\tR\bcurrency\"m\n" +
|
|
"\x12ListEntriesRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x1b\n" +
|
|
"\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
|
|
"\n" +
|
|
"page_token\x18\x03 \x01(\tR\tpageToken\"v\n" +
|
|
"\x13ListEntriesResponse\x127\n" +
|
|
"\aentries\x18\x01 \x03(\v2\x1d.ration.ledger.v1.LedgerEntryR\aentries\x12&\n" +
|
|
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"t\n" +
|
|
"\x18CheckReserveFloorRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12;\n" +
|
|
"\x1aproposed_debit_minor_units\x18\x02 \x01(\x03R\x17proposedDebitMinorUnits\"g\n" +
|
|
"\x19CheckReserveFloorResponse\x12\x18\n" +
|
|
"\aallowed\x18\x01 \x01(\bR\aallowed\x120\n" +
|
|
"\x14headroom_minor_units\x18\x02 \x01(\x03R\x12headroomMinorUnits\"\x85\x02\n" +
|
|
"\rAgentDecision\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
|
|
"\ttenant_id\x18\x02 \x01(\tR\btenantId\x12\x18\n" +
|
|
"\atrigger\x18\x03 \x01(\tR\atrigger\x125\n" +
|
|
"\x06action\x18\x04 \x01(\x0e2\x1d.ration.common.v1.AgentActionR\x06action\x12\x1c\n" +
|
|
"\trationale\x18\x05 \x01(\tR\trationale\x120\n" +
|
|
"\x14policy_snapshot_json\x18\x06 \x01(\tR\x12policySnapshotJson\x12&\n" +
|
|
"\x0fcreated_at_unix\x18\a \x01(\x03R\rcreatedAtUnix\"\xda\x01\n" +
|
|
"\x1aRecordAgentDecisionRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x18\n" +
|
|
"\atrigger\x18\x02 \x01(\tR\atrigger\x125\n" +
|
|
"\x06action\x18\x03 \x01(\x0e2\x1d.ration.common.v1.AgentActionR\x06action\x12\x1c\n" +
|
|
"\trationale\x18\x04 \x01(\tR\trationale\x120\n" +
|
|
"\x14policy_snapshot_json\x18\x05 \x01(\tR\x12policySnapshotJson\"N\n" +
|
|
"\x19ListAgentDecisionsRequest\x12\x1b\n" +
|
|
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x14\n" +
|
|
"\x05limit\x18\x02 \x01(\x05R\x05limit\"[\n" +
|
|
"\x1aListAgentDecisionsResponse\x12=\n" +
|
|
"\tdecisions\x18\x01 \x03(\v2\x1f.ration.ledger.v1.AgentDecisionR\tdecisions2\xc6\t\n" +
|
|
"\n" +
|
|
"LedgerCore\x12O\n" +
|
|
"\fCreateTenant\x12%.ration.ledger.v1.CreateTenantRequest\x1a\x18.ration.ledger.v1.Tenant\x12I\n" +
|
|
"\tGetTenant\x12\".ration.ledger.v1.GetTenantRequest\x1a\x18.ration.ledger.v1.Tenant\x12Z\n" +
|
|
"\vListTenants\x12$.ration.ledger.v1.ListTenantsRequest\x1a%.ration.ledger.v1.ListTenantsResponse\x12R\n" +
|
|
"\rRecordDeposit\x12&.ration.ledger.v1.RecordDepositRequest\x1a\x19.ration.ledger.v1.Deposit\x12^\n" +
|
|
"\x13MarkDepositReceived\x12,.ration.ledger.v1.MarkDepositReceivedRequest\x1a\x19.ration.ledger.v1.Deposit\x12]\n" +
|
|
"\fListDeposits\x12%.ration.ledger.v1.ListDepositsRequest\x1a&.ration.ledger.v1.ListDepositsResponse\x12e\n" +
|
|
"\x10ListLateDeposits\x12).ration.ledger.v1.ListLateDepositsRequest\x1a&.ration.ledger.v1.ListDepositsResponse\x12W\n" +
|
|
"\n" +
|
|
"ApplyEntry\x12#.ration.ledger.v1.ApplyEntryRequest\x1a$.ration.ledger.v1.ApplyEntryResponse\x12L\n" +
|
|
"\n" +
|
|
"GetBalance\x12#.ration.ledger.v1.GetBalanceRequest\x1a\x19.ration.ledger.v1.Balance\x12Z\n" +
|
|
"\vListEntries\x12$.ration.ledger.v1.ListEntriesRequest\x1a%.ration.ledger.v1.ListEntriesResponse\x12l\n" +
|
|
"\x11CheckReserveFloor\x12*.ration.ledger.v1.CheckReserveFloorRequest\x1a+.ration.ledger.v1.CheckReserveFloorResponse\x12d\n" +
|
|
"\x13RecordAgentDecision\x12,.ration.ledger.v1.RecordAgentDecisionRequest\x1a\x1f.ration.ledger.v1.AgentDecision\x12o\n" +
|
|
"\x12ListAgentDecisions\x12+.ration.ledger.v1.ListAgentDecisionsRequest\x1a,.ration.ledger.v1.ListAgentDecisionsResponseB*Z(github.com/caelum0x/ration/pkg/pb/ledgerb\x06proto3"
|
|
|
|
var (
|
|
file_ledger_proto_rawDescOnce sync.Once
|
|
file_ledger_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_ledger_proto_rawDescGZIP() []byte {
|
|
file_ledger_proto_rawDescOnce.Do(func() {
|
|
file_ledger_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ledger_proto_rawDesc), len(file_ledger_proto_rawDesc)))
|
|
})
|
|
return file_ledger_proto_rawDescData
|
|
}
|
|
|
|
var file_ledger_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
|
|
var file_ledger_proto_goTypes = []any{
|
|
(*Tenant)(nil), // 0: ration.ledger.v1.Tenant
|
|
(*CreateTenantRequest)(nil), // 1: ration.ledger.v1.CreateTenantRequest
|
|
(*GetTenantRequest)(nil), // 2: ration.ledger.v1.GetTenantRequest
|
|
(*ListTenantsRequest)(nil), // 3: ration.ledger.v1.ListTenantsRequest
|
|
(*ListTenantsResponse)(nil), // 4: ration.ledger.v1.ListTenantsResponse
|
|
(*Deposit)(nil), // 5: ration.ledger.v1.Deposit
|
|
(*RecordDepositRequest)(nil), // 6: ration.ledger.v1.RecordDepositRequest
|
|
(*MarkDepositReceivedRequest)(nil), // 7: ration.ledger.v1.MarkDepositReceivedRequest
|
|
(*ListDepositsRequest)(nil), // 8: ration.ledger.v1.ListDepositsRequest
|
|
(*ListLateDepositsRequest)(nil), // 9: ration.ledger.v1.ListLateDepositsRequest
|
|
(*ListDepositsResponse)(nil), // 10: ration.ledger.v1.ListDepositsResponse
|
|
(*ApplyEntryRequest)(nil), // 11: ration.ledger.v1.ApplyEntryRequest
|
|
(*ApplyEntryResponse)(nil), // 12: ration.ledger.v1.ApplyEntryResponse
|
|
(*LedgerEntry)(nil), // 13: ration.ledger.v1.LedgerEntry
|
|
(*GetBalanceRequest)(nil), // 14: ration.ledger.v1.GetBalanceRequest
|
|
(*Balance)(nil), // 15: ration.ledger.v1.Balance
|
|
(*ListEntriesRequest)(nil), // 16: ration.ledger.v1.ListEntriesRequest
|
|
(*ListEntriesResponse)(nil), // 17: ration.ledger.v1.ListEntriesResponse
|
|
(*CheckReserveFloorRequest)(nil), // 18: ration.ledger.v1.CheckReserveFloorRequest
|
|
(*CheckReserveFloorResponse)(nil), // 19: ration.ledger.v1.CheckReserveFloorResponse
|
|
(*AgentDecision)(nil), // 20: ration.ledger.v1.AgentDecision
|
|
(*RecordAgentDecisionRequest)(nil), // 21: ration.ledger.v1.RecordAgentDecisionRequest
|
|
(*ListAgentDecisionsRequest)(nil), // 22: ration.ledger.v1.ListAgentDecisionsRequest
|
|
(*ListAgentDecisionsResponse)(nil), // 23: ration.ledger.v1.ListAgentDecisionsResponse
|
|
(*common.Money)(nil), // 24: ration.common.v1.Money
|
|
(common.DepositStatus)(0), // 25: ration.common.v1.DepositStatus
|
|
(common.LedgerEntryType)(0), // 26: ration.common.v1.LedgerEntryType
|
|
(common.AgentAction)(0), // 27: ration.common.v1.AgentAction
|
|
}
|
|
var file_ledger_proto_depIdxs = []int32{
|
|
0, // 0: ration.ledger.v1.ListTenantsResponse.tenants:type_name -> ration.ledger.v1.Tenant
|
|
24, // 1: ration.ledger.v1.Deposit.expected_amount:type_name -> ration.common.v1.Money
|
|
25, // 2: ration.ledger.v1.Deposit.status:type_name -> ration.common.v1.DepositStatus
|
|
24, // 3: ration.ledger.v1.RecordDepositRequest.expected_amount:type_name -> ration.common.v1.Money
|
|
5, // 4: ration.ledger.v1.ListDepositsResponse.deposits:type_name -> ration.ledger.v1.Deposit
|
|
26, // 5: ration.ledger.v1.ApplyEntryRequest.type:type_name -> ration.common.v1.LedgerEntryType
|
|
24, // 6: ration.ledger.v1.ApplyEntryRequest.amount:type_name -> ration.common.v1.Money
|
|
13, // 7: ration.ledger.v1.ApplyEntryResponse.entry:type_name -> ration.ledger.v1.LedgerEntry
|
|
15, // 8: ration.ledger.v1.ApplyEntryResponse.balance_after:type_name -> ration.ledger.v1.Balance
|
|
26, // 9: ration.ledger.v1.LedgerEntry.type:type_name -> ration.common.v1.LedgerEntryType
|
|
24, // 10: ration.ledger.v1.LedgerEntry.amount:type_name -> ration.common.v1.Money
|
|
13, // 11: ration.ledger.v1.ListEntriesResponse.entries:type_name -> ration.ledger.v1.LedgerEntry
|
|
27, // 12: ration.ledger.v1.AgentDecision.action:type_name -> ration.common.v1.AgentAction
|
|
27, // 13: ration.ledger.v1.RecordAgentDecisionRequest.action:type_name -> ration.common.v1.AgentAction
|
|
20, // 14: ration.ledger.v1.ListAgentDecisionsResponse.decisions:type_name -> ration.ledger.v1.AgentDecision
|
|
1, // 15: ration.ledger.v1.LedgerCore.CreateTenant:input_type -> ration.ledger.v1.CreateTenantRequest
|
|
2, // 16: ration.ledger.v1.LedgerCore.GetTenant:input_type -> ration.ledger.v1.GetTenantRequest
|
|
3, // 17: ration.ledger.v1.LedgerCore.ListTenants:input_type -> ration.ledger.v1.ListTenantsRequest
|
|
6, // 18: ration.ledger.v1.LedgerCore.RecordDeposit:input_type -> ration.ledger.v1.RecordDepositRequest
|
|
7, // 19: ration.ledger.v1.LedgerCore.MarkDepositReceived:input_type -> ration.ledger.v1.MarkDepositReceivedRequest
|
|
8, // 20: ration.ledger.v1.LedgerCore.ListDeposits:input_type -> ration.ledger.v1.ListDepositsRequest
|
|
9, // 21: ration.ledger.v1.LedgerCore.ListLateDeposits:input_type -> ration.ledger.v1.ListLateDepositsRequest
|
|
11, // 22: ration.ledger.v1.LedgerCore.ApplyEntry:input_type -> ration.ledger.v1.ApplyEntryRequest
|
|
14, // 23: ration.ledger.v1.LedgerCore.GetBalance:input_type -> ration.ledger.v1.GetBalanceRequest
|
|
16, // 24: ration.ledger.v1.LedgerCore.ListEntries:input_type -> ration.ledger.v1.ListEntriesRequest
|
|
18, // 25: ration.ledger.v1.LedgerCore.CheckReserveFloor:input_type -> ration.ledger.v1.CheckReserveFloorRequest
|
|
21, // 26: ration.ledger.v1.LedgerCore.RecordAgentDecision:input_type -> ration.ledger.v1.RecordAgentDecisionRequest
|
|
22, // 27: ration.ledger.v1.LedgerCore.ListAgentDecisions:input_type -> ration.ledger.v1.ListAgentDecisionsRequest
|
|
0, // 28: ration.ledger.v1.LedgerCore.CreateTenant:output_type -> ration.ledger.v1.Tenant
|
|
0, // 29: ration.ledger.v1.LedgerCore.GetTenant:output_type -> ration.ledger.v1.Tenant
|
|
4, // 30: ration.ledger.v1.LedgerCore.ListTenants:output_type -> ration.ledger.v1.ListTenantsResponse
|
|
5, // 31: ration.ledger.v1.LedgerCore.RecordDeposit:output_type -> ration.ledger.v1.Deposit
|
|
5, // 32: ration.ledger.v1.LedgerCore.MarkDepositReceived:output_type -> ration.ledger.v1.Deposit
|
|
10, // 33: ration.ledger.v1.LedgerCore.ListDeposits:output_type -> ration.ledger.v1.ListDepositsResponse
|
|
10, // 34: ration.ledger.v1.LedgerCore.ListLateDeposits:output_type -> ration.ledger.v1.ListDepositsResponse
|
|
12, // 35: ration.ledger.v1.LedgerCore.ApplyEntry:output_type -> ration.ledger.v1.ApplyEntryResponse
|
|
15, // 36: ration.ledger.v1.LedgerCore.GetBalance:output_type -> ration.ledger.v1.Balance
|
|
17, // 37: ration.ledger.v1.LedgerCore.ListEntries:output_type -> ration.ledger.v1.ListEntriesResponse
|
|
19, // 38: ration.ledger.v1.LedgerCore.CheckReserveFloor:output_type -> ration.ledger.v1.CheckReserveFloorResponse
|
|
20, // 39: ration.ledger.v1.LedgerCore.RecordAgentDecision:output_type -> ration.ledger.v1.AgentDecision
|
|
23, // 40: ration.ledger.v1.LedgerCore.ListAgentDecisions:output_type -> ration.ledger.v1.ListAgentDecisionsResponse
|
|
28, // [28:41] is the sub-list for method output_type
|
|
15, // [15:28] is the sub-list for method input_type
|
|
15, // [15:15] is the sub-list for extension type_name
|
|
15, // [15:15] is the sub-list for extension extendee
|
|
0, // [0:15] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_ledger_proto_init() }
|
|
func file_ledger_proto_init() {
|
|
if File_ledger_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ledger_proto_rawDesc), len(file_ledger_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 24,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_ledger_proto_goTypes,
|
|
DependencyIndexes: file_ledger_proto_depIdxs,
|
|
MessageInfos: file_ledger_proto_msgTypes,
|
|
}.Build()
|
|
File_ledger_proto = out.File
|
|
file_ledger_proto_goTypes = nil
|
|
file_ledger_proto_depIdxs = nil
|
|
}
|