{"id":17650836,"url":"https://github.com/lucmq/gcp-project-id","last_synced_at":"2025-03-30T08:22:40.891Z","repository":{"id":223915887,"uuid":"761509202","full_name":"lucmq/gcp-project-id","owner":"lucmq","description":"Access your Google Cloud project ID and related configuration.","archived":false,"fork":false,"pushed_at":"2024-06-06T12:54:28.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T10:24:38.668Z","etag":null,"topics":["config","gcp","gcp-project","google-cloud","project-id"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucmq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-22T00:45:36.000Z","updated_at":"2024-06-06T12:50:25.000Z","dependencies_parsed_at":"2024-02-22T23:26:49.024Z","dependency_job_id":"37a24086-c747-4782-b093-b39515885e13","html_url":"https://github.com/lucmq/gcp-project-id","commit_stats":null,"previous_names":["lucmq/gcp-id","lucmq/google-cloud-id"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucmq%2Fgcp-project-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucmq%2Fgcp-project-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucmq%2Fgcp-project-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucmq%2Fgcp-project-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucmq","download_url":"https://codeload.github.com/lucmq/gcp-project-id/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246291987,"owners_count":20753985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","gcp","gcp-project","google-cloud","project-id"],"created_at":"2024-10-23T11:39:33.455Z","updated_at":"2025-03-30T08:22:40.867Z","avatar_url":"https://github.com/lucmq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gcp-project-id\n[![Go Reference](https://pkg.go.dev/badge/github.com/lucmq/gcp-project-id.svg)](https://pkg.go.dev/github.com/lucmq/gcp-project-id)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lucmq/gcp-project-id)](https://goreportcard.com/report/github.com/lucmq/gcp-project-id)\n[![Go Coverage](https://github.com/lucmq/gcp-project-id/wiki/coverage.svg)](https://raw.githack.com/wiki/lucmq/gcp-project-id/coverage.html)\n[![DeepSource](https://app.deepsource.com/gh/lucmq/gcp-project-id.svg/?label=active+issues\u0026show_trend=false\u0026token=UNFmjB4lDK3-JBb8f0AcsfsQ)](https://app.deepsource.com/gh/lucmq/gcp-project-id/)\n\nAccess your Google Cloud project ID and related configuration.\n\nWorks in the cloud and local development environments, as it can retrieve the project\nID configured within the `gcloud` CLI.\n\n## Installation\nTo use this package in your Go project, you can install it using `go get`:\n\n```bash\ngo get github.com/lucmq/gcp-project-id\n```\n\n## Usage\nHere's how you can use the project package to retrieve a Google Cloud project ID:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/lucmq/gcp-project-id/project\"\n)\n\nfunc main() {\n\t// Retrieve the default project ID with default options\n\tprojectID := project.ID()\n\n\tfmt.Println(\"Default Project ID:\", projectID)\n}\n```\n\nWith custom options:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\t\n\t\"github.com/lucmq/gcp-project-id/project\"\n)\n\nfunc main() {\n\t// Customize options (e.g., timeout, scopes, strict mode)\n\toptions := project.Options{\n\t\tTimeout: 10 * time.Second,\n\t\tScopes:  []string{\"https://www.googleapis.com/auth/compute\"},\n\t\tStrict:  true,\n\t}\n\n\t// Retrieve the project ID with custom options\n\tprojectID := project.ID(options)\n\n\tfmt.Println(\"Default Project ID:\", projectID)\n}\n```\n\n# Contributing\nContributions to this package are welcome! If you find any issues or have suggestions\nfor improvements, please feel free to open an issue or submit a pull request.\n\n# License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucmq%2Fgcp-project-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucmq%2Fgcp-project-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucmq%2Fgcp-project-id/lists"}