return etag
This commit is contained in:
parent
d1542b274e
commit
bc6621154b
6 changed files with 34 additions and 12 deletions
|
|
@ -42,3 +42,11 @@ func (s *Service) Get(ctx context.Context, bucket, object string, expires time.D
|
|||
func (s *Service) Delete(ctx context.Context, bucket, object string) error {
|
||||
return s.client.RemoveObject(ctx, bucket, object, minio.RemoveObjectOptions{})
|
||||
}
|
||||
|
||||
func (s *Service) GetObjectEtag(ctx context.Context, bucketName, object string) (string, error) {
|
||||
info, err := s.client.StatObject(ctx, bucketName, object, minio.StatObjectOptions{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return info.ETag, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue