add GetComments and update proto
This commit is contained in:
@@ -78,6 +78,19 @@ service PkgdashService {
|
||||
get: "/v1/module";
|
||||
};
|
||||
};
|
||||
rpc GetComments(GetCommentsReq) returns (GetCommentsRsp) {
|
||||
option (micro.openapiv3.openapiv3_operation) = {
|
||||
operation_id: "GetComments";
|
||||
responses: {
|
||||
default: {
|
||||
reference: {_ref: ".pkgdash.ErrorRsp"};
|
||||
};
|
||||
};
|
||||
};
|
||||
option (micro.api.http) = {
|
||||
get: "/v1/comment";
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
message ErrorRsp {
|
||||
@@ -120,8 +133,8 @@ message Comment {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
uint64 package = 2 [(validate.rules).uint64.gt = 0];
|
||||
string text = 3;
|
||||
uint64 created = 4 [(validate.rules).uint64.gt = 0];
|
||||
uint64 updated = 5 [(validate.rules).uint64.gt = 0];
|
||||
string created = 4 ;
|
||||
string updated = 5 ;
|
||||
}
|
||||
|
||||
message ListPackageReq {}
|
||||
@@ -169,4 +182,20 @@ message GetModuleReq {
|
||||
}
|
||||
message GetModuleRsp {
|
||||
repeated Module modules = 1 ;
|
||||
}
|
||||
|
||||
message GetCommentsReq {
|
||||
repeated uint64 id = 1 [(validate.rules).repeated = {
|
||||
unique: true
|
||||
min_items: 1
|
||||
items: {
|
||||
uint64: {
|
||||
gt: 0
|
||||
}
|
||||
}
|
||||
}] ;
|
||||
}
|
||||
|
||||
message GetCommentsRsp {
|
||||
repeated Comment comments = 1;
|
||||
}
|
Reference in New Issue
Block a user