Merge pull request 'Added docs for rust backend' (#1) from docs into master
Reviewed-on: #1
This commit is contained in:
commit
7b4627e4a7
84
docs/backend/README.md
Normal file
84
docs/backend/README.md
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
# BingoBongo Backend
|
||||||
|
|
||||||
|
## JSON API
|
||||||
|
|
||||||
|
### Objects
|
||||||
|
|
||||||
|
---
|
||||||
|
BingoSquare
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"option": "String"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
BingoBoard
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"size": 9,
|
||||||
|
"squares": [
|
||||||
|
<BingoSquare>,
|
||||||
|
<BingoSquare>,
|
||||||
|
...,
|
||||||
|
<BingoSquare>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
Meta
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "String",
|
||||||
|
"description": "String"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
BingoPool
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"meta": Meta,
|
||||||
|
"squares": [
|
||||||
|
<BingoSquare>,
|
||||||
|
<BingoSquare>,
|
||||||
|
...,
|
||||||
|
<BingoSquare>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Config
|
||||||
|
Config is loaded from `~/.local/bingobongo.toml`
|
||||||
|
|
||||||
|
Config default is:
|
||||||
|
```toml
|
||||||
|
working_dir = "/path/to/working/dir"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running
|
||||||
|
Currently the backend loads the bingo datasets from the `{working_dir}/pools/` directory, they are just toml files with the following syntax
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[meta]
|
||||||
|
name = 'Name of pool'
|
||||||
|
description = 'Description of pool'
|
||||||
|
|
||||||
|
[[squares]]
|
||||||
|
option = 'First square'
|
||||||
|
|
||||||
|
[[squares]]
|
||||||
|
option = 'Second square'
|
||||||
|
|
||||||
|
[[squares]]
|
||||||
|
option = 'Third square'
|
||||||
|
|
||||||
|
[[squares]]
|
||||||
|
option = 'Fourth square'
|
||||||
|
|
||||||
|
[[squares]]
|
||||||
|
option = 'Fifth square'
|
||||||
|
```
|
||||||
|
|
||||||
|
Having the same header `[[]]` puts them in a list
|
||||||
|
|
||||||
|
Both the config and a single dataset is required
|
||||||
Loading…
x
Reference in New Issue
Block a user