Skip to content

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