Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.13 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.13 KB

lxc-go-http-api

An api to create and manage lxc through HTTP.

Buildind

From the root source tree :

make

Using

From the root source tree :

bin/lxc-go-http-api

After that, API listen on port 8000.

Documentation

API documentation is in OpenAPI 2.0 format and generated with go-swagger command.

At the moment, there is two ways to access documentation :

  • Read it to JSON format (docs/swagger.json) or copy-paste JSON content in Swagger editor
  • Run application from source tree (bin/lxc-go-http-api) and access documentation from this URL : http://server:8000/docs

To access documentation from application we used a Redoc middleware.

If you need to generate documentation, get go-swagger command:

go get -u github.com/go-swagger/go-swagger/cmd/[email protected]

From the root source tree, run :

make swagger-generate
make swagger-validate

Or:

make docs