(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo)
| 153 | } |
| 154 | |
| 155 | func (rw *Azure) Delete(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo) error { |
| 156 | keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix) |
| 157 | |
| 158 | blobClient, err := getBlobClient(ctx, rw.cfg, backend.ObjectFileName(keypath, name)) |
| 159 | if err != nil { |
| 160 | return fmt.Errorf("cannot get Azure blob client, name: %s: %w", backend.ObjectFileName(keypath, name), err) |
| 161 | } |
| 162 | |
| 163 | snapshotType := blob.DeleteSnapshotsOptionTypeInclude |
| 164 | if _, err = blobClient.Delete(ctx, &blob.DeleteOptions{DeleteSnapshots: &snapshotType}); err != nil { |
| 165 | return readError(err) |
| 166 | } |
| 167 | return nil |
| 168 | } |
| 169 | |
| 170 | // List implements backend.Reader |
| 171 | func (rw *Azure) List(ctx context.Context, keypath backend.KeyPath) ([]string, error) { |
no test coverage detected