chanched handlers

This commit is contained in:
2023-08-12 19:26:50 +03:00
parent 85f4b92fa7
commit 17a09f7fb3
28 changed files with 503 additions and 1001 deletions

View File

@@ -7,10 +7,10 @@ option go_package = "go.unistack.org/unistack-org/pkgdash/proto;pkgdashpb";
import "api/annotations.proto";
import "openapiv3/annotations.proto";
import "validate/validate.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/empty.proto";
service PkgdashService {
rpc ListPackage(ListPackageReq) returns (ListPackageRsp) {
rpc ListPackage(google.protobuf.Empty) returns (ListPackageRsp) {
option (micro.openapiv3.openapiv3_operation) = {
operation_id: "ListPackage";
responses: {
@@ -130,9 +130,9 @@ message ListPackageRsp{
}
message UpdatePackageReq {
google.protobuf.UInt64Value id = 1 [(validate.rules).message.required = true];
google.protobuf.StringValue name = 2 [(validate.rules).message.required = true];
google.protobuf.StringValue url = 3 [(validate.rules).message.required = true];
uint64 id = 1 [(validate.rules).uint64.gt = 0];
string name = 2 [(validate.rules).string.min_len = 1];
string url = 3 [(validate.rules).string.min_len = 1];
repeated uint64 modules = 4 ;
repeated uint64 issues = 5 ;
}
@@ -146,7 +146,7 @@ message CommentReq {
}
message AddCommentReq {
google.protobuf.UInt64Value idPackage = 1 [(validate.rules).message.required = true];
uint64 idPackage = 1 [(validate.rules).uint64.gt = 0];
string text = 2;
}
@@ -155,12 +155,14 @@ message AddCommentRsp {
}
message AddPackageReq {
google.protobuf.StringValue name = 1 [(validate.rules).message.required = true];
google.protobuf.StringValue url = 2 [(validate.rules).message.required = true];
string name = 1 [(validate.rules).string.min_len = 1];
string url = 2 [(validate.rules).string.min_len = 1];
repeated uint64 modules = 3;
}
message AddPackageRsp{}
message AddPackageRsp{
string status = 1 [(validate.rules).string.min_len = 1];
}
message GetModuleReq {
repeated uint64 id = 1 ;