add handle: addComment;addPackage storage:ListPackage;AddComment;AddPackage
This commit is contained in:
71
proto/docker_generate/dashboard.proto
Normal file
71
proto/docker_generate/dashboard.proto
Normal file
@@ -0,0 +1,71 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package proto;
|
||||
|
||||
option go_package = "./go_generate;go_generate";
|
||||
|
||||
import "validate/validate.proto";
|
||||
|
||||
|
||||
message ErrorRsp {
|
||||
Error error = 1 [json_name = "error"];
|
||||
}
|
||||
|
||||
message Error {
|
||||
string code = 1 [json_name = "code"];
|
||||
string title = 2 [json_name = "title"];
|
||||
string uuid = 3 [json_name = "uuid"];
|
||||
string details = 4 [json_name = "details"];
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
message Module {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
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];
|
||||
}
|
||||
|
||||
message Issue {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
uint64 status = 2 [(validate.rules).uint64.gt = 0];
|
||||
string desc = 3 [(validate.rules).string.min_len = 1];
|
||||
uint64 package = 4 [(validate.rules).uint64.gt = 0];
|
||||
repeated uint64 modules = 5;
|
||||
}
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
message ListPackageReq {}
|
||||
message ListPackageRsp{
|
||||
repeated Package packages = 1;
|
||||
}
|
||||
|
||||
message UpdateInfoPackageRsp {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
}
|
||||
message UpdateInfoPackageReq {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
}
|
||||
|
||||
message CommentRsp {
|
||||
uint64 idPackage = 1 [(validate.rules).uint64.gt = 0];
|
||||
string text = 2;
|
||||
}
|
||||
|
||||
message CommentReq {
|
||||
uint64 id = 1 [(validate.rules).uint64.gt = 0];
|
||||
}
|
42
proto/docker_generate/restService.proto
Normal file
42
proto/docker_generate/restService.proto
Normal file
@@ -0,0 +1,42 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package proto;
|
||||
|
||||
option go_package = "./go_generate;go_generate";
|
||||
|
||||
import "dashboard.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "protoc-gen-swagger/options/annotations.proto";
|
||||
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "service-platform/product-services/mts-money/gateway-proto",
|
||||
version: "0";
|
||||
};
|
||||
consumes: "application/json";
|
||||
produces: "application/json";
|
||||
};
|
||||
|
||||
service DashboardService {
|
||||
rpc ListPackage(ListPackageReq) returns (ListPackageRsp) {
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
operation_id: "ListPackage";
|
||||
responses: {
|
||||
key: "default";
|
||||
value: {
|
||||
description: "Error response";
|
||||
schema: {
|
||||
json_schema: {
|
||||
ref: ".go_generate.ErrorRsp";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
option (google.api.http) = {
|
||||
get: "/listPackage";
|
||||
};
|
||||
};
|
||||
rpc UpdateInfo(UpdateInfoPackageRsp) returns (UpdateInfoPackageReq) {};
|
||||
rpc AddComment(CommentRsp) returns (CommentReq) {};
|
||||
};
|
Reference in New Issue
Block a user