Nexus/pkg/proto/user.proto

41 lines
754 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
option go_package = ".;proto";
package proto;
service UserService {
rpc GetUser(GetUserRequest) returns (UserInfo) {}
rpc ListUser(ListUserRequest) returns (MultipleUserInfo) {}
rpc ListUserRelative(ListUserRelativeRequest) returns (ListUserRelativeResponse) {}
}
message UserInfo {
uint64 id = 1;
string name = 2;
optional bytes perm_nodes = 3;
optional bytes metadata = 4;
}
message MultipleUserInfo {
repeated UserInfo data = 1;
}
message GetUserRequest {
uint64 user_id = 1;
}
message ListUserRequest {
repeated uint64 user_id = 1;
}
message ListUserRelativeRequest {
uint64 user_id = 1;
int32 status = 2;
bool is_related = 3;
}
message ListUserRelativeResponse {
repeated UserInfo data = 1;
}