commit
						d303d5c1ac
					
				| 
						 | 
					@ -72,6 +72,7 @@ type Parameters struct {
 | 
				
			||||||
	AuthVersion         int
 | 
						AuthVersion         int
 | 
				
			||||||
	Container           string
 | 
						Container           string
 | 
				
			||||||
	Prefix              string
 | 
						Prefix              string
 | 
				
			||||||
 | 
						EndpointType        string
 | 
				
			||||||
	InsecureSkipVerify  bool
 | 
						InsecureSkipVerify  bool
 | 
				
			||||||
	ChunkSize           int
 | 
						ChunkSize           int
 | 
				
			||||||
	SecretKey           string
 | 
						SecretKey           string
 | 
				
			||||||
| 
						 | 
					@ -182,6 +183,7 @@ func New(params Parameters) (*Driver, error) {
 | 
				
			||||||
		Domain:         params.Domain,
 | 
							Domain:         params.Domain,
 | 
				
			||||||
		DomainId:       params.DomainID,
 | 
							DomainId:       params.DomainID,
 | 
				
			||||||
		TrustId:        params.TrustID,
 | 
							TrustId:        params.TrustID,
 | 
				
			||||||
 | 
							EndpointType:   swift.EndpointType(params.EndpointType),
 | 
				
			||||||
		Transport:      transport,
 | 
							Transport:      transport,
 | 
				
			||||||
		ConnectTimeout: 60 * time.Second,
 | 
							ConnectTimeout: 60 * time.Second,
 | 
				
			||||||
		Timeout:        15 * 60 * time.Second,
 | 
							Timeout:        15 * 60 * time.Second,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,6 +34,7 @@ func init() {
 | 
				
			||||||
		container          string
 | 
							container          string
 | 
				
			||||||
		region             string
 | 
							region             string
 | 
				
			||||||
		AuthVersion        int
 | 
							AuthVersion        int
 | 
				
			||||||
 | 
							endpointType       string
 | 
				
			||||||
		insecureSkipVerify bool
 | 
							insecureSkipVerify bool
 | 
				
			||||||
		secretKey          string
 | 
							secretKey          string
 | 
				
			||||||
		accessKey          string
 | 
							accessKey          string
 | 
				
			||||||
| 
						 | 
					@ -54,6 +55,7 @@ func init() {
 | 
				
			||||||
	container = os.Getenv("SWIFT_CONTAINER_NAME")
 | 
						container = os.Getenv("SWIFT_CONTAINER_NAME")
 | 
				
			||||||
	region = os.Getenv("SWIFT_REGION_NAME")
 | 
						region = os.Getenv("SWIFT_REGION_NAME")
 | 
				
			||||||
	AuthVersion, _ = strconv.Atoi(os.Getenv("SWIFT_AUTH_VERSION"))
 | 
						AuthVersion, _ = strconv.Atoi(os.Getenv("SWIFT_AUTH_VERSION"))
 | 
				
			||||||
 | 
						endpointType = os.Getenv("SWIFT_ENDPOINT_TYPE")
 | 
				
			||||||
	insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
 | 
						insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
 | 
				
			||||||
	secretKey = os.Getenv("SWIFT_SECRET_KEY")
 | 
						secretKey = os.Getenv("SWIFT_SECRET_KEY")
 | 
				
			||||||
	accessKey = os.Getenv("SWIFT_ACCESS_KEY")
 | 
						accessKey = os.Getenv("SWIFT_ACCESS_KEY")
 | 
				
			||||||
| 
						 | 
					@ -90,6 +92,7 @@ func init() {
 | 
				
			||||||
			AuthVersion,
 | 
								AuthVersion,
 | 
				
			||||||
			container,
 | 
								container,
 | 
				
			||||||
			root,
 | 
								root,
 | 
				
			||||||
 | 
								endpointType,
 | 
				
			||||||
			insecureSkipVerify,
 | 
								insecureSkipVerify,
 | 
				
			||||||
			defaultChunkSize,
 | 
								defaultChunkSize,
 | 
				
			||||||
			secretKey,
 | 
								secretKey,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue