Nexus/pkg/proto/user.proto

42 lines
791 B
Protocol Buffer

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 {
optional uint64 user_id = 1;
optional string name = 2;
}
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;
}