ussd-data-connect/pkg/data/type.go
Mohammed Sohail cd5b31d07e
Some checks failed
release / docker (push) Has been cancelled
feat: switch to postgres only sync, removed nats publishing
2025-01-09 09:28:41 +03:00

29 lines
1004 B
Go

package data
// Subset of urdt/ussd/common specifically for syncing to the central data store i.e Graph.
// TODO: Replace with imported data types from the common package once lib-gdbm dependency is removed.
const (
keyPrefix = 32
ACCOUNT_BLOCKCHAIN_ADDRESS = 1
ACCOUNT_FIRST_NAME = 3
ACCOUNT_LAST_NAME = 4
ACCOUNT_YOB = 5
ACCOUNT_LOCATION = 6
ACCOUNT_GENDER = 7
ACCOUNT_COMMODITIES = 8
ACCOUNT_ACTIVE_VOUCHER = 17
)
// ValidDataTypeLookup allows us to filter go-vise data types, additionally the value maps to the ussd_data coulmn
var ValidDataTypeLookup = map[uint16]string{
ACCOUNT_BLOCKCHAIN_ADDRESS: "blockchain_address",
ACCOUNT_FIRST_NAME: "first_name",
ACCOUNT_LAST_NAME: "last_name",
ACCOUNT_YOB: "yob",
ACCOUNT_LOCATION: "location_name",
ACCOUNT_GENDER: "gender",
ACCOUNT_COMMODITIES: "commodities",
ACCOUNT_ACTIVE_VOUCHER: "active_voucher",
}