# README
parvati-api-client
Golang command line client for Parvati's API. Alpha quality. There be bugs.
Also the interface types are still not quite stable at this point as the API needs still has some hisoutensoku specific attributes in it (e.g. roll-version).
Overview
This should repo contains an implementation of the Parvati interface in golang, as well as a command line client which uses it.
Configuration for the interface can be done from the command line and
from a gitconfig
file local to your home directory (or specified).
Todo: Allow .netrc
style password loading rather than relying on the
config file. Perhaps find modules to integrate with OS specific password
managers.
For more info run the resultant binary with --help
.
The main entry is held in api.go
, and can be configured with api_config.go
.
All other files are auto-generated swagger.
Building
Clone this repository, then you can
go build ./cmd/client
This will place the output client binary in the current directory.
API info
The backend API for posting hosts and waiting for hosts was all generated by the swagger-codegen project back in 2016.
It's all pretty horrid and should be updated; along with the original yaml file, but at this point probably never will. Another option would be to move to RAML and generate from that.
Eventually more of the auto-generated copy-pasta in the *_api.go
files
will be re-factored and pulled in to api.go
.
Testing
First set API_TEST_CONFIG
to point to a gitconfig
format file containing
your URI and credentials. Then run
go test ./pkg/parvatigo
Currently there's only one test (creating an unregistered user). Lots more to do here; but somewhat pointless until the backend server is also opensourced.
Swagger-generated version info
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-08-25T21:39:23.027Z
- Build package: class io.swagger.codegen.languages.GoClientCodegen