Пример #1
0
class cmd_FILE_WRITE_Schema(UnknownCheckedSchema):
    path = fields.String(required=True)
    offset = fields.Int(missing=0, validate=validate.Range(min=0))
    content = fields.Base64Bytes(required=True)
Пример #2
0
class cmd_EVENT_Schema(Schema):
    event = fields.String(required=True)
    sender = fields.Base64Bytes(required=True)
Пример #3
0
class cmd_IDENTITY_LOAD_Schema(UnknownCheckedSchema):
    id = fields.String(required=True)
    key = fields.Base64Bytes(required=True)
    password = fields.String(missing=None)
Пример #4
0
class HandshakeAnswerSchema(UnknownCheckedSchema):
    handshake = fields.String(required=True, validate=lambda x: x == 'answer')
    identity = fields.String(required=True)
    answer = fields.Base64Bytes(required=True)
Пример #5
0
class cmd_UPDATE_Schema(UnknownCheckedSchema):
    id = fields.String(required=True)
    version = fields.Int(validate=lambda n: n > 1)
    trust_seed = fields.String(required=True)
    blob = fields.Base64Bytes(required=True)
Пример #6
0
class cmd_CREATE_Schema(UnknownCheckedSchema):
    id = fields.String(missing=None, validate=lambda n: 0 < len(n) <= 32)
    blob = fields.Base64Bytes(missing=to_jsonb64(b''))
Пример #7
0
class cmd_UPDATE_Schema(UnknownCheckedSchema):
    version = fields.Int(validate=lambda n: n > 0)
    blob = fields.Base64Bytes(required=True)
Пример #8
0
class cmd_NEW_Schema(UnknownCheckedSchema):
    recipient = fields.String(required=True)
    body = fields.Base64Bytes(required=True)