(ctx context.Context, bucketName, objectName string)
| 104 | } |
| 105 | |
| 106 | func (c *S3Client) RemoveObject(ctx context.Context, bucketName, objectName string) error { |
| 107 | if bucketName == "" { |
| 108 | bucketName = c.config.BucketName |
| 109 | } |
| 110 | |
| 111 | objectName = formatObjectName(c.config.Prefix, objectName) |
| 112 | input := &s3.DeleteObjectInput{ |
| 113 | Bucket: aws.String(bucketName), |
| 114 | Key: aws.String(objectName), |
| 115 | } |
| 116 | |
| 117 | _, err := c.client.DeleteObject(input) |
| 118 | return err |
| 119 | } |
| 120 | |
| 121 | func (c *S3Client) RemoveObjectByURL(ctx context.Context, urlStr string) error { |
| 122 | prefix := c.config.Domain + "/" |
nothing calls this directly
no test coverage detected