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 version 5 of NGINX Plus API. Version 5 was introduced in NGINX Plus R19.
- 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
- golang
- Make
- NGINX Plus license - put
nginx-repo.crt
andnginx-repo.key
into thedocker
folder.
Run Tests:
$ make docker-build && 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
This project is not covered by the NGINX Plus support contract.