-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Resource service for Plugin v1beta1
- Loading branch information
1 parent
81aff04
commit 141fe38
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2023-2024 Buf Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package buf.registry.plugin.v1beta1; | ||
|
||
import "buf/registry/plugin/v1beta1/digest.proto"; | ||
import "buf/registry/plugin/v1beta1/resource.proto"; | ||
import "buf/validate/validate.proto"; | ||
|
||
option go_package = "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/plugin/v1beta1"; | ||
|
||
// Operate on Resources. | ||
service ResourceService { | ||
// Get Resources. | ||
rpc GetResources(GetResourcesRequest) returns (GetResourcesResponse) { | ||
option idempotency_level = NO_SIDE_EFFECTS; | ||
} | ||
} | ||
|
||
message GetResourcesRequest { | ||
// References to request a Resource for. | ||
// | ||
// See the documentation on ResourceRef for resource resolution details. | ||
repeated ResourceRef resource_refs = 1 [ | ||
(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 P1. | ||
DigestType digest_type = 2 [(buf.validate.field).enum.defined_only = true]; | ||
} | ||
|
||
message GetResourcesResponse { | ||
// The found Resources in the same order as requested. | ||
repeated Resource resources = 1 [(buf.validate.field).repeated.min_items = 1]; | ||
} |