Created
August 7, 2023 00:37
-
-
Save arivictor/969edb8c7a1d2c5aa4f40d79d4f42a4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "cloud.google.com/go/storage" | |
| func main() { | |
| // Hardcoded credentials | |
| credsJSON := `{ | |
| "type": "service_account", | |
| "project_id": "my_project", | |
| // ... other credentials ... | |
| }` | |
| client, err := storage.NewClient(ctx, option.WithCredentialsJSON([]byte(credsJSON))) | |
| // ... other logic ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment