Kong Api Gateway Plugins for golang

Prerequisites:

  1. Windows Docker.

Build Command:

docker build -t kong-plugins .

Run Command:

docker run -ti --rm --name kong-plugins -e "KONG_DATABASE=off" -e "KONG_GO_PLUGINS_DIR=/tmp/kong-plugins" -e "KONG_DECLARATIVE_CONFIG=/tmp/config.yml" -e "KONG_PLUGINS=auth-plugin,correlation-plugin" -e "KONG_PROXY_LISTEN=0.0.0.0:8000" -p 8000:8000 kong-plugins

Other Useful Docker Commands:

  1. docker ps
  2. docker ps -a
  3. docker system prune
  4. docker image prune
  5. docker inspect [YOUR_CONTAINER_ID]

Method Definitions

  1. Certificate: Executed during the SSL certificate serving phase of the SSL handshake.
  2. Rewrite: Executed for every request upon its reception from a client as a rewrite phase handler
  3. Access: Executed for every request from a client and before it is being proxied to the upstream service. Response: Executed after the whole response has been received from the upstream service, but before sending any part of it to the client.
  4. Preread: Executed once for every connection
  5. Log: Executed once for each connection after it has been closed.

References

  1. https://levelup.gitconnected.com/kong-custom-plugin-development-using-go-abab906b89b4
  2. https://master--kongdocs.netlify.app/gateway-oss/2.1.x/go/
  3. https://pkg.go.dev/github.com/Kong/[email protected]/service/request#pkg-overview
Owner
Karan Gupta
Experienced Full Stack Developer with a demonstrated history of working in the IT industry. Skilled in writing high-performance microservices using Node.js.
Karan Gupta
Similar Resources

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

NovelAI Research Tool and API implementations in Golang

NovelAI Research Tool - nrt A golang based client with: Minimum Viable Product implementation of a NovelAI service API client covering: /user/login -

Dec 14, 2022

Rest API for todoapp written in Golang, using clean architecture, CI/CD

Rest API for todoapp written in Golang, using clean architecture, CI/CD

todoapp-backend Rest API for todoapp written in Golang, using Clean Architecture and CI/CD (includes unit tests and integration tests). Using: Web fra

Oct 23, 2022

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 clon

Nov 8, 2021

Book-API was made using Golang and PostgreSQL with technique CRUD with mux and pq

Book-API CRUD with PostgreSQL Table of contents 👀 General info Technologies Blog Setup General info BAPI or Book-API is a Golang REST API made to sho

Feb 18, 2022
Golang Integration Testing Framework For Kong Kubernetes APIs and Controllers.
Golang Integration Testing Framework For Kong Kubernetes APIs and Controllers.

Kong Kubernetes Testing Framework (KTF) Testing framework used by the Kong Kubernetes Team for the Kong Kubernetes Ingress Controller (KIC). Requireme

Dec 20, 2022
Kubernetes plugins for EdgeGallery

Plugins 介绍 the edgegallery plugins repo 软件架构 软件架构说明 安装教程 xxxx xxxx xxxx 使用说明 xxxx xxxx xxxx 参与贡献 Fork 本仓库 新建 Feat_xxx 分支 提交代码 新建 Pull Request 码云特技 使用

Dec 28, 2021
Go Support Code For Writing Falcosecurity Plugins

plugin-sdk-go Go package to facilitate writing Falco/Falco libs plugins. Before using this package, review the developer's guide which fully documents

Sep 20, 2021
Installs containerd on Windows, optionally with default CNI plugins

containerd-installer Installs containerd on Windows, optionally with default CNI plugins Usage NAME: containerd-installer.exe - Install containerd

Nov 27, 2022
This is kubectl-plugins repository
This is kubectl-plugins repository

golang CLI Template golang project template for building CLI Setup Setup by Command git clone https://github.com/mpppk/cli-template your_awesome_tool

Dec 20, 2021
This is a shell gateway-api controller

gateway-api-controller This is an initial implementation of the various controllers required in order to manage Gateway API network deployments within

May 4, 2023
Web gateway for OCI artifacts
Web gateway for OCI artifacts

Containerbay Web gateway for OCI artifacts Container images gateway browser and indexer Website static server - Reverse Container image browser Contai

Jan 10, 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