refactor(storage/driver): simplify and centralize the storage drivers options parsing
Rationale
Storage drivers parse their options from a general data structure that's a map[string]interface{}
that's part of the func (factory *s3DriverFactory) Create(parameters map[string]interface{}) (storagedriver.StorageDriver, error)
method of the factory.StorageDriverFactory
interface. Logic for parsing from an interface{}
to various types could be shared between drivers, or reused within a driver, but it isn't at present.
Challenges
The main assumption being made here is that all instances of a certain type are parsed in the same way, but an exhaustive census has not been made. Even so, this is a safe assumption
Edited by João Pereira