mirror of
https://github.com/kopia/kopia.git
synced 2026-01-31 01:33:12 -05:00
* Add a new PutBlob option and blob error type When `DoNotRecreate` is set as true, the blob put operation should only succeed if no blob with the given blob ID already exists. Othwerwise, `ErrBlobAlreadyExists` is returned. * Validate default storage providers' support By default, storage providers should not support idempotent creates. This commit adds error handling to exit early if `DoNotRecreate` is set to true. The commit also verifies this behavior in the provider validation test. * Implement support for new option in GCS storage * Push PutBlob option handling down to Impl When PutBlob options were introduced, error handling logic for them was implemented for the Sharded storage interface. However, the behavior of different providers that implement Sharded can be different, so it's better to push the options down to be processed in the provider implementations. * Introduce new error type for unsupported put opts To unify error handling code and make it more maintainable, introduce a new error type `blob.ErrUnsupportedPutBlobOption`, which is to be returned whenever a storage provider implementation is given put options it does not support.