Skip to content
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

Update gcs.js #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update gcs.js #140

wants to merge 1 commit into from

Conversation

halradaideh
Copy link
Contributor

This pull request includes changes to the storages/gcs.js file to improve the configuration and initialization of Google Cloud Storage. The most important changes include the addition of environment variables, handling different authentication methods, and ensuring proper error handling.

Configuration and initialization improvements:

  • Added new environment variables: CITIZEN_GCP_GS_BUCKET, CITIZEN_GCP_GS_KEYPATH, CITIZEN_ACCESS_TOKEN, CITIZEN_SELF_ACCESS, and CITIZEN_STORAGE.
  • Updated the bucket check to use CITIZEN_GCP_GS_BUCKET and adjusted the error message accordingly.
  • Implemented a switch case to handle different authentication methods: key file, access token, and system identity.
  • Added error handling to ensure a valid authentication method is provided.
  • Initialized the Storage client with the appropriate options based on the selected authentication method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant