chore: add avro twt encoders

This commit is contained in:
xuu
2025-03-02 20:14:37 -07:00
commit 7b884ca2f9
8 changed files with 944 additions and 0 deletions

166
lextwt.avro Normal file
View File

@@ -0,0 +1,166 @@
{
"type": "record",
"name": "lextwt",
"namespace": "social.yarn.lextwt",
"fields": [
{
"name": "nick",
"type": "string"
},
{
"name": "uri",
"type": "string"
},
{
"name": "created",
"type": "long",
"logicalType": "timestamp-millis"
},
{
"name": "createdZone",
"type": "string"
},
{
"name": "createdOffset",
"type": "int"
},
{
"name": "msg",
"type": {
"type": "array",
"items": {
"name": "elem",
"type": [
"null",
"string",
{
"type": "record",
"name": "linesep",
"fields": []
},
{
"type": "record",
"name": "comment",
"fields": [
{
"name": "comment",
"type": "string"
},
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "string"
}
]
},
{
"type": "record",
"name": "mention",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "domain",
"type": "string"
},
{
"name": "target",
"type": "string"
}
]
},
{
"type": "record",
"name": "bangmention",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "target",
"type": "string"
}
]
},
{
"type": "record",
"name": "hashtag",
"fields": [
{
"name": "tag",
"type": "string"
},
{
"name": "target",
"type": "string"
}
]
},
{
"type": "record",
"name": "subject",
"fields": [
{
"name": "subject",
"type": "string"
},
{
"name": "tag",
"type": "string"
},
{
"name": "target",
"type": "string"
}
]
},
{
"type": "record",
"name": "link",
"fields": [
{
"name": "linkType",
"type": "int",
"logicalType": "int8"
},
{
"name": "text",
"type": "string"
},
{
"name": "target",
"type": "string"
},
{
"name": "title",
"type": "string"
}
]
},
{
"type": "record",
"name": "code",
"fields": [
{
"name": "code",
"type": "string"
},
{
"name": "codetype",
"type": "int",
"logicalType": "int8"
}
]
}
]
}
}
}
]
}