This repository contains a basic Apache APISIX plugin template to help you get started with Apache APISIX plugin development.
This template was designed to work with the GitHub Action development environments.
Before we dive into plugin development and everything related to it, a brief look at the GitHub Template is in order
All you need to do is click the Use this template
button (you must be logged in with your GitHub account).
After using the template to create your own blank custom plugin project, the project is ready to be cloned to your local environment and development.
.
├── .github/ GitHub Actions workflows and Dependabot configuration files
├── apisix All files in this folder will be copied and overwrite the original APISIX
│ └── plugins/ Plugin source
├── ci All files in this folder will be copied and overwrite the original APISIX
│ └── utils/ CI utils script folder
├── t/ Test case folder
├── LICENSE
├── Makefile
└── README.md README
The prepared plugin template provides as little code as possible because it is impossible for a general scaffold to fulfill all the specific requirements for all types of plugins. Therefore, the template contains only the following files:
.
├── apisix
│ └── plugins/
│ └── demo.lua
└── t
└── demo/
└── demo.t
To start with the actual implementation, you may check our APISIX Plugin Deveolpment, which contains an introduction to the essential parts of the plugin development.
Testing plugins is an essential part of the plugin development to make sure that everything works as expected.
Continuous integration (CI) depends on GitHub Actions, a set of workflows that make it possible to automate your testing process. Thanks to such automation, you can delegate the testing and verification phases to the CI and instead focus on development (and writing more tests).
In the .github/workflows
directory, you can find definitions for the following GitHub Actions workflows: