Dealer/pkg/proto/realm.proto

69 lines
1.5 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
option go_package = ".;proto";
package proto;
service Realm {
rpc ListCommunityRealm(ListRealmRequest) returns (ListRealmResponse) {}
rpc ListAvailableRealm(LookupUserRealmRequest) returns (ListRealmResponse) {}
rpc ListOwnedRealm(LookupUserRealmRequest) returns (ListRealmResponse) {}
rpc GetRealm(LookupRealmRequest) returns (RealmInfo) {}
rpc ListRealmMember(RealmMemberLookupRequest) returns (ListRealmMemberResponse) {}
2024-07-16 02:44:14 +00:00
rpc GetRealmMember(RealmMemberLookupRequest) returns (RealmMemberInfo) {}
rpc CheckRealmMemberPerm(CheckRealmPermRequest) returns (CheckRealmPermResponse) {}
}
message RealmInfo {
uint64 id = 1;
string alias = 2;
string name = 3;
string description = 4;
2024-09-11 14:58:28 +00:00
string avatar = 6;
string banner = 7;
bool is_public = 9;
bool is_community = 10;
}
message ListRealmRequest {
}
message LookupUserRealmRequest {
uint64 user_id = 1;
}
message LookupRealmRequest {
optional uint64 id = 1;
optional string alias = 2;
optional bool is_public = 3;
optional bool is_community = 4;
}
message ListRealmResponse {
repeated RealmInfo data = 1;
}
message RealmMemberLookupRequest {
uint64 realm_id = 1;
optional uint64 user_id = 2;
}
2024-07-16 02:44:14 +00:00
message RealmMemberInfo {
uint64 realm_id = 1;
uint64 user_id = 2;
int32 power_level = 3;
}
message ListRealmMemberResponse {
2024-07-16 02:44:14 +00:00
repeated RealmMemberInfo data = 1;
}
message CheckRealmPermRequest {
uint64 realm_id = 1;
uint64 user_id = 2;
int32 power_level = 3;
}
message CheckRealmPermResponse {
bool is_success = 1;
}