Closed prestonvasquez closed 1 year ago
Hello, I would like to do this! @prestonvasquez can you assign me?
Could you please assgn to me as we talked about combining with other issue?
@axlts Thank you for your interest in this issue, however it is directly related to work @krishnaindani has in progress. These issues are fairly similar, dealing with the same area of code: https://github.com/alpine-hodler/gidari/issues/153 , https://github.com/alpine-hodler/gidari/issues/155 .
would we like to take like
storage:
- connectionString: dbtype
for example:
storage:
- "mongodb://mongo1:27017/jokes": mongoDB
- "mongodb://mongo2:27017/jokes": mongoDB
Sorry I think I got it wrong, the intention here is to keep the nested name to still connectionString
just the value needs to be the url of the connection, is it? Just bit of confused here
for example
url: someURL
storage:
- connectionString: "mongodb://mongo1:27017/jokes"
- connectionString: "mongodb://mongo2:27017/jokes"
@krishnaindani The storage
package already has a method to parse the scheme from connection string: https://github.com/alpine-hodler/gidari/blob/main/internal/storage/storage.go#L90
Using an example from Postman's public API list, I think it should look something like
url: https://official-joke-api.appspot.com
storage:
- connectionString: mongodb://mongo1:27017/jokes
- connectionString: mongodb://mongo1:27017/jokes
rateLimit:
burst: 5
period: 1
requests:
- endpoint: /random_joke
@krishnaindani Are you still interested in pursuing this issue?
sorry I was in gophercon, so I missed it. Someone can talk a look before I can catch up maybe.
Closed by #360
Right now the
connectionStrings
type for a configuration YAML file is an array of strings. We may need to add more information / context to each value in this array so it should be converted into an array of maps:This should be fairly straight-forward to do. It would require
Updating these yml files with the new format: https://github.com/alpine-hodler/gidari/tree/main/internal/transport/testdata/upsert
Add a new struct to transport.go called
storageReference
(or whatever):[]storageReference
rather than[]string
forConifg.ConnectionStrings
. We should also change the name fromConfig.ConnectionStrings
toConfig.StorageReference
.