Skip to content

Commit

Permalink
feat(artifact): add move file method
Browse files Browse the repository at this point in the history
  • Loading branch information
Yougigun committed Dec 6, 2024
1 parent b841ae2 commit ac57abf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions artifact/artifact/v1alpha/artifact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -637,3 +637,21 @@ message ListCatalogRunsRequest {
// Format: `order_by=id` or `order_by=create_time desc`, default is `asc`.
optional string order_by = 7 [(google.api.field_behavior) = OPTIONAL];
}

// MoveFileToCatalogRequest represents a request to move a file to another catalog.
message MoveFileToCatalogRequest {
// The file uid.
string file_uid = 1 [(google.api.field_behavior) = REQUIRED];
// namespace id
string namespace_id = 2 [(google.api.field_behavior) = REQUIRED];
// The source catalog id.
string from_catalog_id = 3 [(google.api.field_behavior) = REQUIRED];
// The target catalog id.
string to_catalog_id = 4 [(google.api.field_behavior) = REQUIRED];
}

// MoveFileToCatalogResponse represents a response for moving a file to another catalog.
message MoveFileToCatalogResponse {
// The file uid.
string file_uid = 1;
}
17 changes: 17 additions & 0 deletions artifact/artifact/v1alpha/artifact_public_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,21 @@ service ArtifactPublicService {
}
};
}

// Move file to another catalog
//
// Moves a file to another catalog.
rpc MoveFileToCatalog(MoveFileToCatalogRequest) returns (MoveFileToCatalogResponse) {
option (google.api.http) = {
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/files:move"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "💾 Artifact"
extensions: {
key: "x-stage"
value: {string_value: "alpha"}
}
};
}
}

0 comments on commit ac57abf

Please sign in to comment.