Commit Graph

104 Commits

Author SHA1 Message Date
Aditya Manthramurthy
78a27b44bf
Add GHC 9.6 to CI and fix tests (#193)
Tests needing fixing for recent minio

Also:
- set minimum tested version to 8.10
- remove building with cabal 3.6
- update stack.yaml to add crypton-connection

Update live server test env var handling
2024-05-01 10:25:26 -07:00
Aditya Manthramurthy
45e88d813b
Enable StrictData and bump up version for release (#189)
* Enable StrictData and bump up version for release

- Types defined in Credentials.Types and Network.Minio.Data are now
strict

* ormolu fixes
2023-05-22 12:32:34 -07:00
Aditya Manthramurthy
fa62ed599a
Add support for AssumeRole STS API (#188)
This change adds support for requesting temporary object storage
credentials using the STS API. Some breaking changes are introduced to
enable this support:

- `Credentials` type has been removed. Use the `CredentialValue` type
instead. Corresponding to this the type signature for `setCreds` has
changed, though the functionality is the same.
- The type alias `Provider` has been renamed to `CredentialLoader` to
avoid naming confusion.
2023-05-03 17:52:46 -07:00
Aditya Manthramurthy
6d3925d597
Fix XML generator tests (#187)
- Differences in quoting of XML content does not impact the equality of
XML docs, so we parse generated XML docs and compare for equality.
2023-04-26 11:18:07 -07:00
Aditya Manthramurthy
f4ae55468e
Add Credentials module to use Assume Role API (#184)
This exports a new module for retrieving STS based credentials, however
they are not yet convenient to use in the library - the session token
needs to be included as a custom header and may not be possible with all
APIs.
2022-12-23 07:53:27 -08:00
Aditya Manthramurthy
d59f45fec4
Hlint fixes (#173)
* Hlint fixes

- Will require major version bump as some types were changed from data
  to newtype

* ormolu fixes after hlint
2022-05-27 14:33:05 -07:00
Aditya Manthramurthy
b91a7afd6b
Update with changes for ormolu 0.5.0.0 (#171)
- Add ormolu check to CI
2022-05-27 12:07:28 -07:00
Aditya Manthramurthy
bdac380c77
Replace protolude with relude and build with GHC 9.0.2 (#168)
- relude is a better and more commonly used library

- Add compiler warnings and fixes

- Update stack lts to 18.24

- Add explicit deriving strategies
2022-02-11 13:48:08 -08:00
Aditya Manthramurthy
c59b7066fc
Updates from new ormolu 0.4 (#167)
* Changes from formatter

* Fix github action run on master branch
2022-02-10 13:34:11 -08:00
Aditya Manthramurthy
aa2382b2e9
Use region specific endpoints for AWS S3 in presigned Urls (#164)
- Also update standard S3 endpoints

- Unify code that determines if path style or virtual style must be used for
regular and presigned requests

Fixes #160
2021-03-08 16:35:52 -08:00
Aditya Manthramurthy
b8cc1e57ee
Update formatting with latest ormolu 1.4 (#163) 2021-03-03 16:11:45 -08:00
Aditya Manthramurthy
73bc5b64a0
Fix XML generation test for S3 SELECT (#161)
- Test was failing because of non-unique ordering of CSV properties. It is fixed
by sorting the CSV properties before serialization.
2021-03-03 15:44:12 -08:00
Aditya Manthramurthy
a3538aa46c
CI: Add support for GHC 8.10, stack and live-server testing (#156)
* CI: Add support for GHC 8.10, stack and live-server testing

* Fix live-server tests for all platforms

* Fix windows tests

* Fix resourcet cleanup exceptions

* Mark minio-hs builds GHC 8.4, 8.8 on windows experimental

* Use minio with erasure code backend for tests

* Fix matrix combinations for cabal and stack

Co-authored-by: Krishnan Parthasarathi <kp@minio.io>
2020-06-24 10:35:11 -07:00
Aditya Manthramurthy
23fecbb469
Update code formatting and update dependencies (unliftio, protolude) (#152)
* Format code with ormolu

* Use latest unliftio-core

* Use latest protolude
2020-06-14 10:06:41 -07:00
Aditya Manthramurthy
9739376227
Fix live server test (#142)
* Update travis ghc to 8.8.2

* Fix live server test
2020-01-29 14:53:27 -08:00
Aditya Manthramurthy
410d342cd5
Build with GHC 8.8 (#137)
* Fix to build with GHC 8.8 and fix error handling bug

To work with the addition of MonadFail constraint to parseTimeM in the time
library, the underlying monad was changed from Either to Maybe as it has a
MonadFail instance.

* Update build to run tests against local minio server
2019-10-28 15:40:20 -07:00
Aditya Manthramurthy
1e6579b02b
Add GetObjectResponse data type (#134)
This allows retrieving the ObjectInfo of an object during the
getObject call.
2019-07-29 12:37:44 -07:00
Aditya Manthramurthy
777ca8f616
Fix user-metadata extraction (#133) 2019-07-24 15:07:31 -07:00
Aditya Manthramurthy
b39127778e Add oiUserMetadata to ObjectInfo to return user metadata (#132) 2019-07-24 13:30:03 -07:00
Aditya Manthramurthy
04d1193201
Switch to more performant map data type (#131) 2019-07-24 12:52:18 -07:00
Aditya Manthramurthy
cc930975c9
Fix listing to also return common prefixes (#126)
- Also bump up to 1.4.0 as this is a breaking change.
2019-07-09 12:20:05 -07:00
Aditya Manthramurthy
bd455b2f70 Accept GetObjectOptions in statObject (#112) 2019-04-14 13:31:18 -07:00
ebozduman
af3b75e29e MinIO & min.io replaces Minio & minio.io respectively (#114) 2019-04-13 00:25:25 +05:30
Aditya Manthramurthy
82bb60153f
Add encryption options to GetObjectOptions and PutObjectOptions (#111) 2019-04-08 11:50:38 -07:00
Aditya Manthramurthy
72bf08129c Add support for S3Select API (#108) 2019-03-08 15:54:36 -08:00
Aditya Manthramurthy
0fc264bbc2
Fix region setting in presigned url functions (#107)
- Also split out live server tests into individual functions
2019-02-26 15:45:36 -08:00
Krishnan Parthasarathi
44bbd66719 Improve initializing ConnectInfo (#101)
- Remove ConnectInfo's Default instance
- Add support for reading from well-known credential files and
  environment variables
2018-06-29 18:28:17 -07:00
Krishnan Parthasarathi
7564cbd514 Infer XML namespace using connectHost (#96)
While GCS is S3 v4 compatible, it uses a different xml namespace url
than AWS (and Minio).
2018-06-07 18:28:59 -07:00
Harshavardhana
d0ddd7f057 Add setConfig/getConfig API (#95) 2018-06-07 16:20:43 -07:00
Harshavardhana
0cda51804b Add admin heal API (#94) 2018-06-05 15:19:03 -07:00
Krishnan Parthasarathi
952c0b0342 Add getServerInfo admin API (#91)
- Add Admin API helper functions like buildAdminRequest
2018-05-31 18:06:24 -07:00
Aditya Manthramurthy
d25c7ef1dc Drop dependency on exceptions lib (#87) 2018-05-14 06:48:07 +05:30
Aditya Manthramurthy
522d49452f Remove dependency on text-format lib and fix bucket policy test (#86) 2018-05-11 17:48:34 -07:00
Harshavardhana
02b28bc100 api: Support single PUT on stream uploads (#84)
Current functionality only supported stream based
uploads using multipart, this meant that even for
small file sizes we were performing multipart operations
which is slower and unnecessary.

This PR fixes this behavior.
2018-04-23 14:56:31 -07:00
Harshavardhana
6d20558098 Implement getBucketPolicy/setBucketPolicy (#82)
fixes #40
fixes #39
2018-03-27 12:38:58 +05:30
Aditya Manthramurthy
51b3e51d46
Switch to unliftio and lts-11.1 (#83)
- Also add .stylish-haskell.yaml
- Re-implements `limitedMapConcurrently` using STM
- Dependencies clean up in cabal file
- Fix shadow warnings and other build warnings
2018-03-26 14:04:25 -07:00
Harshavardhana
38b67b4dab
Add support for ContentLanguage and StorageClass (#80) 2018-03-19 18:50:38 -07:00
Krishnan Parthasarathi
09d71251da Fix pooToHeaders to associate right header names to values (#81) 2018-03-19 11:48:24 -07:00
Harshavardhana
37940ad170 Add putObjectOptions for PutObject (#71) 2018-01-16 14:29:17 +05:30
Harshavardhana
8be1ff429f Support GetObjectOptions for getObject and fGetObject (#72) 2017-12-07 13:17:24 +05:30
Krishnan Parthasarathi
fe7aef21b7 Make copyObject use SourceInfo, DestinationInfo (#73)
* Make CopyPartSource constructor private

... and make individual record accessors exported. This change allows
adding of additional record members to CopyPartSource without breaking
applications.

* Move high-level copyObject functions to CopyObject module

* Make copyObject use SourceInfo, DestinationInfo

... to allow supporting features like client-side and server-side
encryption subsequently.

- fix warnings in tests/LiveServer.hs
2017-12-04 07:24:48 -08:00
Krishnan Parthasarathi
566e796409 Fix listIncompleteParts tests (#74) 2017-11-08 11:25:32 +00:00
Aditya Manthramurthy
0d8f5c08e8 Add Bucket Notification APIs (#59)
- Adds get, put and remove operations

- Also adds more sections to the haddock API doc to make it more
  friendly.
2017-10-25 08:43:35 +00:00
Aditya Manthramurthy
b7dfd0457d Add documentation for presigned operations (#68)
- Add full examples for presignedGetObjectUrl and
  presignedPutObjectUrl

- Lower-case `*URL` API functions to `*Url` to adopt a Haskell naming
  convention

Finishes and fixes #35, #36 and #37.
2017-10-16 16:13:18 +00:00
Harshavardhana
c26af265ec Add ListObjectsV1 API support (#66)
This is added for legacy requirements
2017-10-15 22:38:06 -07:00
Krishnan Parthasarathi
e995f80052 Restructure LiveServer.hs to reduce execution time (#69) 2017-10-15 03:55:07 -07:00
Aditya Manthramurthy
d3353bb35a Add presigned Post Policy API (#58)
- Also force tests to run in serial on travis (otherwise it times out)
2017-09-26 09:02:39 -07:00
Aditya Manthramurthy
02170778da Add presigned operations APIs (#56)
This change adds 3 functions to main API: presignedGetObjectURL,
presignedPutObjectURL and presignedHeadObjectURL.

A fourth more generic API is added to `Network.Minio.S3API` -
makePresignedURL.

Additionally, refactors signing code for readability and the ability
to reuse for pre-signing.
2017-09-08 10:39:07 -05:00
Krishnan Parthasarathi
d7ba361784 Add removeIncompleteupload API (#49) 2017-09-08 12:42:29 +05:30
Aditya Manthramurthy
8456034d9e Fix concurrency bug in limitedMapConcurrently (#53)
Also simplifies implementation using lifted `bracket_` and async
routines, instead of lifted control operations like `liftBaseOp_`

Adds a test.
2017-08-21 11:52:06 -07:00