shiroko
is a HTTP microservice for record a leaderboard (in this case, used for a donation board... and wisely hardcoded for it) with a conventional HTTP interface
redis
- Configuration
reference: https://rocket.rs/v0.5-rc/guide/configuration/#configuration
- Configurable keys
rdscs
/ROCKET_RDSCS
*: Redis connection string (not include database name? Not confirmed on ACL-partritioned Redis). reference: https://docs.rs/redis/latest/redis/#connection-parametersrdsn
/ROCKET_RDSN
default=redkiy
: Sorted KV set name * field is required
- request
GET / HTTP/1.1
- response schema
interface Schema {
Err?: string;
Ok: {
who: string;
did: number;
}[];
}
- request
PUT / HTTP/1.1
Content-Type: application/json
{
"who": "string",
"did": 1000
}
- response schema
interface Schema {
Err?: string;
Ok: number;
}
- request
POST / HTTP/1.1
Content-Type: application/json
{
"who": "string",
"did": 1000
}
- response schema
interface Schema {
Err?: string;
Ok: number;
}
PATCH / HTTP/1.1
Content-Type: application/json
{
"from": "jane",
"to": "john"
}
- response schema
interface Schema {
Err?: string;
Ok: number;
}