go-lextwt-encoding/lextwt.proto
2025-03-26 18:49:42 -06:00

112 lines
1.7 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "go.sour.is/lextwt-proto/pb";
service TwtRegistryService {
rpc latestTwts (LatestTwts) returns (TwtRegistry);
rpc users (Pager) returns (TwtRegistry);
}
message LatestTwts {}
message Pager {}
message TwtRegistry {
repeated Comment preamble = 1;
repeated Twt twts = 3;
}
message TwtFeed {
Twter twter = 2;
repeated Comment preamble = 1;
repeated Twt twts = 3;
}
message BangMention {
string name = 1;
string target = 2;
}
message Code {
enum Type {
CODE_UNSPECIFIED = 0;
CODE_INLINE = 1;
CODE_BLOCK = 2;
}
Type type = 1;
string code = 2;
}
message Comment {
string comment = 1;
string key = 2;
string value = 3;
}
message DateTime {
int64 timestamp = 1;
int32 offset = 2;
string zone = 3;
}
message LineSeparator {}
message Link {
enum Type {
LINK_UNSPECIFIED = 0;
LINK_STANDARD = 1;
LINK_MEDIA = 2;
LINK_PLAIN = 3;
LINK_NAKED = 4;
}
Type type = 1;
string alt = 2;
string target = 3;
string title = 4;
}
message Mention {
string name = 1;
string target = 2;
}
message Subject {
string subject = 1;
Tag tag = 2;
}
message Tag {
string tag = 1;
string target = 2;
}
message Text {
string text = 1;
}
message Twter {
string nick = 1;
string uri = 2;
}
message Elem {
oneof elem {
BangMention bangmention = 1;
Code code = 2;
Comment comment = 3;
LineSeparator lineseparator = 4;
Link link = 5;
Mention mention = 6;
Subject subject = 7;
Tag tag = 8;
Text text = 9;
};
}
message Twt {
Twter twter = 1;
DateTime created = 2;
repeated Elem msg = 3;
}