Skip to content

Commit

Permalink
feat(blob): add get object method (#496)
Browse files Browse the repository at this point in the history
Because 

another service needs to get the info of the object stored in the blob, 

Commit 

adds the get object method

---------

Co-authored-by: droplet-bot <[email protected]>
  • Loading branch information
Yougigun and droplet-bot authored Oct 24, 2024
1 parent 7cdbe18 commit d74fca2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
15 changes: 14 additions & 1 deletion artifact/artifact/v1alpha/artifact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

package artifact.artifact.v1alpha;

import "artifact/artifact/v1alpha/object.proto";
import "common/healthcheck/v1beta/healthcheck.proto";
import "common/run/v1alpha/run.proto";
// Google API
Expand Down Expand Up @@ -187,6 +188,18 @@ message ObjectURL {
optional google.protobuf.Timestamp delete_time = 10;
}

// GetObjectRequest
message GetObjectRequest {
// object uid
string uid = 1;
}

// GetObjectResponse
message GetObjectResponse {
// object
Object object = 1;
}

// GetObjectURLRequest
message GetObjectURLRequest {
// object url uid
Expand All @@ -195,7 +208,7 @@ message GetObjectURLRequest {

// GetObjectURLResponse
message GetObjectURLResponse {
// object upload url
// object url
ObjectURL object_url = 1;
}

Expand Down
5 changes: 4 additions & 1 deletion artifact/artifact/v1alpha/artifact_private_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ service ArtifactPrivateService {
// Delete a repository tag.
rpc DeleteRepositoryTag(DeleteRepositoryTagRequest) returns (DeleteRepositoryTagResponse);

// Get Object Upload URL
// Get Object
rpc GetObject(GetObjectRequest) returns (GetObjectResponse);

// Get Object URL
rpc GetObjectURL(GetObjectURLRequest) returns (GetObjectURLResponse);
}
10 changes: 9 additions & 1 deletion openapiv2/artifact/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1215,11 +1215,19 @@ definitions:
allOf:
- $ref: '#/definitions/v1alphaObject'
title: GetObjectDownloadURLResponse
v1alphaGetObjectResponse:
type: object
properties:
object:
title: object
allOf:
- $ref: '#/definitions/v1alphaObject'
title: GetObjectResponse
v1alphaGetObjectURLResponse:
type: object
properties:
objectUrl:
title: object upload url
title: object url
allOf:
- $ref: '#/definitions/v1alphaObjectURL'
title: GetObjectURLResponse
Expand Down

0 comments on commit d74fca2

Please sign in to comment.