feat: Make STFS API public
Also: Happy new year :)
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"io/fs"
|
||||
"os"
|
||||
|
||||
"github.com/pojntfx/stfs/internal/persisters"
|
||||
"github.com/pojntfx/stfs/pkg/persisters"
|
||||
)
|
||||
|
||||
type DriveReaderConfig struct {
|
||||
|
||||
@@ -26,6 +26,14 @@ const (
|
||||
HeaderEventTypeMove = "move"
|
||||
HeaderEventTypeRestore = "restore"
|
||||
HeaderEventTypeUpdate = "update"
|
||||
|
||||
FileSystemNameSTFS = "STFS"
|
||||
|
||||
FileSystemCacheTypeMemory = "memory"
|
||||
FileSystemCacheTypeDir = "dir"
|
||||
|
||||
WriteCacheTypeMemory = "memory"
|
||||
WriteCacheTypeFile = "file"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -36,4 +44,8 @@ var (
|
||||
KnownEncryptionFormats = []string{NoneKey, EncryptionFormatAgeKey, EncryptionFormatPGPKey}
|
||||
|
||||
KnownSignatureFormats = []string{NoneKey, SignatureFormatMinisignKey, SignatureFormatPGPKey}
|
||||
|
||||
KnownFileSystemCacheTypes = []string{NoneKey, FileSystemCacheTypeMemory, FileSystemCacheTypeDir}
|
||||
|
||||
KnownWriteCacheTypes = []string{WriteCacheTypeMemory, WriteCacheTypeFile}
|
||||
)
|
||||
|
||||
@@ -32,4 +32,13 @@ var (
|
||||
|
||||
ErrSTFSVersionUnsupported = errors.New("STFS version unsupported")
|
||||
ErrSTFSActionUnsupported = errors.New("STFS action unsupported")
|
||||
|
||||
ErrNotImplemented = errors.New("not implemented")
|
||||
ErrIsDirectory = errors.New("is a directory")
|
||||
|
||||
ErrFileSystemCacheTypeUnsupported = errors.New("file system cache type unsupported")
|
||||
ErrFileSystemCacheTypeUnknown = errors.New("file system cache type unknown")
|
||||
|
||||
ErrWriteCacheTypeUnsupported = errors.New("write cache type unsupported")
|
||||
ErrWriteCacheTypeUnknown = errors.New("write cache type unknown")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user