mirror of
https://github.com/kopia/kopia.git
synced 2026-01-24 22:38:00 -05:00
* build(deps): upgraded linter to v1.55.2, fixed warnings * removed unsafe hacks with better equivalents * test fixes
18 lines
523 B
Go
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)
|
|
}
|