Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ConnectInfo = ConnectInfo {}
- awsCI :: ConnectInfo
- minioPlayCI :: ConnectInfo
- data Minio a
- runMinio :: ConnectInfo -> Minio a -> ResourceT IO (Either MinioErr a)
- runResourceT :: MonadBaseControl IO m => ResourceT m a -> m a
- data MinioErr
- data MErrV
- data MError
- type Bucket = Text
- type Object = Text
- data BucketInfo = BucketInfo {}
- data ObjectInfo = ObjectInfo {}
- data UploadInfo = UploadInfo {
- uiKey :: Object
- uiUploadId :: UploadId
- uiInitTime :: UTCTime
- data ListPartInfo = ListPartInfo {}
- type UploadId = Text
- data ObjectData m
- getService :: Minio [BucketInfo]
- getLocation :: Bucket -> Minio Region
- makeBucket :: Bucket -> Maybe Region -> Minio ()
- listObjects :: Bucket -> Maybe Text -> Bool -> Producer Minio ObjectInfo
- listIncompleteUploads :: Bucket -> Maybe Text -> Bool -> Producer Minio UploadInfo
- listIncompleteParts :: Bucket -> Object -> UploadId -> Producer Minio ListPartInfo
- fGetObject :: Bucket -> Object -> FilePath -> Minio ()
- fPutObject :: Bucket -> Object -> FilePath -> Minio ()
- putObjectFromSource :: Bucket -> Object -> Producer Minio ByteString -> Maybe Int64 -> Minio ()
- getObject :: Bucket -> Object -> Minio (ResumableSource Minio ByteString)
- statObject :: Bucket -> Object -> Minio ObjectInfo
Documentation
data ConnectInfo Source #
Connection Info data type. Use the Default instance to create connection info for your service.
ConnectInfo | |
|
awsCI :: ConnectInfo Source #
Default aws ConnectInfo. Credentials should be supplied before use.
minioPlayCI :: ConnectInfo Source #
Default minio play server ConnectInfo. Credentials are already filled.
runMinio :: ConnectInfo -> Minio a -> ResourceT IO (Either MinioErr a) Source #
Run the Minio action and return the result or an error.
runResourceT :: MonadBaseControl IO m => ResourceT m a -> m a #
Unwrap a ResourceT
transformer, and call all registered release actions.
Note that there is some reference counting involved due to resourceForkIO
.
If multiple threads are sharing the same collection of resources, only the
last call to runResourceT
will deallocate the resources.
Since 0.3.0
Error handling
Data types representing various errors that may occur while working with an object storage service.
Errors thrown by the library
Various validation errors
Library internal errors
Data Types
Data types representing various object store concepts.
data BucketInfo Source #
BucketInfo returned for list buckets call
data ObjectInfo Source #
Represents information about an object.
data UploadInfo Source #
Represents information about a multipart upload.
UploadInfo | |
|
data ListPartInfo Source #
Represents information about an object part in an ongoing multipart upload.
data ObjectData m Source #
A data-type to represent the source data for an object. A file-path or a producer-conduit may be provided.
For files, a size may be provided - this is useful in cases when the file size cannot be automatically determined or if only some prefix of the file is desired.
For streams also, a size may be provided. This is useful to limit
the input - if it is not provided, upload will continue until the
stream ends or the object reaches maxObjectsize
size.
Bucket Operations
getService :: Minio [BucketInfo] Source #
Fetch all buckets from the service.
makeBucket :: Bucket -> Maybe Region -> Minio () Source #
Creates a new bucket in the object store. The Region can be optionally specified. If not specified, it will use the region configured in ConnectInfo, which is by default, the US Standard Region.
listObjects :: Bucket -> Maybe Text -> Bool -> Producer Minio ObjectInfo Source #
List objects in a bucket matching the given prefix. If recurse is set to True objects matching prefix are recursively listed.
listIncompleteUploads :: Bucket -> Maybe Text -> Bool -> Producer Minio UploadInfo Source #
List incomplete uploads in a bucket matching the given prefix. If recurse is set to True incomplete uploads for the given prefix are recursively listed.
listIncompleteParts :: Bucket -> Object -> UploadId -> Producer Minio ListPartInfo Source #
List object parts of an ongoing multipart upload for given bucket, object and uploadId.
Object Operations
fGetObject :: Bucket -> Object -> FilePath -> Minio () Source #
Fetch the object and write it to the given file safely. The object is first written to a temporary file in the same directory and then moved to the given path.
fPutObject :: Bucket -> Object -> FilePath -> Minio () Source #
Upload the given file to the given object.
putObjectFromSource :: Bucket -> Object -> Producer Minio ByteString -> Maybe Int64 -> Minio () Source #
Put an object from a conduit source. The size can be provided if known; this helps the library select optimal part sizes to performing a multipart upload. If not specified, it is assumed that the object can be potentially 5TiB and selects multipart sizes appropriately.
getObject :: Bucket -> Object -> Minio (ResumableSource Minio ByteString) Source #
Get an object from the object store as a resumable source (conduit).
statObject :: Bucket -> Object -> Minio ObjectInfo Source #
Get an object's metadata from the object store.