Skip to content

Instantly share code, notes, and snippets.

@csuwildcat
Last active April 26, 2023 18:21
Show Gist options
  • Save csuwildcat/40322791c7f70c45476b2d044d7e581d to your computer and use it in GitHub Desktop.
Save csuwildcat/40322791c7f70c45476b2d044d7e581d to your computer and use it in GitHub Desktop.
{
"method": "ProtocolsConfigure",
"protocol": "https://tbd.website/protocols/photoProtocol",
"protocolVersion": "1.0.0",
"protocolDefinition": {
"labels": {
"album": {
"schema": "https://tbd.website/protocols/photoProtocol/Album",
"dataFormat": [
"application/json"
]
},
"photo": {
"schema": "https://tbd.website/protocols/photoProtocol/Photo",
"dataFormat": [
"application/json"
]
},
"imageBinary": {
"schema": "https://tbd.website/protocols/photoProtocol/ImageBinary",
"dataFormat": [
"application/octet-stream"
]
}
},
"records": {
"album": {
"encryption": "required",
"allow": {
"anyone": {
"to": ["create", "read"]
},
"author": {
"of": "album",
"to": ["update", "delete"]
}
},
"records": {
"photo": {
"encryption": "required",
"allow": {
"author": {
"of": "album",
"to": ["create", "read"]
},
"anyone": {
"to": ["read"]
},
"author": {
"of": "photo",
"to": ["update", "delete"]
}
},
"records": {
"imageBinary": {
"encryption": "required",
"allow": {
"recipient": {
"of": "photo",
"to": ["read"]
},
"author": {
"of": "photo",
"to": ["create", "update", "delete"]
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment