core-lightning/doc/schemas/datastore.request.json

49 lines
1.7 KiB
JSON
Raw Normal View History

2022-04-01 14:42:45 +10:30
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
2022-04-01 14:42:45 +10:30
"required": [
"key"
],
"properties": {
"key": {
"description": "a key can either have children or a value, never both: parents are created and removed automatically",
"oneOf": [
{
"type": "array",
"description": "an array of values to form a hierarchy (though a single value is treated as a one-element array). Using the first element of the key as the plugin name (e.g. `[ 'summary' ]`) is recommended",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"string": {
"type": "string",
"description": "data to be saved in string format"
2022-04-01 14:42:45 +10:30
},
"hex": {
"type": "hex",
"description": "data to be saved in hex format"
2022-04-01 14:42:45 +10:30
},
"mode": {
"type": "string",
"description": "\t- `must-create`: fails if it already exists.\t- `must-replace`: fails if it doesn't already exist.\t- `create-or-replace`: never fails.\t- `must-append`: must already exist, append this to what's already there.\t- `create-or-append`: append if anything is there, otherwise create.\tDefault is `must-create`",
2022-04-01 14:42:45 +10:30
"enum": [
"must-create",
"must-replace",
"create-or-replace",
"must-append",
"create-or-append"
]
2022-04-01 14:42:45 +10:30
},
"generation": {
"type": "u64",
"description": "if specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with *mode* `must-replace` or `must-append`"
2022-04-01 14:42:45 +10:30
}
}
}