go-cloud
go-cloud copied to clipboard
postgres/gcppostgres: add support for AlloyDB
Are there plans to add support for connecting to the Postgres compatible AlloyDB in GCP?
No concrete plans, no. Happy to take pull requests. What does a sample sql.OpenDB look like?
In their go connector example shows something like this.
db, err := sql.Open(
"alloydb",
"host=projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>/instances/<INSTANCE> user=myuser password=mypass dbname=mydb sslmode=disable",
)
Happy to take a PR on this. I think you should be able to start with https://github.com/google/go-cloud/blob/master/postgres/gcppostgres/gcppostgres.go and modify it for the above.