From 1a80ec340bdd304eaea92d88130cc495141bdc92 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Tue, 30 Jun 2015 14:22:41 +0200 Subject: [PATCH] Rename DriverParameters structure to Parameters Signed-off-by: Sylvain Baubeau --- registry/storage/driver/swift/swift.go | 8 ++++---- registry/storage/driver/swift/swift_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/registry/storage/driver/swift/swift.go b/registry/storage/driver/swift/swift.go index 380d65da..f91af908 100644 --- a/registry/storage/driver/swift/swift.go +++ b/registry/storage/driver/swift/swift.go @@ -52,8 +52,8 @@ const minChunkSize = 1 << 20 // Vendor MIME type used for objects that act as directories const directoryMimeType = "application/vnd.swift.directory" -//DriverParameters A struct that encapsulates all of the driver parameters after all values have been set -type DriverParameters struct { +// Parameters A struct that encapsulates all of the driver parameters after all values have been set +type Parameters struct { Username string Password string AuthURL string @@ -106,7 +106,7 @@ type Driver struct { // - authurl // - container func FromParameters(parameters map[string]interface{}) (*Driver, error) { - params := DriverParameters{ + params := Parameters{ ChunkSize: defaultChunkSize, InsecureSkipVerify: false, } @@ -139,7 +139,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) { } // New constructs a new Driver with the given Openstack Swift credentials and container name -func New(params DriverParameters) (*Driver, error) { +func New(params Parameters) (*Driver, error) { transport := &http.Transport{ Proxy: http.ProxyFromEnvironment, MaxIdleConnsPerHost: 2048, diff --git a/registry/storage/driver/swift/swift_test.go b/registry/storage/driver/swift/swift_test.go index fc66aa26..e0bab62e 100644 --- a/registry/storage/driver/swift/swift_test.go +++ b/registry/storage/driver/swift/swift_test.go @@ -71,7 +71,7 @@ func init() { defer os.Remove(root) swiftDriverConstructor := func(rootDirectory string) (*Driver, error) { - parameters := DriverParameters{ + parameters := Parameters{ username, password, authURL,