refactor: Use explicit reader/writer instead of filepath for drive

This commit is contained in:
Felix Pojtinger
2021-12-13 00:26:30 +01:00
parent 734df25820
commit 58b407cd4f
34 changed files with 506 additions and 340 deletions
+25 -2
View File
@@ -1,7 +1,26 @@
package config
type StateConfig struct {
Drive string
import (
"io"
"os"
)
type DriveReaderConfig struct {
Drive io.ReadSeeker
DriveIsRegular bool
}
type DriveWriterConfig struct {
Drive io.Writer
DriveIsRegular bool
}
type DriveConfig struct {
Drive *os.File
DriveIsRegular bool
}
type MetadataConfig struct {
Metadata string
}
@@ -16,3 +35,7 @@ type CryptoConfig struct {
Identity interface{}
Password string
}
type PasswordConfig struct {
Password string
}