refactor: Use explicit reader/writer instead of filepath for drive
This commit is contained in:
+25
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user