Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bufdev committed Feb 28, 2024
1 parent 2bbc844 commit 5f58d89
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 55 deletions.
8 changes: 0 additions & 8 deletions buf/registry/module/v1/resource_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package buf.registry.module.v1;

import "buf/registry/module/v1/digest.proto";
import "buf/registry/module/v1/resource.proto";
import "buf/validate/validate.proto";

Expand All @@ -38,13 +37,6 @@ message GetResourcesRequest {
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
];
// The DigestType to use for Digests returned on Commits.
//
// If this DigestType is not available, an error is returned.
// Note that certain DigestTypes may be deprecated over time.
//
// If not set, the latest DigestType is used, currently B5.
DigestType digest_type = 2 [(buf.validate.field).enum.defined_only = true];
}

message GetResourcesResponse {
Expand Down
17 changes: 2 additions & 15 deletions buf/registry/module/v1/upload_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@ message UploadRequest {
//
// This will consist of the .proto files, license files, and documentation files.
repeated File files = 2 [(buf.validate.field).repeated.min_items = 1];
// The original v1beta1 or v1 buf.yaml file that encapsulated this reference, if it existed.
//
// This is used in deprecated digest calculations only. None of the structured
// information within this File will or should convey further information about the reference.
File v1_buf_yaml_file = 3;
// The original v1beta1 or v1 buf.lock file that encapsulated this reference, if it existed.
//
// This is used in deprecated digest calculations only. None of the structured
// information within this File will or should convey further information about the reference.
//
// Importantly, this file is *not* used to determine the dependencies of the reference. To
// specify the dependencies, use the dep_refs fields.
File v1_buf_lock_file = 4;
// The labels to associate with the Commit for the Content.
//
// If an id is set, this id must represent a Label that already exists and is
Expand All @@ -64,12 +51,12 @@ message UploadRequest {
//
// If the Labels do not exist, they will be created.
// If the Labels were archived, they will be unarchived.
repeated ScopedLabelRef scoped_label_refs = 5;
repeated ScopedLabelRef scoped_label_refs = 3;
// The URL of the source control commit to associate with the Commit for this Content.
//
// BSR users can navigate to this link to find source control information that is relevant to this Commit
// (e.g. commit description, PR discussion, authors, approvers, etc.).
string source_control_url = 6 [
string source_control_url = 4 [
(buf.validate.field).string.uri = true,
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
Expand Down
9 changes: 9 additions & 0 deletions buf/registry/module/v1beta1/graph_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ service GraphService {
}

message GetGraphRequest {
// A ResourceRef to reference a Commit to include in the Graph.
//
// This wraps the top-level ResourceRef.
message ResourceRef {
// The top-level ResourceRef.
buf.registry.module.v1beta1.ResourceRef resource_ref = 1 [(buf.validate.field).required = true];
// The registry hostname of the Resourceref.
string registry = 2 [(buf.validate.field).required = true];
}
// The references to resolve to Commits to include in the graph.
//
// See the documentation on ResourceRef for resource resolution details.
Expand Down
6 changes: 0 additions & 6 deletions buf/registry/module/v1beta1/resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ message Resource {
//
// ResourceRefs cannot reference archived Labels. The only way to retrieve an archived Label
// is to use LabelService.GetLabels.
//
// See the package documentation for more details. You should likely use buf.registry.module.v1beta1
// and not this package.
message ResourceRef {
option (buf.registry.priv.extension.v1beta1.message).request_only = true;
option (buf.registry.priv.extension.v1beta1.message).no_side_effects_only = true;
Expand Down Expand Up @@ -106,7 +103,4 @@ message ResourceRef {
// The fully-qualified name of the resource.
Name name = 2;
}

// The registry hostname of the resource.
string registry = 3 [(buf.validate.field).required = true];
}
31 changes: 5 additions & 26 deletions buf/registry/module/v1beta1/upload_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,13 @@ import "buf/validate/validate.proto";
option go_package = "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/module/v1beta1";

// Upload contents.
//
// See the package documentation for more details. You should likely use buf.registry.module.v1beta1
// and not this package.
service UploadService {
// Upload contents for given set of Modules.
//
// Content consists of the Files: .proto files, license files, and documentation files.
//
// See the package documentation for more details. You should likely use buf.registry.module.v1beta1
// and not this package.
rpc Upload(UploadRequest) returns (UploadResponse) {}
}

// See the package documentation for more details. You should likely use buf.registry.module.v1beta1
// and not this package.
message UploadRequest {
// A dependency of one or more references specified by Contents.
//
Expand All @@ -57,24 +49,11 @@ message UploadRequest {
// Content to upload for a given reference.
message Content {
// The Module of the reference.
buf.registry.module.v1beta1.ModuleRef module_ref = 1 [(buf.validate.field).required = true];
ModuleRef module_ref = 1 [(buf.validate.field).required = true];
// The Files of the Content.
//
// This will consist of the .proto files, license files, and documentation files.
repeated buf.registry.module.v1beta1.File files = 2 [(buf.validate.field).repeated.min_items = 1];
// The original v1beta1 or v1 buf.yaml file that encapsulated this reference, if it existed.
//
// This is used in deprecated digest calculations only. None of the structured
// information within this File will or should convey further information about the reference.
buf.registry.module.v1beta1.File v1_buf_yaml_file = 3;
// The original v1beta1 or v1 buf.lock file that encapsulated this reference, if it existed.
//
// This is used in deprecated digest calculations only. None of the structured
// information within this File will or should convey further information about the reference.
//
// Importantly, this file is *not* used to determine the dependencies of the reference. To
// specify the dependencies, use the dep_refs fields.
buf.registry.module.v1beta1.File v1_buf_lock_file = 4;
repeated File files = 2 [(buf.validate.field).repeated.min_items = 1];
// The labels to associate with the Commit for the Content.
//
// If an id is set, this id must represent a Label that already exists and is
Expand All @@ -85,12 +64,12 @@ message UploadRequest {
//
// If the Labels do not exist, they will be created.
// If the Labels were archived, they will be unarchived.
repeated buf.registry.module.v1beta1.ScopedLabelRef scoped_label_refs = 5;
repeated ScopedLabelRef scoped_label_refs = 3;
// The URL of the source control commit to associate with the Commit for this Content.
//
// BSR users can navigate to this link to find source control information that is relevant to this Commit
// (e.g. commit description, PR discussion, authors, approvers, etc.).
string source_control_url = 6 [
string source_control_url = 4 [
(buf.validate.field).string.uri = true,
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
Expand All @@ -117,5 +96,5 @@ message UploadResponse {
//
// A single Commit will be returned for each reference. These Commits may or may not be new.
// If nothing changed for a given reference, the existing Commit will be returned.
repeated buf.registry.module.v1beta1.Commit commits = 1 [(buf.validate.field).repeated.min_items = 1];
repeated Commit commits = 1 [(buf.validate.field).repeated.min_items = 1];
}

0 comments on commit 5f58d89

Please sign in to comment.