当前位置: 首页>>代码示例>>Python>>正文


Python serialization.s_long函数代码示例

本文整理汇总了Python中mcfw.serialization.s_long函数的典型用法代码示例。如果您正苦于以下问题:Python s_long函数的具体用法?Python s_long怎么用?Python s_long使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了s_long函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: serialize_sign

def serialize_sign(stream, w):
    s_long(stream, 4)  # version
    s_unicode(stream, w.payload)
    s_unicode(stream, w.caption)
    s_unicode(stream, w.algorithm)
    s_unicode(stream, w.key_name)
    s_unicode(stream, w.index)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例2: serialize_mydigipass_widget_result

def serialize_mydigipass_widget_result(stream, result):
    s_long(stream, 2)  # version
    if result.eid_profile is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_eid_profile(stream, result.eid_profile)

    if result.eid_address is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_eid_address(stream, result.eid_address)

    s_unicode(stream, result.eid_photo)
    s_unicode(stream, result.email)
    s_unicode(stream, result.phone)

    if result.profile is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_profile(stream, result.profile)

    if result.address is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        serialize_mydigipass_address(stream, result.address)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:29,代码来源:forms.py

示例3: serialize_form_result

def serialize_form_result(stream, fr):
    s_long(stream, 1)  # version
    if fr:
        s_unicode(stream, fr.type)
        WIDGET_RESULT_MAPPING[fr.type].model_serialize(stream, fr.result)
    else:
        s_unicode(stream, "")
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:forms.py

示例4: _serialize_attachment

def _serialize_attachment(stream, a):
    s_long(stream, a.index)
    s_unicode(stream, a.content_type)
    s_unicode(stream, a.download_url)
    s_long(stream, a.size)
    s_unicode(stream, a.name)
    _s_thumbnail_url(stream, a.thumbnail)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:7,代码来源:messaging.py

示例5: _serialize_mobile_details

def _serialize_mobile_details(stream, fds):
    s_long(stream, CURRENT_MOBILE_DETAILS_VERSION)  # version in case we need to adjust the MobileDetail structure
    if fds is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        _serialize_mobile_detail_list(stream, fds.values())
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:7,代码来源:profiles.py

示例6: _serialize_button

def _serialize_button(stream, b):
    s_unicode(stream, b.id)
    s_long(stream, b.index)
    s_unicode(stream, b.caption)
    s_unicode(stream, b.action)
    s_long(stream, b.ui_flags)
    s_unicode(stream, b.color)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:messaging.py

示例7: _serialize_public_keys

def _serialize_public_keys(stream, public_keys):
    s_long(stream, 1)
    if public_keys is None:
        s_bool(stream, False)
    else:
        s_bool(stream, True)
        _serialize_public_key_list(stream, public_keys.values())
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:7,代码来源:profiles.py

示例8: serialize_location_widget_result

def serialize_location_widget_result(stream, result):
    s_long(stream, 2)  # version
    s_float(stream, result.horizontal_accuracy)
    s_float(stream, result.latitude)
    s_float(stream, result.longitude)
    s_float(stream, result.altitude)
    s_long(stream, result.timestamp)
    s_float(stream, result.vertical_accuracy)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:forms.py

示例9: serialize_pay

def serialize_pay(stream, w):
    s_long(stream, 2)
    _serialize_payment_method_list(stream, w.methods)
    s_unicode(stream, w.memo)
    s_unicode(stream, w.target)
    s_bool(stream, w.auto_submit)
    s_bool(stream, w.test_mode)
    s_unicode(stream, w.embedded_app_id)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:8,代码来源:forms.py

示例10: _serialize_message_embedded_app

def _serialize_message_embedded_app(stream, obj):
    # type: (StringIO.StringIO, MessageEmbeddedApp) -> None
    s_long(stream, 1)  # version
    s_unicode(stream, obj.context)
    s_unicode(stream, obj.description)
    s_unicode(stream, obj.id)
    s_unicode(stream, obj.image_url)
    s_unicode(stream, obj.result)
    s_unicode(stream, obj.title)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:9,代码来源:messaging.py

示例11: _serialize_kv_store

def _serialize_kv_store(stream, kv_store):
    azzert(kv_store is None or isinstance(kv_store._ancestor, db.Key))
    s_long(stream, 1)  # version
    if kv_store:
        s_str(stream, str(kv_store._ancestor))
        _serialize_dict(stream, kv_store._bucket_sizes, s_long, s_long)
        _serialize_dict(stream, kv_store._keys, s_unicode, s_long)
        _serialize_dict(stream, kv_store._blob_keys, s_unicode, s_long_list)
    else:
        s_str(stream, None)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:keyvalue.py

示例12: _serialize_member_status

def _serialize_member_status(stream, r):
    s_long(stream, r.status)
    s_long(stream, r.received_timestamp)
    s_long(stream, r.acked_timestamp)
    s_long(stream, r.index)
    s_bool(stream, r.dismissed)
    s_long(stream, r.button_index)
    s_unicode(stream, r.custom_reply)
    serialize_form_result(stream, r.form_result)
    s_unicode(stream, r.ack_device)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:10,代码来源:messaging.py

示例13: serialize_date_select

def serialize_date_select(stream, w):
    s_long(stream, 1)  # version
    s_bool(stream, w.has_date)
    s_bool(stream, w.has_max_date)
    s_bool(stream, w.has_min_date)
    s_long(stream, w.date)
    s_long(stream, w.max_date)
    s_long(stream, w.min_date)
    s_long(stream, w.minute_interval)
    s_unicode(stream, w.mode)
    s_unicode(stream, w.unit)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:11,代码来源:forms.py

示例14: _serialize_advanced_order_item

def _serialize_advanced_order_item(stream, i):
    s_long(stream, 3)  # version
    s_unicode(stream, i.id)
    s_unicode(stream, i.name)
    s_unicode(stream, i.description)
    s_long(stream, i.value)
    s_unicode(stream, i.unit)
    s_long(stream, i.unit_price)
    s_long(stream, i.step)
    s_unicode(stream, i.step_unit)
    s_long(stream, i.step_unit_conversion)
    s_unicode(stream, i.image_url)
    s_bool(stream, i.has_price)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:13,代码来源:forms.py

示例15: serialize_oauth_settings

def serialize_oauth_settings(stream, data):
    s_long(stream, 3)  # version
    if data:
        s_unicode(stream, data.url)
        s_unicode(stream, data.authorize_path)
        s_unicode(stream, data.token_path)
        s_unicode(stream, data.identity_path)
        s_unicode(stream, data.scopes)
        s_unicode(stream, data.client_id)
        s_unicode(stream, data.secret)
        s_unicode(stream, data.domain)
        s_unicode(stream, data.service_identity_email)
        s_unicode(stream, data.public_key)
        s_unicode(stream, data.jwt_audience)
        s_unicode(stream, data.jwt_issuer)
    else:
        s_unicode(stream, None)
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:17,代码来源:oauth.py


注:本文中的mcfw.serialization.s_long函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。