(ctx context.Context, key string)
| 496 | } |
| 497 | |
| 498 | func (s *ObjectTokenStore) deleteObject(ctx context.Context, key string) error { |
| 499 | fullKey := s.prefixedKey(key) |
| 500 | err := s.client.RemoveObject(ctx, s.cfg.Bucket, fullKey, minio.RemoveObjectOptions{}) |
| 501 | if err != nil { |
| 502 | if isObjectNotFound(err) { |
| 503 | return nil |
| 504 | } |
| 505 | return fmt.Errorf("object store: delete object %s: %w", fullKey, err) |
| 506 | } |
| 507 | return nil |
| 508 | } |
| 509 | |
| 510 | func (s *ObjectTokenStore) prefixedKey(key string) string { |
| 511 | key = strings.TrimLeft(key, "/") |
no test coverage detected