This change adds a separate config for the cleanup interval, and runs that cleanup from the main folder loop.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
package versioner
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
@@ -20,6 +21,7 @@ type Versioner interface {
|
||||
Archive(filePath string) error
|
||||
GetVersions() (map[string][]FileVersion, error)
|
||||
Restore(filePath string, versionTime time.Time) error
|
||||
Clean(context.Context) error
|
||||
}
|
||||
|
||||
type FileVersion struct {
|
||||
|
||||
Reference in New Issue
Block a user