This project includes a client library for working with NGINX Plus API.
client/nginx.go
includes functions and data structures for working with NGINX Plus API as well as some helper
functions.
This Client works against versions 4 to 9 of the NGINX Plus API. The table below shows the version of NGINX Plus where the API was first introduced.
API version | NGINX Plus version |
---|---|
4 | R18 |
5 | R19 |
6 | R20 |
7 | R25 |
8 | R27 |
9 | R30 |
- Import
github.com/nginxinc/nginx-plus-go-client/client
into your go project. - Use your favorite vendor tool to add this to your
/vendor
directory in your project.
cd client
go test
Prerequisites:
- Docker
- Docker Compose
- golang
- Make
- NGINX Plus license - put
nginx-repo.crt
andnginx-repo.key
into thedocker
folder.
Run Tests:
make test
This will build and run two NGINX Plus containers and create one docker network of type bridge, execute the client tests
against both NGINX Plus APIs, and then clean up. If it fails and you want to clean up (i.e. stop the running containers
and remove the docker network), please use make clean
We’d like to hear your feedback! If you have any suggestions or experience issues with the NGINX Plus Go Client, please create an issue or send a pull request on GitHub. You can contact us directly via integrations@nginx.com or on the NGINX Community Slack.
If you'd like to contribute to the project, please read our Contributing guide.
This project is not covered by the NGINX Plus support contract.