Skip to content

Commit

Permalink
perf: hide GetObjectResumableUploadOffset interface
Browse files Browse the repository at this point in the history
  • Loading branch information
constwz committed Jan 24, 2024
1 parent fcbe7c4 commit 47d3636
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/api_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type IObjectClient interface {
ComputeHashRoots(reader io.Reader, isSerial bool) ([][]byte, int64, storageTypes.RedundancyType, error)
CreateFolder(ctx context.Context, bucketName, objectName string, opts types.CreateObjectOptions) (string, error)
GetObjectUploadProgress(ctx context.Context, bucketName, objectName string) (string, error)
GetObjectResumableUploadOffset(ctx context.Context, bucketName, objectName string) (uint64, error)
//GetObjectResumableUploadOffset(ctx context.Context, bucketName, objectName string) (uint64, error)
ListObjectsByObjectID(ctx context.Context, objectIds []uint64, opts types.EndPointOptions) (types.ListObjectsByObjectIDResponse, error)
ListObjectPolicies(ctx context.Context, objectName, bucketName string, actionType uint32, opts types.ListObjectPoliciesOptions) (types.ListObjectPoliciesResponse, error)
}
Expand Down Expand Up @@ -319,7 +319,7 @@ func (c *Client) putObjectResumable(ctx context.Context, bucketName, objectName
return err
}

offset, err := c.GetObjectResumableUploadOffset(ctx, bucketName, objectName)
offset, err := c.getObjectResumableUploadOffset(ctx, bucketName, objectName)
if err != nil {
return err
}
Expand Down Expand Up @@ -1069,8 +1069,8 @@ func (c *Client) GetObjectUploadProgress(ctx context.Context, bucketName, object
return status.ObjectInfo.ObjectStatus.String(), nil
}

// GetObjectResumableUploadOffset return the status of object including the uploading progress
func (c *Client) GetObjectResumableUploadOffset(ctx context.Context, bucketName, objectName string) (uint64, error) {
// getObjectResumableUploadOffset return the status of object including the uploading progress
func (c *Client) getObjectResumableUploadOffset(ctx context.Context, bucketName, objectName string) (uint64, error) {
status, err := c.HeadObject(ctx, bucketName, objectName)
if err != nil {
return 0, err
Expand Down

0 comments on commit 47d3636

Please sign in to comment.