Skip to content

Commit

Permalink
feat: add tag creation endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jvallesm committed Mar 25, 2024
1 parent f450709 commit ab738c8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions artifact/artifact/v1alpha/artifact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,23 @@ message ListRepositoryTagsResponse {
// The requested page offset.
int32 page = 4;
}

// CreateRepositoryTagRequest represents a request to add a tag to a given
// repository.
message CreateRepositoryTagRequest {
// The tag information.
RepositoryTag tag = 1;
// The repository holding the different versions of a given content.
// - Format: `repositories/{repository.id}`.
// - Example: `repository/flaming-wombat/llama-2-7b`.
string parent = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {type: "api.instill.tech/Repository"}
];
}

// CreateRepositoryTagResponse contains the created tag.
message CreateRepositoryTagResponse {
// The created tag.
RepositoryTag tag = 1;
}
10 changes: 10 additions & 0 deletions artifact/artifact/v1alpha/artifact_private_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,15 @@ service ArtifactPrivateService {
// Returns a portion of the versions that the specified repository holds.
rpc ListRepositoryTags(ListRepositoryTagsRequest) returns (ListRepositoryTagsResponse);

// Create a new repository tag.
//
// Adds a tag to a given repository. Note that this operation is only
// intended to register the information of an *already created* tag. This
// method should be called as part of the content push operation, right after
// the [PUT Manifest](https://distribution.github.io/distribution/#put-manifest) has
// succeeded. The distribution registry won't hold data such as the push time
// or the tag digest, so `artifact-backend` will hold this information locally.
rpc CreateRepositoryTag(CreateRepositoryTagRequest) returns (CreateRepositoryTagResponse);

option (google.api.api_visibility).restriction = "INTERNAL";
}

0 comments on commit ab738c8

Please sign in to comment.