syntax = "proto3"; 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"; service PkgdashService { rpc ListPackage(ListPackageReq) returns (ListPackageRsp) { option (micro.openapiv3.openapiv3_operation) = { operation_id: "ListPackage"; responses: { default: { reference: {_ref: ".pkgdash.ErrorRsp"}; }; }; }; option (micro.api.http) = { get: "/v1/packages"; }; }; rpc UpdateInfo(UpdateInfoPackageReq) returns (UpdateInfoPackageRsp) { option (micro.openapiv3.openapiv3_operation) = { operation_id: "UpdateInfo"; responses: { default: { reference: {_ref: ".pkgdash.ErrorRsp"}; }; }; }; option (micro.api.http) = { post: "/v1/package/{id}"; body: "*"; }; }; rpc AddComment(CommentReq) returns (CommentRsp) { option (micro.openapiv3.openapiv3_operation) = { operation_id: "AddComment"; responses: { default: { reference: {_ref: ".pkgdash.ErrorRsp"}; }; }; }; option (micro.api.http) = { post: "/v1/package/{pkg}/comment"; body: "*"; }; }; }; 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 CommentReq { uint64 pkg = 1 [(validate.rules).uint64.gt = 0]; string text = 2; } message CommentRsp { uint64 id = 1 [(validate.rules).uint64.gt = 0]; }