MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / init

Function init

internal/search/search.go:51–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49var collectionConfigs map[string]CollectionConfig
50
51func 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.
90type TypesenseClient struct {

Callers

nothing calls this directly

Calls 5

getLedgerSchemaFunction · 0.85
getBalanceSchemaFunction · 0.85
getTransactionSchemaFunction · 0.85
getReconciliationSchemaFunction · 0.85
getIdentitySchemaFunction · 0.85

Tested by

no test coverage detected