Service Account flow – 2 Legged Oauth Golang

Issue I want to get the Oauth token from the GCP client credentials. Reference package main import ( “fmt” “io/ioutil” “log” “golang.org/x/oauth2” “golang.org/x/oauth2/google” ) func main() { data, err := ioutil.ReadFile(“/Users/supreetdeshpande/Downloads/esp-rainmaker-97663-2f539a842d10.json”) if err != nil { log.Fatal(err) } conf, err

Continue reading

Update BigQuery access policy using golang

Issue The documentation doesn’t mention any options: https://cloud.google.com/bigquery/docs/table-access-controls#update_an_access_policy Are there any ways to achieve this (similar to https://cloud.google.com/bigquery/docs/dataset-access-controls#granting_access_to_a_dataset)? Solution https://pkg.go.dev/cloud.google.com/go/bigquery#hdr-Querying – this works not only with SELECT statements. So running a "GRANT" through that solves my issue. Answered By –

Continue reading