Skip to content

vimalpatel19/gcp-cloud-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

GCP (Google Cloud Platform) - Cloud Functions

This repository contains various Cloud Functions (written in Go) used across various projects that I am developing on my GitHub account.

Event/Trigger types

Currently, the following types of functions are found in this repository:

  • HTTP trigger

Testing locally

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.

Deploying

  • 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>

TODO

  • Add documentation to README for deploying each Cloud Function
  • Refactor code for resusability of common code across multiple functions

About

Various Google Cloud Functions written in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages