Documentation ¶
Index ¶
Constants ¶
const ( 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 )
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.
Variables ¶
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", }
ValidDataTypeLookup allows us to filter go-vise data types, additionally the value maps to the ussd_data coulmn
Functions ¶
func DecodeKey ¶
DecodeKey specifically only decodes user data keys stored as bytes into its respective session ID and data type TODO: Replace return data type with imported data types from the common package once lib-gdbm dependency is removed.
func DecodeValue ¶
DecodeValue returns the utf-8 string representation of the value stored in the storage backend
func EncodeKey ¶
EncodeKey returns the byte representation of a urdt/ussd user data key. This key can be used to lookup the value on any storage backend implementation. Warning: This is a shortcut specifically for user data, it is not expected to work for all go-vise keys. TODO: Replace with imported data types from the common package once lib-gdbm dependency is removed.
Types ¶
This section is empty.