s3: implement open with config

This commit is contained in:
Alexander Neumann 2015-12-28 18:23:02 +01:00
parent f7c9091970
commit 2b0b44c5ce
4 changed files with 72 additions and 44 deletions

View file

@ -7,11 +7,19 @@ var configTests = []struct {
cfg Config
}{
{"s3://eu-central-1/bucketname", Config{
Host: "eu-central-1",
Region: "eu-central-1",
Bucket: "bucketname",
}},
{"s3:hostname:foobar", Config{
Host: "hostname",
{"s3:eu-central-1/foobar", Config{
Region: "eu-central-1",
Bucket: "foobar",
}},
{"s3:https://hostname:9999/foobar", Config{
URL: "https://hostname:9999",
Bucket: "foobar",
}},
{"s3:http://hostname:9999/foobar", Config{
URL: "http://hostname:9999",
Bucket: "foobar",
}},
}