syntax = "proto3"; option go_package = ".;proto"; package proto; service RealmService { rpc ListAvailableRealm(LookupUserRealmRequest) returns (ListRealmResponse) {} rpc ListOwnedRealm(LookupUserRealmRequest) returns (ListRealmResponse) {} rpc ListRealm(ListRealmRequest) returns (ListRealmResponse) {} rpc GetRealm(LookupRealmRequest) returns (RealmInfo) {} rpc ListRealmMember(RealmMemberLookupRequest) returns (ListRealmMemberResponse) {} rpc GetRealmMember(RealmMemberLookupRequest) returns (RealmMemberInfo) {} rpc CheckRealmMemberPerm(CheckRealmPermRequest) returns (CheckRealmPermResponse) {} } message RealmInfo { uint64 id = 1; string alias = 2; string name = 3; string description = 4; string avatar = 6; string banner = 7; bool is_public = 9; bool is_community = 10; bytes access_policy = 11; } message ListRealmRequest { repeated uint64 id = 1; } 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 { optional uint64 realm_id = 1; optional uint64 user_id = 2; } message RealmMemberInfo { uint64 id = 1; uint64 realm_id = 2; uint64 user_id = 3; int32 power_level = 4; } message ListRealmMemberResponse { repeated RealmMemberInfo data = 1; } message CheckRealmPermRequest { uint64 realm_id = 1; uint64 user_id = 2; int32 power_level = 3; } message CheckRealmPermResponse { bool is_success = 1; }