-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use aws secret manager #128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code does not compile. Can you show a recording of the software working after you've fixed it? Then I'll review again.
To test, run:
go run .
And then
curl -G "http://localhost:8080/api/data/query" \
--data-urlencode="api_key=local" \
--data-urlencode="query=select 1"
This should not throw any errors on the go side and the curl command. should return regular JSON.
@@ -66,7 +66,7 @@ func setupLogs(logConfig config.Logging) { | |||
} | |||
} | |||
|
|||
func GetStorageServices(c config.ScratchDataConfig) (*models.StorageServices, error) { | |||
func GetStorageServices(c config.ScratchDataConfig, vault vault.Vault) (*models.StorageServices, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not change the signature of this function. Instead, add a new Vault
member to the models.StorageServices
struct. You can follow the same pattern we use for the blobstore and queue in this function.
) | ||
|
||
type Database interface { | ||
VerifyAdminAPIKey(hashedAPIKey string) bool | ||
|
||
GetDestinations() []config.Destination | ||
CreateDestination(destType string, settings map[string]any) (config.Destination, error) | ||
GetDestinationCredentials(dbID int64) (config.Destination, error) | ||
GetStorageServices() []config.StorageService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed. When creating a database, we already pass the StorageServices struct into the New...
function.
Because this code doesn’t compile, I will close this pr for now. |
Fixes #126
/claim #126