Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test.Sandwich.Contexts.Types.S3
Description
Helper module for working with S3 servers.
Synopsis
- data TestS3Server = TestS3Server {}
- data HttpMode
- testS3Server :: Label "testS3Server" TestS3Server
- type HasTestS3Server context = HasLabel context "testS3Server" TestS3Server
- testS3ServerEndpoint :: TestS3Server -> Text
- testS3ServerContainerEndpoint :: TestS3Server -> Maybe Text
- s3Protocol :: TestS3Server -> Text
Documentation
data TestS3Server Source #
A generic test S3 server. This can be used by downstream packages like sandwich-contexts-minio.
Constructors
TestS3Server | |
Fields
|
Instances
Show TestS3Server Source # | |
Defined in Test.Sandwich.Contexts.Types.S3 Methods showsPrec :: Int -> TestS3Server -> ShowS # show :: TestS3Server -> String # showList :: [TestS3Server] -> ShowS # | |
Eq TestS3Server Source # | |
Defined in Test.Sandwich.Contexts.Types.S3 |
Constructors
HttpModeHttp | |
HttpModeHttps | |
HttpModeHttpsNoValidate | A special mode to allow a server to run in HTTPS mode, but connect to it without HTTPS validation. Useful for tests. |
Contexts
testS3Server :: Label "testS3Server" TestS3Server Source #
type HasTestS3Server context = HasLabel context "testS3Server" TestS3Server Source #
Endpoints
testS3ServerEndpoint :: TestS3Server -> Text Source #
Generate an S3 connection string for the given server.
testS3ServerContainerEndpoint :: TestS3Server -> Maybe Text Source #
Generate an S3 connection string for the given containerized server, for the network address inside the container.
Returns Nothing
if this server isn't containerized.
Misc
s3Protocol :: TestS3Server -> Text Source #
Return either "http" or "https", based on the testS3ServerHttpMode
.