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

Function GetValidFieldsForTable

internal/filter/validation.go:42–154  ·  view source on GitHub ↗
(table string)

Source from the content-addressed store, hash-verified

40}
41
42func GetValidFieldsForTable(table string) map[string]bool {
43 switch table {
44 case "transactions":
45 return map[string]bool{
46 "transaction_id": true,
47 "parent_transaction": true,
48 "amount": true,
49 "currency": true,
50 "source": true,
51 "destination": true,
52 "balance_id": true,
53 "reference": true,
54 "status": true,
55 "created_at": true,
56 "effective_date": true,
57 "source_identity": true,
58 "destination_identity": true,
59 "indicator": true,
60 "description": true,
61 "precision": true,
62 "meta_data": true,
63 }
64 case "balances":
65 return map[string]bool{
66 "balance_id": true,
67 "ledger_id": true,
68 "identity_id": true,
69 "indicator": true,
70 "currency": true,
71 "balance": true,
72 "credit_balance": true,
73 "debit_balance": true,
74 "inflight_balance": true,
75 "inflight_credit_balance": true,
76 "inflight_debit_balance": true,
77 "created_at": true,
78 "meta_data": true,
79 }
80 case "ledgers":
81 return map[string]bool{
82 "ledger_id": true,
83 "name": true,
84 "created_at": true,
85 "meta_data": true,
86 }
87 case "identity":
88 return map[string]bool{
89 "identity_id": true,
90 "first_name": true,
91 "last_name": true,
92 "other_names": true,
93 "gender": true,
94 "dob": true,
95 "email_address": true,
96 "phone_number": true,
97 "nationality": true,
98 "street": true,
99 "country": true,

Callers 7

ParseFiltersFromBodyFunction · 0.92
ParseQueryOptionsFunction · 0.92
ValidateFunction · 0.85
ValidateSortByForTableFunction · 0.85
ResolveSortFieldFunction · 0.85

Calls

no outgoing calls

Tested by 1