kopia lustrzana https://github.com/reiver/greatape
248 wiersze
6.0 KiB
Protocol Buffer
248 wiersze
6.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package protobuf;
|
|
|
|
option go_package = "./";
|
|
|
|
import "objects.proto";
|
|
|
|
// API: SystemCall
|
|
//-----------------------------------------------------------
|
|
message SystemCallRequest {
|
|
string command = 0x00000001;
|
|
}
|
|
|
|
message SystemCallResult {
|
|
}
|
|
|
|
// API: Echo
|
|
//-----------------------------------------------------------
|
|
message EchoRequest {
|
|
Document document = 0x00000001;
|
|
}
|
|
|
|
message EchoResult {
|
|
Document document = 0x00000001;
|
|
}
|
|
|
|
// API: Signup
|
|
//-----------------------------------------------------------
|
|
message SignupRequest {
|
|
string username = 0x00000001;
|
|
string email = 0x00000002;
|
|
string password = 0x00000003;
|
|
}
|
|
|
|
message SignupResult {
|
|
string token = 0x00000001;
|
|
string code = 0x00000002;
|
|
}
|
|
|
|
// API: Verify
|
|
//-----------------------------------------------------------
|
|
message VerifyRequest {
|
|
string email = 0x00000001;
|
|
string token = 0x00000002;
|
|
string code = 0x00000003;
|
|
}
|
|
|
|
message VerifyResult {
|
|
string token = 0x00000001;
|
|
}
|
|
|
|
// API: Login
|
|
//-----------------------------------------------------------
|
|
message LoginRequest {
|
|
string email = 0x00000001;
|
|
string password = 0x00000002;
|
|
}
|
|
|
|
message LoginResult {
|
|
string username = 0x00000001;
|
|
string token = 0x00000002;
|
|
}
|
|
|
|
// API: GetProfileByUser
|
|
//-----------------------------------------------------------
|
|
message GetProfileByUserRequest {
|
|
}
|
|
|
|
message GetProfileByUserResult {
|
|
string username = 0x00000001;
|
|
string displayName = 0x00000002;
|
|
string avatar = 0x00000003;
|
|
string banner = 0x00000004;
|
|
string summary = 0x00000005;
|
|
string github = 0x00000006;
|
|
}
|
|
|
|
// API: UpdateProfileByUser
|
|
//-----------------------------------------------------------
|
|
message UpdateProfileByUserRequest {
|
|
string displayName = 0x00000001;
|
|
string avatar = 0x00000002;
|
|
string banner = 0x00000003;
|
|
string summary = 0x00000004;
|
|
string github = 0x00000005;
|
|
}
|
|
|
|
message UpdateProfileByUserResult {
|
|
string displayName = 0x00000001;
|
|
string avatar = 0x00000002;
|
|
string banner = 0x00000003;
|
|
string summary = 0x00000004;
|
|
string github = 0x00000005;
|
|
}
|
|
|
|
// API: Logout
|
|
//-----------------------------------------------------------
|
|
message LogoutRequest {
|
|
}
|
|
|
|
message LogoutResult {
|
|
}
|
|
|
|
// API: Webfinger
|
|
//-----------------------------------------------------------
|
|
message WebfingerRequest {
|
|
string resource = 0x00000001;
|
|
}
|
|
|
|
message WebfingerResult {
|
|
repeated string aliases = 0x00000001;
|
|
repeated ActivityPubLink links = 0x00000002;
|
|
string subject = 0x00000003;
|
|
}
|
|
|
|
// API: GetActor
|
|
//-----------------------------------------------------------
|
|
message GetActorRequest {
|
|
string username = 0x00000001;
|
|
}
|
|
|
|
message GetActorResult {
|
|
repeated string context = 0x00000001 [json_name = "@context"];
|
|
string id = 0x00000002;
|
|
string followers = 0x00000003;
|
|
string following = 0x00000004;
|
|
string inbox = 0x00000005;
|
|
string outbox = 0x00000006;
|
|
string name = 0x00000007;
|
|
string preferredUsername = 0x00000008;
|
|
string type = 0x00000009;
|
|
string url = 0x0000000A;
|
|
ActivityPubMedia icon = 0x0000000B;
|
|
ActivityPubMedia image = 0x0000000C;
|
|
ActivityPubPublicKey publicKey = 0x0000000D;
|
|
string summary = 0x0000000E;
|
|
string published = 0x0000000F;
|
|
}
|
|
|
|
// API: FollowActor
|
|
//-----------------------------------------------------------
|
|
message FollowActorRequest {
|
|
string username = 0x00000001;
|
|
string acct = 0x00000002;
|
|
}
|
|
|
|
message FollowActorResult {
|
|
string url = 0x00000001;
|
|
}
|
|
|
|
// API: AuthorizeInteraction
|
|
//-----------------------------------------------------------
|
|
message AuthorizeInteractionRequest {
|
|
string uri = 0x00000001;
|
|
}
|
|
|
|
message AuthorizeInteractionResult {
|
|
string uri = 0x00000001;
|
|
bool success = 0x00000002;
|
|
}
|
|
|
|
// API: GetFollowers
|
|
//-----------------------------------------------------------
|
|
message GetFollowersRequest {
|
|
string username = 0x00000001;
|
|
}
|
|
|
|
message GetFollowersResult {
|
|
string context = 0x00000001 [json_name = "@context"];
|
|
string id = 0x00000002;
|
|
string type = 0x00000003;
|
|
int32 totalItems = 0x00000004;
|
|
repeated string orderedItems = 0x00000005;
|
|
string first = 0x00000006;
|
|
}
|
|
|
|
// API: GetFollowing
|
|
//-----------------------------------------------------------
|
|
message GetFollowingRequest {
|
|
string username = 0x00000001;
|
|
}
|
|
|
|
message GetFollowingResult {
|
|
string context = 0x00000001 [json_name = "@context"];
|
|
string id = 0x00000002;
|
|
string type = 0x00000003;
|
|
int32 totalItems = 0x00000004;
|
|
repeated string orderedItems = 0x00000005;
|
|
string first = 0x00000006;
|
|
}
|
|
|
|
// API: PostToOutbox
|
|
//-----------------------------------------------------------
|
|
message PostToOutboxRequest {
|
|
string username = 0x00000001;
|
|
string context = 0x00000002 [json_name = "@context"];
|
|
string activityType = 0x00000003 [json_name = "type"];
|
|
string to = 0x00000004;
|
|
string attributedTo = 0x00000005;
|
|
string inReplyTo = 0x00000006;
|
|
string content = 0x00000007;
|
|
}
|
|
|
|
message PostToOutboxResult {
|
|
}
|
|
|
|
// API: GetOutbox
|
|
//-----------------------------------------------------------
|
|
message GetOutboxRequest {
|
|
string username = 0x00000001;
|
|
}
|
|
|
|
message GetOutboxResult {
|
|
string context = 0x00000001 [json_name = "@context"];
|
|
string id = 0x00000002;
|
|
string type = 0x00000003;
|
|
int32 totalItems = 0x00000004;
|
|
repeated ActivityPubActivity orderedItems = 0x00000005;
|
|
string first = 0x00000006;
|
|
}
|
|
|
|
// API: PostToInbox
|
|
//-----------------------------------------------------------
|
|
message PostToInboxRequest {
|
|
string username = 0x00000001;
|
|
}
|
|
|
|
message PostToInboxResult {
|
|
}
|
|
|
|
// API: GetInbox
|
|
//-----------------------------------------------------------
|
|
message GetInboxRequest {
|
|
string username = 0x00000001;
|
|
}
|
|
|
|
message GetInboxResult {
|
|
string context = 0x00000001 [json_name = "@context"];
|
|
string id = 0x00000002;
|
|
string type = 0x00000003;
|
|
int32 totalItems = 0x00000004;
|
|
repeated ActivityPubActivity orderedItems = 0x00000005;
|
|
string first = 0x00000006;
|
|
}
|
|
|
|
//-----------------------------------------------------------
|