Passport/pkg/proto/realms.proto

55 lines
1.3 KiB
Protocol Buffer
Raw Normal View History

2024-05-03 17:47:44 +00:00
syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = ".;proto";
package proto;
service Realms {
rpc ListCommunityRealm(google.protobuf.Empty) returns (ListRealmResponse) {}
rpc ListAvailableRealm(RealmLookupWithUserRequest) returns (ListRealmResponse) {}
rpc ListOwnedRealm(RealmLookupWithUserRequest) returns (ListRealmResponse) {}
rpc GetRealm(RealmLookupRequest) returns (RealmResponse) {}
2024-05-04 02:53:24 +00:00
rpc ListRealmMember(RealmMemberLookupRequest) returns (ListRealmMemberResponse) {}
rpc GetRealmMember(RealmMemberLookupRequest) returns (RealmMemberResponse) {}
2024-05-03 17:47:44 +00:00
}
message RealmLookupWithUserRequest {
uint64 user_id = 1;
}
message RealmLookupRequest {
optional uint64 id = 1;
optional string alias = 2;
optional bool is_public = 3;
optional bool is_community = 4;
}
message RealmResponse {
2024-05-04 08:59:31 +00:00
uint64 id = 1;
string alias = 2;
string name = 3;
string description = 4;
bool is_public = 5;
bool is_community = 6;
2024-05-03 17:47:44 +00:00
}
message ListRealmResponse {
repeated RealmResponse data = 1;
2024-05-04 02:53:24 +00:00
}
message RealmMemberLookupRequest {
uint64 realm_id = 1;
optional uint64 user_id = 2;
}
message RealmMemberResponse {
uint64 realm_id = 1;
uint64 user_id = 2;
int32 power_level = 3;
}
message ListRealmMemberResponse {
repeated RealmMemberResponse data = 1;
2024-05-03 17:47:44 +00:00
}