Versions in this module Expand all Collapse all v0 v0.1.0 Oct 21, 2024 Changes in this version + var ErrorBadBase32Encoding = errors.New("bad base32 filename encoding") + var ErrorBadDecryptControlChar = errors.New("bad decryption - contains control chars") + var ErrorBadDecryptUTF8 = errors.New("bad decryption - utf-8 invalid") + var ErrorBadSeek = errors.New("Seek beyond end of file") + var ErrorEncryptedBadBlock = errors.New("failed to authenticate decrypted block - bad password?") + var ErrorEncryptedBadMagic = errors.New("not an encrypted file - bad magic string") + var ErrorEncryptedFileBadHeader = errors.New("file has truncated block header") + var ErrorEncryptedFileTooShort = errors.New("file is too short to be encrypted") + var ErrorFileClosed = errors.New("file already closed") + var ErrorNotAMultipleOfBlocksize = errors.New("not a multiple of blocksize") + var ErrorNotAnEncryptedFile = errors.New("not an encrypted file - does not match suffix") + var ErrorSuffixMissingDot = errors.New("suffix config setting should include a '.'") + var ErrorTooLongAfterDecode = errors.New("too long after base32 decode") + var ErrorTooShortAfterDecode = errors.New("too short after base32 decode") + func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs, error) + func NewNameEncoding(s string) (enc fileNameEncoding, err error) + type Cipher struct + func NewCipher(m configmap.Mapper) (*Cipher, error) + func (c *Cipher) DecryptData(rc io.ReadCloser) (io.ReadCloser, error) + func (c *Cipher) DecryptDataSeek(ctx context.Context, open OpenRangeSeek, offset, limit int64) (ReadSeekCloser, error) + func (c *Cipher) DecryptDirName(in string) (string, error) + func (c *Cipher) DecryptFileName(in string) (string, error) + func (c *Cipher) DecryptedSize(size int64) (int64, error) + func (c *Cipher) EncryptData(in io.Reader) (io.Reader, error) + func (c *Cipher) EncryptDirName(in string) string + func (c *Cipher) EncryptFileName(in string) string + func (c *Cipher) EncryptedSize(size int64) int64 + func (c *Cipher) Key(password, salt string) (err error) + func (c *Cipher) NameEncryptionMode() NameEncryptionMode + type Fs struct + func (f *Fs) About(ctx context.Context) (*fs.Usage, error) + func (f *Fs) ChangeNotify(ctx context.Context, notifyFunc func(string, fs.EntryType), ...) + func (f *Fs) CleanUp(ctx context.Context) error + func (f *Fs) Command(ctx context.Context, name string, arg []string, opt map[string]string) (out interface{}, err error) + func (f *Fs) ComputeHash(ctx context.Context, o *Object, src fs.Object, hashType hash.Type) (hashStr string, err error) + func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object, error) + func (f *Fs) DecryptFileName(encryptedFileName string) (string, error) + func (f *Fs) DirCacheFlush() + func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string) error + func (f *Fs) DirSetModTime(ctx context.Context, dir string, modTime time.Time) error + func (f *Fs) Disconnect(ctx context.Context) error + func (f *Fs) EncryptFileName(fileName string) string + func (f *Fs) Features() *fs.Features + func (f *Fs) Hashes() hash.Set + func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) + func (f *Fs) ListR(ctx context.Context, dir string, callback fs.ListRCallback) (err error) + func (f *Fs) MergeDirs(ctx context.Context, dirs []fs.Directory) error + func (f *Fs) Mkdir(ctx context.Context, dir string) error + func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata) (fs.Directory, error) + func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object, error) + func (f *Fs) Name() string + func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) + func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration, unlink bool) (string, error) + func (f *Fs) Purge(ctx context.Context, dir string) error + func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) + func (f *Fs) PutStream(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) + func (f *Fs) PutUnchecked(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) + func (f *Fs) Rmdir(ctx context.Context, dir string) error + func (f *Fs) Root() string + func (f *Fs) SetWrapper(wrapper fs.Fs) + func (f *Fs) Shutdown(ctx context.Context) error + func (f *Fs) String() string + func (f *Fs) UnWrap() fs.Fs + func (f *Fs) UserInfo(ctx context.Context) (map[string]string, error) + func (f *Fs) WrapFs() fs.Fs + type NameEncryptionMode int + const NameEncryptionObfuscated + const NameEncryptionOff + const NameEncryptionStandard + func NewNameEncryptionMode(s string) (mode NameEncryptionMode, err error) + func (mode NameEncryptionMode) String() (out string) + type Object struct + func (o *Object) Fs() fs.Info + func (o *Object) GetTier() string + func (o *Object) Hash(ctx context.Context, ht hash.Type) (string, error) + func (o *Object) ID() string + func (o *Object) Metadata(ctx context.Context) (fs.Metadata, error) + func (o *Object) MimeType(ctx context.Context) string + func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (rc io.ReadCloser, err error) + func (o *Object) Remote() string + func (o *Object) SetMetadata(ctx context.Context, metadata fs.Metadata) error + func (o *Object) SetTier(tier string) error + func (o *Object) Size() int64 + func (o *Object) String() string + func (o *Object) UnWrap() fs.Object + func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error + type ObjectInfo struct + func (o *ObjectInfo) Fs() fs.Info + func (o *ObjectInfo) GetTier() string + func (o *ObjectInfo) Hash(ctx context.Context, hash hash.Type) (string, error) + func (o *ObjectInfo) ID() string + func (o *ObjectInfo) Metadata(ctx context.Context) (fs.Metadata, error) + func (o *ObjectInfo) MimeType(ctx context.Context) string + func (o *ObjectInfo) Remote() string + func (o *ObjectInfo) Size() int64 + func (o *ObjectInfo) UnWrap() fs.Object + type OpenRangeSeek func(ctx context.Context, offset, limit int64) (io.ReadCloser, error) + type Options struct + DirectoryNameEncryption bool + FilenameEncoding string + FilenameEncryption string + NoDataEncryption bool + PassBadBlocks bool + Password string + Password2 string + Remote string + ServerSideAcrossConfigs bool + ShowMapping bool + StrictNames bool + Suffix string + type ReadSeekCloser interface