dox_storage library
File storage for dox: local disk, S3 and S3-compatible services.
Classes
- AwsCredentials
- AWS access keys.
- Clock
- Gives the current time. Inject a fixed clock in tests.
- Disk
- The public API for one storage disk.
- DriveDirectory
- A folder in a listing.
- DriveEntry
- One entry in a listing: a file or a folder.
- DriveFile
- A file in a listing.
- DriveManager
- Holds named disks and picks the right one.
- DriverContract
- The interface every storage driver implements.
- FixedClock
- A clock that always returns the same time. Useful in tests.
- KeyEncoder
- Builds URL paths from keys.
- KeyNormalizer
- Cleans file keys and blocks unsafe ones.
- ListOptions
- Options for listing files.
- ListResult
- One page of a listing.
- LocalDriver
- Stores files in a folder on the local disk.
- LocalDriverConfig
- Settings for LocalDriver.
- LocalUrlSigner
- Signs and checks local file URLs with HMAC-SHA256 and an app key.
- MemoryDriver
- Keeps files in a map. Use it as a fake in tests.
- ObjectMetaData
- Facts about a stored file.
- S3Client
- Builds, signs and sends S3 requests. Maps S3 errors to storage errors.
- S3Driver
- Stores files in AWS S3 or an S3-compatible service.
- S3DriverConfig
- Settings for S3Driver.
- SignedUrlOptions
- Options for signed URLs.
- SigV4Signer
- AWS Signature Version 4 for S3.
- StorageConstants
- Global constants for dox_storage.
- WriteOptions
- Options for writing a file.
Enums
- Visibility
- Who can read a file through its public URL.
Exceptions / Errors
- DriverException
- Any other driver failure (network error, S3 500, disk full, ...).
- FileNotFoundException
- The file does not exist.
- InvalidKeyException
-
The key is not safe, for example it uses
..or an absolute path. - PermissionDeniedException
- The driver is not allowed to do this (file system permissions, S3 403).
- StorageException
- Base class for every error thrown by dox_storage.
- UnsupportedOperationException
- The driver does not support this operation.