This is a shopping basket workshop that shows how to use KrakenD API Gateway.

Overview

Go Restful Microservices and KrakenD API Gateway Workshop

This is a shopping basket workshop that shows how to use KrakenD API Gateway.

Consist of 5 microservice and API Gateway.

Token based Authentication.

Raw access token is created by the Identity Service. (json model)

This raw access token is signed and verified by KrakendD API Gateway. (bearer token)

Services communicate with each other asynchronously through Kafka.

Order Service makes an HTTP Request to Customer Service to get basket items.

Customer Service keeps a local copy of a subset of user and product data.

Run in Release Mode & Test

  • Run 'docker-compose up' in the root directory and wait for all containers to get ready.

  • Execute db_all.sql to create databases of microservices when the Postgres container get ready. Make sure all DBs are created. (tables will be created by auto-migration)

  • 13 containers will be created. Service containers (customer_service, identity_service, etc.) need to be started manually due to the need to wait for the Postgres container to get ready to accept DB connections. (wait-for-it.sh is used for the only Kafka for waiting zookeeper to get ready.)

  • Use the Postman collection to play with KrakenD. ( _postman_collection/Go_Microservices_KrakenD.postman_collection.json )

Containers

Postman Collection

Use KrakenD-* requests to play with KrakenD API Gateway. If you want to debug an individual service, run the service in debug mode and use the requests under the Direct Access folder as shown below.

Run in Debug Mode

In debug mode, you skip KrakenD, so KrakenD is not going to sign the bearer token and not going to inject in the request header as the 'User_Id' key. You need to add the 'User_Id' key as a request header for 'Add to Basket' and 'Create Order' requests. (Check the postman collection requests which are under the 'Direct Access' folder. )

For VsCode Users: Select 'All' configuration on Debug panel and start debugging. All services will be up and running in debug mode.

Tool Set

Owner
Suat KÖSE
Trying to write code that's easy to delete.
Suat KÖSE
Conversion from OpenAPI definitions to krakend configuration.

Description Basic conversion from OpenAPI specification to Krakend config. This is extendable with custom OpenAPI attributes and more support for both

Hamza Oral 9 Jun 14, 2022
Ruuvi-go-gateway - Software replica of the Ruuvi Gateway

ruuvi-go-gateway ruuvi-go-gateway is a software that tries to replicate Ruuvi Ga

Scrin 6 May 10, 2022
A microservice gateway developed based on golang.With a variety of plug-ins which can be expanded by itself, plug and play. what's more,it can quickly help enterprises manage API services and improve the stability and security of API services.

Goku API gateway is a microservice gateway developed based on golang. It can achieve the purposes of high-performance HTTP API forwarding, multi tenant management, API access control, etc. it has a powerful custom plug-in system, which can be expanded by itself, and can quickly help enterprises manage API services and improve the stability and security of API services.

Eolink 194 Jun 22, 2022
HTTP API Gateway

Manba/简体中文 Manba is a restful API gateway based on HTTP, which can be used as a unified API access layer. Tutorial A very detailed tutorial for beginn

null 3.1k Jun 23, 2022
Test your API gateway routed lambdas locally and in CI

Lambo Test API Gateway wrapped lambda functions locally. Lambo can also be used to test API GW lambdas in CI without needing docker-in-docker. It will

Liam Galvin 8 Jun 22, 2022
a simple api gateway

鉴权网关 根据登录接口返回UIN判断是否登录/退出成功 自动添加跨域处理 会话重启即失效 TLS鉴权 负载均衡 随机 Config # 开启验证 enable_verify: false # 验证证书 ca_path: "./conf/ca.pem" module_cert_pem: "./conf

null 2 Feb 10, 2022
The Consul API Gateway is a dedicated ingress solution for intelligently routing traffic to applications running on a Consul Service Mesh.

The Consul API Gateway is a dedicated ingress solution for intelligently routing traffic to applications running on a Consul Service Mesh.

HashiCorp 65 Jun 15, 2022
A gateway to expose s3 standard API for any storage type.

s3-gateway this project is used to be compatible with any other storage type. there are tons of object storage services in the internat. However, many

xylon 0 Nov 28, 2021
A simple HTTP/HTTPS API Gateway in Golang.

mice A simple API Gateway in Golang. Installation: Using go install: First install Go, if not already there Set GOPATH and GOBIN if not already set as

Mike 7 May 19, 2022
TiDB Gateway

TiDB Gateway Building go build Running ./tidbgw Optionally set the address of PD and address to listen on via flags. Using Connect your MySQL client

Daniël van Eeden 3 Jan 27, 2022
Blue is a lightweight cloud-native gateway solution to handle millions of routing endpoints with a large number of connections.

Blue is a lightweight cloud-native gateway solution to handle millions of routing endpoints with a large number of connections.

null 456 Jan 19, 2022
Micro-serviço em Golang para processar pagamentos de um Gateway.

Go Payment Processor Projeto Este repositório contém um micro-serviço em Golang que faz parte de um conjunto de serviços necessário para o projeto do

Daniel Hessel 0 Dec 13, 2021
Cortex Gateway: a microservice which strives to help you administrating and operating your Cortex Cluster in multi tenant environments

Cortex Gateway Cortex Gateway is a microservice which strives to help you administrating and operating your Cortex Cluster in multi tenant environment

Delivery Hero SE 0 Jan 14, 2022
Search-gateway - Golang restfull Service

Search Gateway Specifications Gin framework Development PORT=3000 go run main.go

mahdi imani 1 Jan 25, 2022
Cloud-native and easy-to-use application management platform | 云原生且易用的应用管理平台

Website • Documentation What is NEW! August 24, 2020 ,Rainbond 5.2 Stable version is officially released View Release Rainbond Introduction Cloud nati

好雨科技 3.1k Jun 25, 2022
Demo for my talk at ArgoCon '21 showing how to use Go to create and submit dynamic Argo Workflows.

argocon-21-demo Demo for my talk at ArgoCon '21 showing how to use Go to create and submit dynamic Argo Workflows. This repo implements a Go-based CLI

null 3 Jun 9, 2022
Services-inoeg - The Kiebitz Backend Services. Still a work-in-progess, use with care!

Kiebitz Services This repository contains Kiebitz's backend services: A storage service that stores encrypted user & operator settings and temporary d

Kiebitz! 0 Jan 19, 2022
Rpcx-framework - An RPC microservices framework based on rpcx, simple and easy to use, ultra fast and efficient, powerful, service discovery, service governance, service layering, version control, routing label registration.

RPCX Framework An RPC microservices framework based on rpcx. Features: simple and easy to use, ultra fast and efficient, powerful, service discovery,

ZYallers 1 Jan 5, 2022
Just a quick demo of how you can use automatically generated protobuffer and gRPC code from buf.build

buf.build demo The purpose of this repository is to demonstrate how to use the services offered by buf.build for hosting protobuffer definitions and a

Bjørn Borud 0 Jan 4, 2022