@ -16,6 +16,7 @@ package org.eclipse.jgit.lfs.server.s3;
* @since 4 . 3
* @since 4 . 3
* /
* /
public class S3Config {
public class S3Config {
private final String hostname ;
private final String region ;
private final String region ;
private final String bucket ;
private final String bucket ;
private final String storageClass ;
private final String storageClass ;
@ -25,8 +26,12 @@ public class S3Config {
private final boolean disableSslVerify ;
private final boolean disableSslVerify ;
/ * *
/ * *
* < p > Constructor for S3Config . < / p >
* < p >
* Constructor for S3Config .
* < / p >
*
*
* @param hostname
* S3 API host
* @param region
* @param region
* AWS region
* AWS region
* @param bucket
* @param bucket
@ -43,10 +48,12 @@ public class S3Config {
* @param disableSslVerify
* @param disableSslVerify
* if { @code true } disable Amazon server certificate and hostname
* if { @code true } disable Amazon server certificate and hostname
* verification
* verification
* @since 5 . 8
* /
* /
public S3Config ( String region , String bucket , String storageClass ,
public S3Config ( String hostname , String region , String bucket , String storageClass ,
String accessKey , String secretKey , int expirationSeconds ,
String accessKey , String secretKey , int expirationSeconds ,
boolean disableSslVerify ) {
boolean disableSslVerify ) {
this . hostname = hostname ;
this . region = region ;
this . region = region ;
this . bucket = bucket ;
this . bucket = bucket ;
this . storageClass = storageClass ;
this . storageClass = storageClass ;
@ -56,6 +63,44 @@ public class S3Config {
this . disableSslVerify = disableSslVerify ;
this . disableSslVerify = disableSslVerify ;
}
}
/ * *
* < p > Constructor for S3Config . < / p >
*
* @param region
* AWS region
* @param bucket
* S3 storage bucket
* @param storageClass
* S3 storage class
* @param accessKey
* access key for authenticating to AWS
* @param secretKey
* secret key for authenticating to AWS
* @param expirationSeconds
* period in seconds after which requests signed for this bucket
* will expire
* @param disableSslVerify
* if { @code true } disable Amazon server certificate and hostname
* verification
* /
public S3Config ( String region , String bucket , String storageClass ,
String accessKey , String secretKey , int expirationSeconds ,
boolean disableSslVerify ) {
this ( String . format ( "s3-%s.amazonaws.com" , region ) , region , bucket , //$NON-NLS-1$
storageClass , accessKey , secretKey , expirationSeconds ,
disableSslVerify ) ;
}
/ * *
* Get the < code > hostname < / code > .
*
* @return Get the S3 API host
* @since 5 . 8
* /
public String getHostname ( ) {
return hostname ;
}
/ * *
/ * *
* Get the < code > region < / code > .
* Get the < code > region < / code > .
*
*