Rename DriverParameters structure to Parameters

Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
This commit is contained in:
Sylvain Baubeau 2015-06-30 14:22:41 +02:00
parent 80bfcb68a8
commit fbc74a6457
2 changed files with 5 additions and 5 deletions

View file

@ -52,8 +52,8 @@ const minChunkSize = 1 << 20
// Vendor MIME type used for objects that act as directories // Vendor MIME type used for objects that act as directories
const directoryMimeType = "application/vnd.swift.directory" const directoryMimeType = "application/vnd.swift.directory"
//DriverParameters A struct that encapsulates all of the driver parameters after all values have been set // Parameters A struct that encapsulates all of the driver parameters after all values have been set
type DriverParameters struct { type Parameters struct {
Username string Username string
Password string Password string
AuthURL string AuthURL string
@ -106,7 +106,7 @@ type Driver struct {
// - authurl // - authurl
// - container // - container
func FromParameters(parameters map[string]interface{}) (*Driver, error) { func FromParameters(parameters map[string]interface{}) (*Driver, error) {
params := DriverParameters{ params := Parameters{
ChunkSize: defaultChunkSize, ChunkSize: defaultChunkSize,
InsecureSkipVerify: false, 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 // 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{ transport := &http.Transport{
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,
MaxIdleConnsPerHost: 2048, MaxIdleConnsPerHost: 2048,

View file

@ -71,7 +71,7 @@ func init() {
defer os.Remove(root) defer os.Remove(root)
swiftDriverConstructor := func(rootDirectory string) (*Driver, error) { swiftDriverConstructor := func(rootDirectory string) (*Driver, error) {
parameters := DriverParameters{ parameters := Parameters{
username, username,
password, password,
authURL, authURL,