Skip to content

Commit

Permalink
feat: add PorterBinarySummary
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Aug 7, 2024
1 parent c758684 commit aeb9c54
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
13 changes: 5 additions & 8 deletions proto/librarian/porter/v1/porter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,21 @@ service LibrarianPorterService {

message GetPorterInformationRequest {}
message GetPorterInformationResponse {
// Human-readable name. no format limit.
string name = 1;
// Version of the porter. no format limit.
string version = 2;
librarian.v1.PorterBinarySummary binary_summary = 1;
// Global identifier. Same global name means same project. no format limit.
// e.g. use project url "github.com/tuihub/porter-steam".
string global_name = 3;
string global_name = 2;
// Region is used to group porters,
// same porter in same region can be randomly selected.
// Leave empty to use default region.
string region = 4;
string region = 3;
// Supported features.
PorterFeatureSummary feature_summary = 5;
PorterFeatureSummary feature_summary = 4;
// JSON schema for `FeatureRequest.context_json`.
// Leave empty if not needed.
// If needed, all feature requests should deliver `context_json`.
// Can be used to configure third-party token, etc.
optional string context_json_schema = 6;
optional string context_json_schema = 5;
}

message PorterFeatureSummary {
Expand Down
2 changes: 1 addition & 1 deletion proto/librarian/sephirah/v1/sephirah.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ service LibrarianSephirahService {
rpc ListPorters(ListPortersRequest) returns (ListPortersResponse);
// `Tiphereth` `Admin`
rpc UpdatePorterStatus(UpdatePorterStatusRequest) returns (UpdatePorterStatusResponse);
// `Tiphereth` `Normal`
// `Tiphereth` `Admin` `Normal limited`
rpc ListPorterGroups(ListPorterGroupsRequest) returns (ListPorterGroupsResponse);
// `Tiphereth` `Normal`
rpc CreatePorterContext(CreatePorterContextRequest) returns (CreatePorterContextResponse);
Expand Down
17 changes: 9 additions & 8 deletions proto/librarian/sephirah/v1/tiphereth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ message UpdatePorterStatusResponse {}

message ListPorterGroupsRequest {
librarian.v1.PagingRequest paging = 1;
// Normal user can only list active porters
repeated UserStatus status_filter = 2;
}
message ListPorterGroupsResponse {
librarian.v1.PagingResponse paging = 1;
Expand Down Expand Up @@ -236,9 +238,9 @@ enum UserStatus {

message Porter {
librarian.v1.InternalID id = 1;
string name = 2;
string version = 3;
string global_name = 4;
librarian.v1.PorterBinarySummary binary_summary = 2;
string global_name = 3;
string region = 4;
string feature_summary = 5;
UserStatus status = 6;
// Only used in response
Expand Down Expand Up @@ -296,9 +298,8 @@ enum PorterContextHandleStatus {
}

message PorterGroup {
string global_name = 1;
repeated string regions = 2;
string context_json = 3;
string name = 4;
string description = 5;
librarian.v1.PorterBinarySummary binary_summary = 1;
string global_name = 2;
repeated string regions = 3;
optional string context_json_schema = 4;
}
19 changes: 19 additions & 0 deletions proto/librarian/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,22 @@ message FeedEnclosure {
// `standard field`
string type = 3;
}

message PorterBinarySummary {
// Server source code address.
// *Should* be a valid http address.
string source_code_address = 1;
// Binary build version.
// The content *should* be a semantic version string similar to the one generated by `git describe`,
// but rely on the actual implementation.
string build_version = 2;
// Binary build date.
// The content *should* be a date format that is human-readable.
string build_date = 3;
// Human-readable name. plain text.
string name = 4;
// Human-readable version. plain text.
string version = 5;
// Human-readable description. plain text or markdown.
string description = 6;
}

0 comments on commit aeb9c54

Please sign in to comment.