commit | 83efb54442175d2f3c08491d549a62f02cf30895 | [log] [tgz] |
---|---|---|
author | Scott Ganyo <scott@ganyo.com> | Tue Jan 17 14:24:41 2017 -0800 |
committer | Scott Ganyo <scott@ganyo.com> | Tue Jan 17 14:24:41 2017 -0800 |
tree | 2223dbeddfe0c090099ef83df3812dc363e409d6 | |
parent | 49e2ef8be11700ca9e66b0d4042b03093b26f9b7 [diff] |
Remove and ignore glide.lock
This core plugin for apid responds to apidApigeeSync events and publishes an API that allows clients to deploy and update a locally configured gateway.
This plugin simply tracks counters based on called URIs:
GET /deployments/
- retrieve current deploymentPOST /deployments/
- update deploymentsSee apidGatewayDeploy-api.yaml for full spec.
First, install prerequisites:
glide install
To run an apid test instance with just this plugin installed, change to the cmd/apidGatewayDeploy
folder. From here, you may create an executable with:
go build
Alternatively, you may run without creating an executable with:
go run main.go
Command line options:
If you use the -deployments
option, the server will start using a clean database that contains only the deployments contained in the file specified.
The file should be the JSON for an array of deployments. JSON format is:
[ { "id": "", "scopeId": "", "created": "", "createdBy": "", "updated": "", "updatedBy": "", "configuration": { "key": "value" }, "bundleConfiguration": { "key": "value" }, "displayName": "", "uri": "" } ]
Notes:
Once the process is running, you should be able to manually give the plugin's API a whirl...
curl -i localhost:9000/deployments/ curl -i -X POST localhost:9000/deployments -d '{ ... }'
The following may be interesting env vars for configuration:
To run the tests, just run:
go test
To generate coverage, you may run:
./cover.sh
Then open cover.html
with your browser to see details.