Files
kopia/internal/blobtesting/storage.go
Jarek Kowalski a8e4d50600 build(deps): upgraded linter to v1.55.2, fixed warnings (#3611)
* build(deps): upgraded linter to v1.55.2, fixed warnings

* removed unsafe hacks with better equivalents

* test fixes
2024-02-02 23:34:34 -08:00

18 lines
523 B
Go

package blobtesting
import (
"context"
"time"
"github.com/kopia/kopia/repo/blob"
)
// RetentionStorage allows for better testing of retention and object
// locking-related code by allowing callers to get the retention parameters of
// the blob and attempt "modifying" the blob with TouchBlob.
type RetentionStorage interface {
blob.Storage
TouchBlob(ctx context.Context, id blob.ID, threshold time.Duration) (time.Time, error)
GetRetention(ctx context.Context, id blob.ID) (blob.RetentionMode, time.Time, error)
}