intermediate merge
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -5,11 +5,9 @@ package pkgdash;
|
||||
option go_package = "go.unistack.org/unistack-org/pkgdash/proto;pkgdashpb";
|
||||
|
||||
import "api/annotations.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "openapiv2/annotations.proto";
|
||||
import "openapiv3/annotations.proto";
|
||||
import "tag/tag.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
service PkgdashService {
|
||||
rpc ListPackage(ListPackageReq) returns (ListPackageRsp) {
|
||||
@@ -25,7 +23,7 @@ service PkgdashService {
|
||||
get: "/v1/packages";
|
||||
};
|
||||
};
|
||||
rpc UpdateInfo(UpdateInfoPackageReq) returns (UpdateInfoPackageRsp) {
|
||||
rpc UpdatePackage(UpdatePackageReq) returns (UpdatePackageRsp) {
|
||||
option (micro.openapiv3.openapiv3_operation) = {
|
||||
operation_id: "UpdateInfo";
|
||||
responses: {
|
||||
@@ -39,7 +37,7 @@ service PkgdashService {
|
||||
body: "*";
|
||||
};
|
||||
};
|
||||
rpc AddComment(CommentReq) returns (CommentRsp) {
|
||||
rpc AddComment(AddCommentReq) returns (AddCommentRsp) {
|
||||
option (micro.openapiv3.openapiv3_operation) = {
|
||||
operation_id: "AddComment";
|
||||
responses: {
|
||||
@@ -53,6 +51,33 @@ service PkgdashService {
|
||||
body: "*";
|
||||
};
|
||||
};
|
||||
rpc AddPackage(AddPackageReq) returns (AddPackageRsp) {
|
||||
option (micro.openapiv3.openapiv3_operation) = {
|
||||
operation_id: "AddPackage";
|
||||
responses: {
|
||||
default: {
|
||||
reference: {_ref: ".pkgdash.ErrorRsp"};
|
||||
};
|
||||
};
|
||||
};
|
||||
option (micro.api.http) = {
|
||||
post: "/v1/package";
|
||||
body: "*";
|
||||
};
|
||||
};
|
||||
rpc GetModule(GetModuleReq) returns (GetModuleRsp) {
|
||||
option (micro.openapiv3.openapiv3_operation) = {
|
||||
operation_id: "GetModule";
|
||||
responses: {
|
||||
default: {
|
||||
reference: {_ref: ".pkgdash.ErrorRsp"};
|
||||
};
|
||||
};
|
||||
};
|
||||
option (micro.api.http) = {
|
||||
get: "/v1/module";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
message ErrorRsp {
|
||||
@@ -70,8 +95,9 @@ message Package {
|
||||
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 Module modules = 4;
|
||||
repeated Issue issues = 5;
|
||||
repeated uint64 modules = 4;
|
||||
repeated uint64 issues = 5;
|
||||
repeated uint64 comments = 6;
|
||||
};
|
||||
|
||||
message Module {
|
||||
@@ -79,6 +105,7 @@ message Module {
|
||||
string name = 2 [(validate.rules).string.min_len = 1];
|
||||
string version = 3 [(validate.rules).string.min_len = 1];
|
||||
uint64 package = 4 [(validate.rules).uint64.gt = 0];
|
||||
string last_version = 5 [(validate.rules).string.min_len = 1];
|
||||
}
|
||||
|
||||
message Issue {
|
||||
@@ -102,10 +129,14 @@ message ListPackageRsp{
|
||||
repeated Package packages = 1;
|
||||
}
|
||||
|
||||
message UpdateInfoPackageRsp {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
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];
|
||||
repeated uint64 modules = 4 ;
|
||||
repeated uint64 issues = 5 ;
|
||||
}
|
||||
message UpdateInfoPackageReq {
|
||||
message UpdatePackageRsp {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
}
|
||||
|
||||
@@ -114,6 +145,26 @@ message CommentReq {
|
||||
string text = 2;
|
||||
}
|
||||
|
||||
message CommentRsp {
|
||||
message AddCommentReq {
|
||||
google.protobuf.UInt64Value idPackage = 1 [(validate.rules).message.required = true];
|
||||
string text = 2;
|
||||
}
|
||||
|
||||
message AddCommentRsp {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
}
|
||||
|
||||
message AddPackageReq {
|
||||
google.protobuf.StringValue name = 1 [(validate.rules).message.required = true];
|
||||
google.protobuf.StringValue url = 2 [(validate.rules).message.required = true];
|
||||
repeated uint64 modules = 3;
|
||||
}
|
||||
|
||||
message AddPackageRsp{}
|
||||
|
||||
message GetModuleReq {
|
||||
repeated uint64 id = 1 ;
|
||||
}
|
||||
message GetModuleRsp {
|
||||
repeated Module modules = 1 ;
|
||||
}
|
||||
Reference in New Issue
Block a user