import json class Config: FIELD_MAP = { "x01": "#user_id", "x02": "#account_id", "x03": "#distinct_id", "x04": "#event_name", "x05": "#server_time", "a01": "#ip", "a02": "#country", "a03": "#country_code", "a04": "#province", "a05": "#city", "a06": "#os_version", "a07": "#manufacturer", "a08": "#os", "a09": "#device_id", "a10": "#screen_height", "a11": "#screen_width", "a12": "#device_model", "a13": "#app_version", "a14": "#bundle_id", "a15": "#lib", "a16": "#lib_version", "a17": "#network_type", "a18": "#carrier", "a19": "#browser", "a20": "#browser_version", "a21": "#duration", "a22": "#url", "a23": "#url_path", "a24": "#referrer", "a25": "#referrer_host", "a26": "#title", "a27": "#screen_name", "a28": "#element_id", "a29": "#element_type", "a30": "#resume_from_background", "a31": "#element_selector", "a32": "#element_position", "a33": "#element_content", "a34": "#scene", "a35": "#mp_platform", "a36": "#app_crashed_reason", "a37": "#zone_offset", "a38": "#app_name", "a39": "#game_version", "b01": "#app_id", "b02": "#type", "b03": "#time", "b06": "#event_time" } TA_OUTER = {'#time', '#ip', '#type', '#distinct_id', '#account_id', '#event_name', '#event_id', '#app_id'} REDIS_CONF = { 'address': ('192.168.0.161', 6379), 'password': 'd1Gh*zp5', 'db': 0, 'minsize': 16, 'maxsize': 16, } # appid 对应的签名 SALT = { '3F9AdWKZGhhNS2': 's4epprEG8DdyG5', 'G5OYZLM21H': 's4epprEG8DdyG5', 'c3e0409ac18341149877b08f087db640': 's4epprEG8DdyG5', 'e903ab24ad8f4bfca8a3ce7e122cd102': 'asfsdafasdsf', 'qXIPFypDlLqCuHdQ': 'asfsdafasdsf', # 山海 'KDmgdJYoRHLKRDvA': 'asfsdafasdsf', # 像素 'DoXBgb6lNb66UpQs': 'asfsdafasdsf', # 新生化 'WGtekOwwekH2kCad': 'debug123456' # debug } # 映射数数 appID APPID_MAP = { '3F9AdWKZGhhNS2': 'a77703e24e6643d08b74a4163a14f74c', 'e903ab24ad8f4bfca8a3ce7e122cd102': 'e903ab24ad8f4bfca8a3ce7e122cd102' } # appid 发送到对应 topic OUTPUT_NAME = { '3F9AdWKZGhhNS2': 'test', 'G5OYZLM21H': 'test', 'c3e0409ac18341149877b08f087db640': 'test2', 'e903ab24ad8f4bfca8a3ce7e122cd102': 'zhengba_test', 'qXIPFypDlLqCuHdQ': 'shanhai', 'KDmgdJYoRHLKRDvA': 'xiangsu', 'DoXBgb6lNb66UpQs': 'xinshenghua', # 新生化 'WGtekOwwekH2kCad': 'debug' # 所有游戏测试数据debug } KAFKA_CONF = { 'bootstrap_servers': ["192.168.0.30:9092", "192.168.0.71:9092", "192.168.0.229:9092"], 'value_serializer': lambda v: json.dumps(v).encode('utf-8'), } class Debug(Config): pass class Produce(Config): pass settings = Produce