REST server to interact with FrostFS.
--- [![Report](https://goreportcard.com/badge/git.frostfs.info/TrueCloudLab/frostfs-rest-gw)](https://goreportcard.com/report/git.frostfs.info/TrueCloudLab/frostfs-rest-gw) # frostfs-rest-gw FrostFS REST Gateway bridges FrostFS internal protocol and REST API server. ## Installation ### Building Before building make sure you have the following tools: * go * make * git * curl * docker First clone this repository: ```shell $ git clone https://git.frostfs.info/TrueCloudLab/frostfs-rest-gw ``` Then run make to build `bin/frostfs-rest-gw` binary: ```shell $ make ``` Or you can build it using docker: ```shell $ make docker/all ``` #### Generate go-swagger boilerplate code If you change the [spec file](./spec/rest.yaml) you have to re-generate go-swagger server code. You have several approaches: 1. Run make. It automatically downloads `swagger` and generates boilerplate. ```shell $ make ``` 2. Generate code separately: ```shell $ make generate-server ``` Or using docker: ```shell $ make docker/generate-server ``` #### Other targets Notable make targets: ``` dep Check and ensure dependencies image Build clean docker image image-dirty Build dirty docker image with host-built binaries formats Run all code formatters lint Run linters version Show current version generate-server Generate boilerplate by spec ``` ### Docker Or you can also use a [Docker image](https://hub.docker.com/r/truecloudlab/frostfs-rest-gw) provided for released (and occasionally unreleased) versions of gateway (`:latest` points to the latest stable release). ## Execution REST gateway itself is not a FrostFS node, so to access FrostFS it uses node's gRPC interface and you need to provide some node that it will connect to. This can be done either via `-p` parameter or via `REST_GW_POOL_PEERS_