"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
swift: add OS_USER_ID to config
Nick Craig-Woodcacae8d12d04
diff --git a/swift/swift.go b/swift/swift.goindex ad862ecac..88ba82b01 100644--- a/swift/swift.go+++ b/swift/swift.go@@ -49,13 +49,13 @@ func init() {},}, {Name: "user",- Help: "User name to log in.",+ Help: "User name to log in (OS_USERNAME).",}, {Name: "key",- Help: "API key or password.",+ Help: "API key or password (OS_PASSWORD).",}, {Name: "auth",- Help: "Authentication URL for server.",+ Help: "Authentication URL for server (OS_AUTH_URL).",Examples: []fs.OptionExample{{Help: "Rackspace US",Value: "https://auth.api.rackspacecloud.com/v1.0",@@ -75,27 +75,30 @@ func init() {Help: "OVH",Value: "https://auth.cloud.ovh.net/v2.0",}},+ }, {+ Name: "user_id",+ Help: "User ID to log in - optional - most swift systems use user and leave this blank (v3 auth) (OS_USER_ID).",}, {Name: "domain",- Help: "User domain - optional (v3 auth)",+ Help: "User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)",}, {Name: "tenant",- Help: "Tenant name - optional for v1 auth, required otherwise",+ Help: "Tenant name - optional for v1 auth, required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME)",}, {Name: "tenant_domain",- Help: "Tenant domain - optional (v3 auth)",+ Help: "Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME)",}, {Name: "region",- Help: "Region name - optional",+ Help: "Region name - optional (OS_REGION_NAME)",}, {Name: "storage_url",- Help: "Storage URL - optional",+ Help: "Storage URL - optional (OS_STORAGE_URL)",}, {Name: "auth_version",- Help: "AuthVersion - optional - set to (1,2,3) if your auth URL has no version",+ Help: "AuthVersion - optional - set to (1,2,3) if your auth URL has no version (ST_AUTH_VERSION)",}, {Name: "endpoint_type",- Help: "Endpoint type to choose from the service catalogue",+ Help: "Endpoint type to choose from the service catalogue (OS_ENDPOINT_TYPE)",Examples: []fs.OptionExample{{Help: "Public (default, choose this if not sure)",Value: "public",@@ -181,14 +184,17 @@ func parsePath(path string) (container, directory string, err error) {// swiftConnection makes a connection to swiftfunc swiftConnection(name string) (*swift.Connection, error) {c := &swift.Connection{- UserName: fs.ConfigFileGet(name, "user"),- ApiKey: fs.ConfigFileGet(name, "key"),- AuthUrl: fs.ConfigFileGet(name, "auth"),+ // Keep these in the same order as the Config for ease of checking+ UserName: fs.ConfigFileGet(name, "user"),+ ApiKey: fs.ConfigFileGet(name, "key"),+ AuthUrl: fs.ConfigFileGet(name, "auth"),+ UserId: fs.ConfigFileGet(name, "user_id"),+ Domain: fs.ConfigFileGet(name, "domain"),+ Tenant: fs.ConfigFileGet(name, "tenant"),+ TenantDomain: fs.ConfigFileGet(name, "tenant_domain"),+ Region: fs.ConfigFileGet(name, "region"),+ // StorageUrl is set belowAuthVersion: fs.ConfigFileGetInt(name, "auth_version", 0),- Tenant: fs.ConfigFileGet(name, "tenant"),- Region: fs.ConfigFileGet(name, "region"),- Domain: fs.ConfigFileGet(name, "domain"),- TenantDomain: fs.ConfigFileGet(name, "tenant_domain"),EndpointType: swift.EndpointType(fs.ConfigFileGet(name, "endpoint_type", "public")),ConnectTimeout: 10 * fs.Config.ConnectTimeout, // Use the timeouts in the transportTimeout: 10 * fs.Config.Timeout, // Use the timeouts in the transport