core-lightning/doc/schemas/datastore.schema.json
Rusty Russell 533571a655 datastore: add generation, simple atomicity.
We add a generation counter, and allow update or del conditional
on a given generation.

Formalizes error codes, too, since we have more now.

Suggested-by: @shesek
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-25 10:06:31 +02:00

25 lines
725 B
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [ "key", "hex", "generation" ],
"properties": {
"key": {
"type": "string",
"description": "The key which has been added to the datastore"
},
"generation": {
"type": "u64",
"description": "The number of times this has been updated"
},
"hex": {
"type": "hex",
"description": "The hex data which has been added to the datastore"
},
"string": {
"type": "string",
"description": "The data as a string, if it's valid utf-8"
}
}
}