This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add v1 of the API, generate samples (#82)
* build(node): update artifact name for npm PiperOrigin-RevId: 398863334 Source-Link: googleapis/googleapis@667a478 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ac73deb889a99b68d59eed743b3d61fbc377f9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFjNzNkZWI4ODlhOTliNjhkNTllZWQ3NDNiM2Q2MWZiYzM3N2Y5YiJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2f5e87b
commit 07b5be6
Showing
38 changed files
with
11,589 additions
and
4,555 deletions.
There are no files selected for viewing
106 changes: 106 additions & 0 deletions
106
protos/google/devtools/artifactregistry/v1/artifact.proto
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,106 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// 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 google.devtools.artifactregistry.v1; | ||
|
||
import "google/api/field_behavior.proto"; | ||
import "google/api/resource.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "google/api/annotations.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; | ||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ArtifactProto"; | ||
option java_package = "com.google.devtools.artifactregistry.v1"; | ||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; | ||
option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; | ||
|
||
// DockerImage represents a docker artifact. | ||
// The following fields are returned as untyped metadata in the Version | ||
// resource, using camelcase keys (i.e. metadata.imageSizeBytes): | ||
// - imageSizeBytes | ||
// - mediaType | ||
// - buildTime | ||
message DockerImage { | ||
option (google.api.resource) = { | ||
type: "artifactregistry.googleapis.com/DockerImage" | ||
pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" | ||
}; | ||
|
||
// Required. registry_location, project_id, repository_name and image id forms a unique | ||
// image | ||
// name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`. | ||
// For example, | ||
// "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ | ||
// nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", | ||
// where "us-west4" is the registry_location, "test-project" is the | ||
// project_id, "test-repo" is the repository_name and | ||
// "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" | ||
// is the image's digest. | ||
string name = 1 [(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Required. URL to access the image. | ||
// Example: | ||
// us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf | ||
string uri = 2 [(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Tags attached to this image. | ||
repeated string tags = 3; | ||
|
||
// Calculated size of the image. | ||
// This field is returned as the 'metadata.imageSizeBytes' field in the | ||
// Version resource. | ||
int64 image_size_bytes = 4; | ||
|
||
// Time the image was uploaded. | ||
google.protobuf.Timestamp upload_time = 5; | ||
|
||
// Media type of this image, e.g. | ||
// "application/vnd.docker.distribution.manifest.v2+json". | ||
// This field is returned as the 'metadata.mediaType' field in the | ||
// Version resource. | ||
string media_type = 6; | ||
|
||
// The time this image was built. | ||
// This field is returned as the 'metadata.buildTime' field in the | ||
// Version resource. | ||
// The build time is returned to the client as an RFC 3339 string, which can | ||
// be easily used with the JavaScript Date constructor. | ||
google.protobuf.Timestamp build_time = 7; | ||
} | ||
|
||
// The request to list docker images. | ||
message ListDockerImagesRequest { | ||
// Required. The name of the parent resource whose docker images will be listed. | ||
string parent = 1 [(google.api.field_behavior) = REQUIRED]; | ||
|
||
// The maximum number of artifacts to return. | ||
int32 page_size = 2; | ||
|
||
// The next_page_token value returned from a previous list request, if any. | ||
string page_token = 3; | ||
} | ||
|
||
// The response from listing docker images. | ||
message ListDockerImagesResponse { | ||
// The docker images returned. | ||
repeated DockerImage docker_images = 1; | ||
|
||
// The token to retrieve the next page of artifacts, or empty if there are no | ||
// more artifacts to return. | ||
string next_page_token = 2; | ||
} |
129 changes: 129 additions & 0 deletions
129
protos/google/devtools/artifactregistry/v1/repository.proto
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,129 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// 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 google.devtools.artifactregistry.v1; | ||
|
||
import "google/api/field_behavior.proto"; | ||
import "google/api/resource.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "google/api/annotations.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; | ||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "RepositoryProto"; | ||
option java_package = "com.google.devtools.artifactregistry.v1"; | ||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; | ||
option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; | ||
|
||
// A Repository for storing artifacts with a specific format. | ||
message Repository { | ||
option (google.api.resource) = { | ||
type: "artifactregistry.googleapis.com/Repository" | ||
pattern: "projects/{project}/locations/{location}/repositories/{repository}" | ||
}; | ||
|
||
// A package format. | ||
enum Format { | ||
// Unspecified package format. | ||
FORMAT_UNSPECIFIED = 0; | ||
|
||
// Docker package format. | ||
DOCKER = 1; | ||
|
||
// Maven package format. | ||
MAVEN = 2; | ||
|
||
// NPM package format. | ||
NPM = 3; | ||
|
||
// APT package format. | ||
APT = 5; | ||
|
||
// YUM package format. | ||
YUM = 6; | ||
|
||
// Python package format. | ||
PYTHON = 8; | ||
} | ||
|
||
// The name of the repository, for example: | ||
// "projects/p1/locations/us-central1/repositories/repo1". | ||
string name = 1; | ||
|
||
// The format of packages that are stored in the repository. | ||
Format format = 2; | ||
|
||
// The user-provided description of the repository. | ||
string description = 3; | ||
|
||
// Labels with user-defined metadata. | ||
// This field may contain up to 64 entries. Label keys and values may be no | ||
// longer than 63 characters. Label keys must begin with a lowercase letter | ||
// and may only contain lowercase letters, numeric characters, underscores, | ||
// and dashes. | ||
map<string, string> labels = 4; | ||
|
||
// The time when the repository was created. | ||
google.protobuf.Timestamp create_time = 5; | ||
|
||
// The time when the repository was last updated. | ||
google.protobuf.Timestamp update_time = 6; | ||
|
||
// The Cloud KMS resource name of the customer managed encryption key that’s | ||
// used to encrypt the contents of the Repository. Has the form: | ||
// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. | ||
// This value may not be changed after the Repository has been created. | ||
string kms_key_name = 8; | ||
} | ||
|
||
// The request to list repositories. | ||
message ListRepositoriesRequest { | ||
// Required. The name of the parent resource whose repositories will be listed. | ||
string parent = 1 [ | ||
(google.api.field_behavior) = REQUIRED, | ||
(google.api.resource_reference) = { | ||
child_type: "artifactregistry.googleapis.com/Repository" | ||
} | ||
]; | ||
|
||
// The maximum number of repositories to return. | ||
int32 page_size = 2; | ||
|
||
// The next_page_token value returned from a previous list request, if any. | ||
string page_token = 3; | ||
} | ||
|
||
// The response from listing repositories. | ||
message ListRepositoriesResponse { | ||
// The repositories returned. | ||
repeated Repository repositories = 1; | ||
|
||
// The token to retrieve the next page of repositories, or empty if there are | ||
// no more repositories to return. | ||
string next_page_token = 2; | ||
} | ||
|
||
// The request to retrieve a repository. | ||
message GetRepositoryRequest { | ||
// Required. The name of the repository to retrieve. | ||
string name = 1 [ | ||
(google.api.field_behavior) = REQUIRED, | ||
(google.api.resource_reference) = { | ||
child_type: "artifactregistry.googleapis.com/Repository" | ||
} | ||
]; | ||
} |
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,75 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// 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 google.devtools.artifactregistry.v1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/api/client.proto"; | ||
import "google/devtools/artifactregistry/v1/artifact.proto"; | ||
import "google/devtools/artifactregistry/v1/repository.proto"; | ||
import "google/iam/v1/policy.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; | ||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ServiceProto"; | ||
option java_package = "com.google.devtools.artifactregistry.v1"; | ||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; | ||
option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; | ||
|
||
// The Artifact Registry API service. | ||
// | ||
// Artifact Registry is an artifact management system for storing artifacts | ||
// from different package management systems. | ||
// | ||
// The resources managed by this API are: | ||
// | ||
// * Repositories, which group packages and their data. | ||
// * Packages, which group versions and their tags. | ||
// * Versions, which are specific forms of a package. | ||
// * Tags, which represent alternative names for versions. | ||
// * Files, which contain content and are optionally associated with a Package | ||
// or Version. | ||
service ArtifactRegistry { | ||
option (google.api.default_host) = "artifactregistry.googleapis.com"; | ||
option (google.api.oauth_scopes) = | ||
"https://www.googleapis.com/auth/cloud-platform," | ||
"https://www.googleapis.com/auth/cloud-platform.read-only"; | ||
|
||
// Lists docker images. | ||
rpc ListDockerImages(ListDockerImagesRequest) returns (ListDockerImagesResponse) { | ||
option (google.api.http) = { | ||
get: "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" | ||
}; | ||
option (google.api.method_signature) = "parent"; | ||
} | ||
|
||
// Lists repositories. | ||
rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { | ||
option (google.api.http) = { | ||
get: "/v1/{parent=projects/*/locations/*}/repositories" | ||
}; | ||
option (google.api.method_signature) = "parent"; | ||
} | ||
|
||
// Gets a repository. | ||
rpc GetRepository(GetRepositoryRequest) returns (Repository) { | ||
option (google.api.http) = { | ||
get: "/v1/{name=projects/*/locations/*/repositories/*}" | ||
}; | ||
option (google.api.method_signature) = "name"; | ||
} | ||
} |
Oops, something went wrong.