Open llorllale opened 4 years ago
It would be nice to have an API that looks like this:
// mysql provider automatically selected provider, err := storage.Open("mysql://root:my-secret-pw@tcp(127.0.0.1:3306)/") if err != nil { // handle error }
This would reduce refactors users would have to do when selecting different storage providers.
Current obstacles:
storage
Take a look at what edge-adapter did:
https://github.com/trustbloc/edge-adapter/blob/c8d09fbaf198a8149535ca1ebe6cd766f4864e64/cmd/adapter-rest/startcmd/start.go#L162-L170
https://github.com/trustbloc/edge-adapter/blob/c8d09fbaf198a8149535ca1ebe6cd766f4864e64/cmd/adapter-rest/startcmd/start.go#L625-L666
It would be nice to have an API that looks like this:
This would reduce refactors users would have to do when selecting different storage providers.
Current obstacles:
storage
package and implementation-specific packages