GCP Serverless API With Golang

GCP SERVERLESS API

TECH STACK

  • API Gateway
  • Golang
  • Google Cloud Firestore (Native Mode)
  • Google Cloud Functions
  • Google Cloud Storage

LOCAL SETUP

  • git clone and cd into the folder
  • go mod download to download modules to local cache
  • Create a service account, add roles Cloud Functions Invoker,Storage Object Admin and private key for the account
  • Create a publicly accessible Google Cloud Storage Bucket
  • Copy the following environmental variables to a .env file from example.env and fill in your credentials
  • make dev OR go run cmd/main.go to start the application

GCP DEPLOYMENT

  • Install the serverless framework and plugins defined in serverless.yml
  • Enable these APIs on GCP
    • Cloud Deployment Manager V2 API,
    • API Gateway API,
    • Service Control API,
    • Service Management API,
    • Cloud Firestore API (Native Mode),
    • Cloud Function API
    • Cloud Storage API
  • Use gcloud CLI to get application default credientials
  • For each stage e.g. dev, prod, test
    • Copy the following environmental variables to a .env. file from example.env and fill in your credentials
    • sls deploy --stage to deploy resources
    • Create an API Gateway and its API config using the sample file apiconfig-dev.yaml. Replace the region and project id in the given file
    • Enable your created API e.g. -.apigateway. .cloud.goog
    • Create an API Key and restrict it to your API
Owner
Emmanuel Onyekaba
Software Engineer | React | NodeJS | Golang | AWS
Emmanuel Onyekaba
Similar Resources

Docker-NodeJS - Creating a CI/CD Environment for Serverless Containers on Google Cloud Run

Docker-NodeJS - Creating a CI/CD Environment for Serverless Containers on Google Cloud Run

Creating a CI/CD Environment for Serverless Containers on Google Cloud Run Archi

Jan 8, 2022

cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resource objects related of Kubernetes Cluster API.

Overview cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resou

Oct 27, 2022

Go-Mongodb API - A sample REST API ( CRUD operations ) created using Golang

Go-Mongodb_API This is a sample REST API ( CRUD operations ) created using the G

May 31, 2022

Kubernetes OS Server - Kubernetes Extension API server exposing OS configuration like sysctl via Kubernetes API

KOSS is a Extension API Server which exposes OS properties and functionality using Kubernetes API, so it can be accessed using e.g. kubectl. At the moment this is highly experimental and only managing sysctl is supported. To make things actually usable, you must run KOSS binary as root on the machine you will be managing.

May 19, 2021

A shields.io API for your youtube channel to protect your api key

A shields.io API for your youtube channel to protect your api key

Youtube-Channel-Badge A shields.io API for your youtube channel to protect your

Dec 23, 2021

Pokete api - An API to get (Pokete, Attack etc.) data from Pokete

Pokete API An API to get (Pokete, Attack etc.) data from Pokete. Usage To lauch

Jun 16, 2022

Using the Golang search the Marvel Characters. This project is a web based golang application that shows the information of superheroes using Marvel api.

Using the Golang search the Marvel Characters. This project is a web based golang application that shows the information of superheroes using Marvel api.

marvel-universe-web using the Golang search the Marvel Universe Characters About The Project This project is a web based golang application that shows

Oct 10, 2021

Poc rsa - A simple golang scaffolding to help me to create new api projects or workers with golang on k8s

go-scaffold A simple golang scaffolding to help me to create new api projects or

Feb 3, 2022

Testcontainers is a Golang library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.

When I was working on a Zipkin PR I discovered a nice Java library called Testcontainers. It provides an easy and clean API over the go docker sdk to

Jan 7, 2023
Experimentation for backend on GCP's App Engine

gcp-app-engine-go Experimentation for backend on GCP's App Engine Archived. App Engine project with multiples services and CI/CD setup: default (hello

Jan 15, 2022
Serviço de consulta de CEP Serverless usando Lambda function em Golang
Serviço de consulta de CEP Serverless usando Lambda function em Golang

Consulta CEP Serverless Consulta CEP foi desenvolvido com o objetivo de facilitar a vida do desenvolvedor que precisa de um serviço de consulta de CEP

Oct 26, 2021
Deploy 2 golang aws lambda functions using serverless framework.

Deploy 2 golang aws lambda functions using serverless framework.

Jan 20, 2022
A serverless cluster computing system for the Go programming language

Bigslice Bigslice is a serverless cluster data processing system for Go. Bigslice exposes composable API that lets the user express data processing ta

Dec 14, 2022
Continuous Delivery for Declarative Kubernetes, Serverless and Infrastructure Applications
Continuous Delivery for Declarative Kubernetes, Serverless and Infrastructure Applications

Continuous Delivery for Declarative Kubernetes, Serverless and Infrastructure Applications Explore PipeCD docs » Overview PipeCD provides a unified co

Jan 3, 2023
Putting serverless on your server
Putting serverless on your server

Matterless: putting serverless on your server Serverless computing enables you to build applications that automatically scale with demand, and your wa

Dec 10, 2022
Kubernetes Native Serverless Framework
Kubernetes Native Serverless Framework

kubeless is a Kubernetes-native serverless framework that lets you deploy small bits of code without having to worry about the underlying infrastructu

Dec 25, 2022
Koyeb is a developer-friendly serverless platform to deploy apps globally.
Koyeb is a developer-friendly serverless platform to deploy apps globally.

Koyeb Serverless Platform Deploy a Go Gin application on Koyeb Learn more about Koyeb · Explore the documentation · Discover our tutorials About Koyeb

Nov 14, 2022
FaaSNet: Scalable and Fast Provisioning of Custom Serverless Container Runtimes at Alibaba Cloud Function Compute (USENIX ATC'21)

FaaSNet FaaSNet is the first system that provides an end-to-end, integrated solution for FaaS-optimized container runtime provisioning. FaaSNet uses l

Jan 2, 2023
Go serverless functions examples with most popular Cloud Providers

go-serverless Go serverless functions examples with most popular Cloud Providers Creating zip archive go mod download go build ./cmd/<aws|gcp> zip -

Nov 16, 2021