()
| 49 | var collectionConfigs map[string]CollectionConfig |
| 50 | |
| 51 | func init() { |
| 52 | collectionConfigs = map[string]CollectionConfig{ |
| 53 | CollectionLedgers: { |
| 54 | Schema: getLedgerSchema(), |
| 55 | IDField: "ledger_id", |
| 56 | TimeFields: []string{"created_at"}, |
| 57 | BigIntFields: []string{}, |
| 58 | }, |
| 59 | CollectionBalances: { |
| 60 | Schema: getBalanceSchema(), |
| 61 | IDField: "balance_id", |
| 62 | TimeFields: []string{"created_at", "inflight_expires_at"}, |
| 63 | BigIntFields: []string{ |
| 64 | "balance", "credit_balance", "debit_balance", |
| 65 | "inflight_balance", "inflight_credit_balance", "inflight_debit_balance", |
| 66 | }, |
| 67 | }, |
| 68 | CollectionTransactions: { |
| 69 | Schema: getTransactionSchema(), |
| 70 | IDField: "transaction_id", |
| 71 | TimeFields: []string{ |
| 72 | "created_at", "scheduled_for", "inflight_expiry_date", "effective_date", |
| 73 | }, |
| 74 | BigIntFields: []string{"precise_amount"}, |
| 75 | }, |
| 76 | CollectionReconciliations: { |
| 77 | Schema: getReconciliationSchema(), |
| 78 | IDField: "reconciliation_id", |
| 79 | TimeFields: []string{"started_at", "completed_at"}, |
| 80 | }, |
| 81 | CollectionIdentities: { |
| 82 | Schema: getIdentitySchema(), |
| 83 | IDField: "identity_id", |
| 84 | TimeFields: []string{"created_at", "dob"}, |
| 85 | }, |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // TypesenseClient wraps the Typesense client and provides methods to interact with it. |
| 90 | type TypesenseClient struct { |
nothing calls this directly
no test coverage detected