This repository contains various Cloud Functions (written in Go
) used across various projects that I am developing on my GitHub account.
Currently, the following types of functions are found in this repository:
- HTTP trigger
The functions created under the api
directory can be run locally by running the main method found at api/cmd/main.go
. This method runs a generic HTTP server on port 8080
. See that file to identify what path to hit/access to run the intended Cloud Function. As each new function is created, a new path should be added in this file to perform local testing against that function.
- HTTP tigger functions can be executed by running the following CLI command:
gcloud functions deploy <FUNCTION_NAME> --entry-point <METHOD_NAME> --runtime go113 --trigger-http --env-vars-file <JSON_FILE_CONTAINING_FIRESTORE_CREDENTIALS_AND_ENVIRONMENT_VARIABLES>
- Add documentation to README for deploying each Cloud Function
- Refactor code for resusability of common code across multiple functions