|
|
@ -36,6 +36,7 @@ type S3BackendStorage struct { |
|
|
|
aws_secret_access_key string |
|
|
|
region string |
|
|
|
bucket string |
|
|
|
endpoint string |
|
|
|
conn s3iface.S3API |
|
|
|
} |
|
|
|
|
|
|
@ -46,7 +47,9 @@ func newS3BackendStorage(configuration backend.StringProperties, configPrefix st |
|
|
|
s.aws_secret_access_key = configuration.GetString(configPrefix + "aws_secret_access_key") |
|
|
|
s.region = configuration.GetString(configPrefix + "region") |
|
|
|
s.bucket = configuration.GetString(configPrefix + "bucket") |
|
|
|
s.conn, err = createSession(s.aws_access_key_id, s.aws_secret_access_key, s.region) |
|
|
|
s.endpoint = configuration.GetString(configPrefix + "endpoint") |
|
|
|
|
|
|
|
s.conn, err = createSession(s.aws_access_key_id, s.aws_secret_access_key, s.region, s.endpoint) |
|
|
|
|
|
|
|
glog.V(0).Infof("created backend storage s3.%s for region %s bucket %s", s.id, s.region, s.bucket) |
|
|
|
return |
|
|
@ -58,6 +61,7 @@ func (s *S3BackendStorage) ToProperties() map[string]string { |
|
|
|
m["aws_secret_access_key"] = s.aws_secret_access_key |
|
|
|
m["region"] = s.region |
|
|
|
m["bucket"] = s.bucket |
|
|
|
m["endpoint"] = s.endpoint |
|
|
|
return m |
|
|
|
} |
|
|
|
|
|
|
|