Improve haddocks of top-level modules (#127)

This commit is contained in:
Aditya Manthramurthy 2019-07-09 13:32:10 -07:00 committed by GitHub
parent cc930975c9
commit 8b908ceeed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 50 deletions

View File

@ -20,13 +20,17 @@
-- License: Apache 2.0 -- License: Apache 2.0
-- Maintainer: MinIO Dev Team <dev@min.io> -- Maintainer: MinIO Dev Team <dev@min.io>
-- --
-- Types and functions to access S3 compatible object storage servers -- Types and functions to conveniently access S3 compatible object
-- like MinIO. -- storage servers like MinIO.
module Network.Minio module Network.Minio
( (
-- * Credentials -- * Credentials
Credentials (..) Credentials (..)
-- ** Credential providers
-- | Run actions that retrieve 'Credentials' from the environment or
-- files or other custom sources.
, Provider , Provider
, fromAWSConfigFile , fromAWSConfigFile
, fromAWSEnv , fromAWSEnv
@ -34,7 +38,6 @@ module Network.Minio
, findFirst , findFirst
-- * Connecting to object storage -- * Connecting to object storage
---------------------------------
, ConnectInfo , ConnectInfo
, setRegion , setRegion
, setCreds , setCreds
@ -45,26 +48,23 @@ module Network.Minio
, mkMinioConn , mkMinioConn
-- ** Connection helpers -- ** Connection helpers
------------------------ -- | These are helpers to construct 'ConnectInfo' values for common
-- cases.
, minioPlayCI , minioPlayCI
, awsCI , awsCI
, gcsCI , gcsCI
-- * Minio Monad -- * Minio Monad
---------------- ----------------
-- | The Minio Monad provides connection-reuse, bucket-location -- | The Minio Monad provides connection-reuse, bucket-location
-- caching, resource management and simpler error handling -- caching, resource management and simpler error handling
-- functionality. All actions on object storage are performed within -- functionality. All actions on object storage are performed within
-- this Monad. -- this Monad.
, Minio , Minio
, runMinioWith , runMinioWith
, runMinio , runMinio
-- * Bucket Operations -- * Bucket Operations
----------------------
-- ** Creation, removal and querying -- ** Creation, removal and querying
, Bucket , Bucket
@ -74,11 +74,15 @@ module Network.Minio
, Region , Region
, getLocation , getLocation
-- ** Listing -- ** Listing buckets
, BucketInfo(..) , BucketInfo(..)
, listBuckets , listBuckets
-- ** Object info type represents object metadata information. -- ** Listing objects
, listObjects
, listObjectsV1
, ListItem(..)
, ObjectInfo , ObjectInfo
, oiObject , oiObject
, oiModTime , oiModTime
@ -86,17 +90,17 @@ module Network.Minio
, oiSize , oiSize
, oiMetadata , oiMetadata
, ListItem(..) -- ** Listing incomplete uploads
, listObjects , listIncompleteUploads
, listObjectsV1
, UploadId , UploadId
, UploadInfo(..) , UploadInfo(..)
, listIncompleteUploads
, ObjectPartInfo(..)
, listIncompleteParts , listIncompleteParts
, ObjectPartInfo(..)
-- ** Bucket Notifications -- ** Bucket Notifications
, getBucketNotification
, putBucketNotification
, removeAllBucketNotification
, Notification(..) , Notification(..)
, defaultNotification , defaultNotification
, NotificationConfig(..) , NotificationConfig(..)
@ -109,15 +113,11 @@ module Network.Minio
, FilterRules(..) , FilterRules(..)
, defaultFilterRules , defaultFilterRules
, FilterRule(..) , FilterRule(..)
, getBucketNotification
, putBucketNotification
, removeAllBucketNotification
-- * Object Operations -- * Object Operations
----------------------
, Object , Object
-- ** File operations -- ** File-based operations
, fGetObject , fGetObject
, fPutObject , fPutObject
@ -145,7 +145,7 @@ module Network.Minio
, gooIfUnmodifiedSince , gooIfUnmodifiedSince
, gooSSECKey , gooSSECKey
-- ** Server-side copying -- ** Server-side object copying
, copyObject , copyObject
, SourceInfo , SourceInfo
, defaultSourceInfo , defaultSourceInfo
@ -161,38 +161,38 @@ module Network.Minio
, dstBucket , dstBucket
, dstObject , dstObject
-- ** Querying -- ** Querying object info
, statObject , statObject
-- ** Object removal functions -- ** Object removal operations
, removeObject , removeObject
, removeIncompleteUpload , removeIncompleteUpload
-- ** Select Object Content with SQL -- ** Select Object Content with SQL
, module Network.Minio.SelectAPI , module Network.Minio.SelectAPI
-- * Server-Size Encryption Helpers -- * Server-Side Encryption Helpers
-----------------------------------
, SSECKey
, mkSSECKey , mkSSECKey
, SSECKey
, SSE(..) , SSE(..)
-- * Presigned Operations -- * Presigned Operations
-------------------------
, UrlExpiry
, presignedPutObjectUrl , presignedPutObjectUrl
, presignedGetObjectUrl , presignedGetObjectUrl
, presignedHeadObjectUrl , presignedHeadObjectUrl
, UrlExpiry
-- ** Utilities for POST (browser) uploads -- ** POST (browser) upload helpers
, PostPolicy -- | Please see
, PostPolicyError(..) -- https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html
-- for detailed information.
, newPostPolicy , newPostPolicy
, presignedPostPolicy , presignedPostPolicy
, showPostPolicy , showPostPolicy
, PostPolicy
, PostPolicyError(..)
-- *** Utilities to specify Post Policy conditions -- *** Post Policy condition helpers
, PostPolicyCondition , PostPolicyCondition
, ppCondBucket , ppCondBucket
, ppCondContentLengthRange , ppCondContentLengthRange
@ -202,9 +202,8 @@ module Network.Minio
, ppCondSuccessActionStatus , ppCondSuccessActionStatus
-- * Error handling -- * Error handling
----------------------- -- | Data types representing various errors that may occur while
-- | Data types representing various errors that may occur while working -- working with an object storage service.
-- with an object storage service.
, MinioErr(..) , MinioErr(..)
, MErrV(..) , MErrV(..)
, ServiceErr(..) , ServiceErr(..)

View File

@ -127,7 +127,8 @@ data Credentials = Credentials { cAccessKey :: Text
, cSecretKey :: Text , cSecretKey :: Text
} deriving (Eq, Show) } deriving (Eq, Show)
-- | A Provider is an action that may return Credentials -- | A Provider is an action that may return Credentials. Providers
-- may be chained together using 'findFirst'.
type Provider = IO (Maybe Credentials) type Provider = IO (Maybe Credentials)
-- | Combines the given list of providers, by calling each one in -- | Combines the given list of providers, by calling each one in
@ -213,16 +214,18 @@ getHostAddr ci = if | port == 80 || port == 443 -> toS host
host = connectHost ci host = connectHost ci
-- | Default GCS ConnectInfo. Works only for "Simple Migration" -- | Default Google Compute Storage ConnectInfo. Works only for
-- use-case with interoperability mode enabled on GCP console. For -- "Simple Migration" use-case with interoperability mode enabled on
-- more information - https://cloud.google.com/storage/docs/migrating -- GCP console. For more information -
-- https://cloud.google.com/storage/docs/migrating
--
-- Credentials should be supplied before use. -- Credentials should be supplied before use.
gcsCI :: ConnectInfo gcsCI :: ConnectInfo
gcsCI = setRegion "us" gcsCI = setRegion "us"
"https://storage.googleapis.com" "https://storage.googleapis.com"
-- | Default AWS ConnectInfo. Connects to "us-east-1". Credentials -- | Default AWS S3 ConnectInfo. Connects to "us-east-1". Credentials
-- should be supplied before use. -- should be supplied before use.
awsCI :: ConnectInfo awsCI :: ConnectInfo
awsCI = "https://s3.amazonaws.com" awsCI = "https://s3.amazonaws.com"
@ -244,9 +247,7 @@ type Bucket = Text
-- Represents an object name -- Represents an object name
type Object = Text type Object = Text
-- | -- | Represents a region
-- Represents a region
-- TODO: This could be a Sum Type with all defined regions for AWS.
type Region = Text type Region = Text
-- | A type alias to represent an Entity-Tag returned by S3-compatible APIs. -- | A type alias to represent an Entity-Tag returned by S3-compatible APIs.

View File

@ -29,7 +29,6 @@ module Network.Minio.SelectAPI
, selectRequest , selectRequest
-- *** Input Serialization -- *** Input Serialization
-------------------------
, InputSerialization , InputSerialization
, defaultCsvInput , defaultCsvInput
@ -42,7 +41,7 @@ module Network.Minio.SelectAPI
, setInputCompressionType , setInputCompressionType
-- *** CSV Format details -- *** CSV Format details
------------------------
-- | CSV format options such as delimiters and quote characters are -- | CSV format options such as delimiters and quote characters are
-- specified using using the functions below. Options are combined -- specified using using the functions below. Options are combined
-- monoidally. -- monoidally.
@ -60,7 +59,6 @@ module Network.Minio.SelectAPI
, quoteFields , quoteFields
-- *** Output Serialization -- *** Output Serialization
-------------------------
, OutputSerialization , OutputSerialization
, defaultCsvOutput , defaultCsvOutput
@ -69,12 +67,11 @@ module Network.Minio.SelectAPI
, outputJSONFromRecordDelimiter , outputJSONFromRecordDelimiter
-- *** Progress messages -- *** Progress messages
------------------------
, setRequestProgressEnabled , setRequestProgressEnabled
-- *** Interpreting Select output -- *** Interpreting Select output
--------------------------------------------
-- | The conduit returned by `selectObjectContent` returns values of -- | The conduit returned by `selectObjectContent` returns values of
-- the `EventMessage` data type. This returns the query output -- the `EventMessage` data type. This returns the query output
-- messages formatted according to the chosen output serialization, -- messages formatted according to the chosen output serialization,