Documentation ¶
Index ¶
Constants ¶
View Source
const ( NoneKey = "" CompressionFormatGZipKey = "gzip" CompressionFormatParallelGZipKey = "parallelgzip" CompressionFormatLZ4Key = "lz4" CompressionFormatZStandardKey = "zstandard" CompressionFormatBrotliKey = "brotli" CompressionFormatBzip2Key = "bzip2" CompressionFormatBzip2ParallelKey = "parallelbzip2" EncryptionFormatAgeKey = "age" EncryptionFormatPGPKey = "pgp" SignatureFormatMinisignKey = "minisign" SignatureFormatPGPKey = "pgp" CompressionLevelFastestKey = "fastest" CompressionLevelBalancedKey = "balanced" CompressionLevelSmallestKey = "smallest" HeaderEventTypeArchive = "archive" HeaderEventTypeDelete = "delete" HeaderEventTypeMove = "move" HeaderEventTypeRestore = "restore" HeaderEventTypeUpdate = "update" FileSystemNameSTFS = "STFS" FileSystemCacheTypeMemory = "memory" FileSystemCacheTypeDir = "dir" WriteCacheTypeMemory = "memory" WriteCacheTypeFile = "file" MagneticTapeBlockSize = 512 )
Variables ¶
View Source
var ( KnownCompressionLevels = []string{CompressionLevelFastestKey, CompressionLevelBalancedKey, CompressionLevelSmallestKey} KnownCompressionFormats = []string{NoneKey, CompressionFormatGZipKey, CompressionFormatParallelGZipKey, CompressionFormatLZ4Key, CompressionFormatZStandardKey, CompressionFormatBrotliKey, CompressionFormatBzip2Key, CompressionFormatBzip2ParallelKey} KnownEncryptionFormats = []string{NoneKey, EncryptionFormatAgeKey, EncryptionFormatPGPKey} KnownSignatureFormats = []string{NoneKey, SignatureFormatMinisignKey, SignatureFormatPGPKey} KnownFileSystemCacheTypes = []string{NoneKey, FileSystemCacheTypeMemory, FileSystemCacheTypeDir} KnownWriteCacheTypes = []string{WriteCacheTypeMemory, WriteCacheTypeFile} )
View Source
var ( ErrEncryptionFormatUnknown = errors.New("encryption format unknown") ErrSignatureFormatUnknown = errors.New("signature format unknown") ErrCompressionFormatUnknown = errors.New("compression format unknown") ErrEncryptionFormatUnsupported = errors.New("encryption format unsupported") ErrSignatureFormatUnsupported = errors.New("signature format unsupported") ErrCompressionFormatUnsupported = errors.New("compression format unsupported") ErrSignatureFormatRegularOnly = errors.New("signature format only supports regular files, not tape drives") ErrSignatureInvalid = errors.New("signature invalid") ErrSignatureMissing = errors.New("signature missing") ErrCompressionFormatRegularOnly = errors.New("compression format only supports regular files, not tape drives") ErrCompressionFormatRequiresLargerRecordSize = errors.New("compression format requires larger record size") ErrCompressionLevelUnsupported = errors.New("compression level unsupported") ErrCompressionLevelUnknown = errors.New("compression level unknown") ErrIdentityUnparsable = errors.New("identity could not be parsed") ErrRecipientUnparsable = errors.New("recipient could not be parsed") ErrKeygenFormatUnsupported = errors.New("key generation for format unsupported") ErrTarHeaderMissing = errors.New("tar header missing") ErrTarHeaderEmbeddedMissing = errors.New("embedded tar header missing") ErrTapeDrivesUnsupported = errors.New("system unsupported for tape drives") ErrSTFSVersionUnsupported = errors.New("STFS version unsupported") ErrSTFSActionUnsupported = errors.New("STFS action unsupported") ErrNotImplemented = errors.New("not implemented") ErrIsDirectory = errors.New("is a directory") ErrIsFile = errors.New("is a file") 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") ErrNoRootDirectory = errors.New("root directory could not be found") ErrDirectoryNotEmpty = errors.New("directory not empty") )
Functions ¶
This section is empty.
Types ¶
type BackendConfig ¶
type BackendConfig struct { GetWriter func() (DriveWriterConfig, error) CloseWriter func() error GetReader func() (DriveReaderConfig, error) CloseReader func() error MagneticTapeIO MagneticTapeIO }
type CryptoConfig ¶
type CryptoConfig struct { Recipient interface{} Identity interface{} Password string }
type DriveReaderConfig ¶
type DriveReaderConfig struct { Drive ReadSeekFder DriveIsRegular bool }
type DriveWriterConfig ¶
type FileConfig ¶
type Header ¶
type Header struct { Record int64 Lastknownrecord int64 Block int64 Lastknownblock int64 Deleted int64 Typeflag int64 Name string Linkname string Size int64 Mode int64 UID int64 Gid int64 Uname string Gname string Modtime time.Time Accesstime time.Time Changetime time.Time Devmajor int64 Devminor int64 Paxrecords string Format int64 }
type HeaderEvent ¶
type MagneticTapeIO ¶
type MetadataConfig ¶
type MetadataConfig struct {
Metadata MetadataPersister
}
type MetadataPersister ¶
type MetadataPersister interface { UpsertHeader(ctx context.Context, dbhdr *Header, initializing bool) error UpdateHeaderMetadata(ctx context.Context, dbhdr *Header) error MoveHeader(ctx context.Context, oldName string, newName string, lastknownrecord, lastknownblock int64) error GetHeaders(ctx context.Context) ([]*Header, error) GetHeader(ctx context.Context, name string) (*Header, error) GetHeaderByLinkname(ctx context.Context, linkname string) (*Header, error) GetHeaderChildren(ctx context.Context, name string) ([]*Header, error) GetRootPath(ctx context.Context) (string, error) GetHeaderDirectChildren(ctx context.Context, name string, limit int) ([]*Header, error) DeleteHeader(ctx context.Context, name string, lastknownrecord, lastknownblock int64) (*Header, error) GetLastIndexedRecordAndBlock(ctx context.Context, recordSize int) (int64, int64, error) PurgeAllHeaders(ctx context.Context) error }
type PasswordConfig ¶
type PasswordConfig struct {
Password string
}
type PipeConfig ¶
type ReadSeekFder ¶
type ReadSeekFder interface { io.ReadSeeker Fd() uintptr }
Click to show internal directories.
Click to hide internal directories.