-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8af940e
commit 62b31eb
Showing
2 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,3 +180,52 @@ message Change { | |
string name = 2; | ||
} | ||
} | ||
|
||
|
||
message StoreChange { | ||
repeated StoreChangeContent changeSet = 1; | ||
} | ||
|
||
message StoreChangeContent { | ||
oneof change { | ||
DocumentCreate create = 1; | ||
DocumentModify modify = 2; | ||
DocumentDelete delete = 3; | ||
} | ||
} | ||
|
||
message DocumentCreate { | ||
string collection = 1; | ||
string documentId = 2; | ||
// json | ||
string value = 3; | ||
} | ||
|
||
message DocumentModify { | ||
string collection = 1; | ||
string documentId = 2; | ||
repeated KeyModify keys = 4; | ||
} | ||
|
||
message KeyModify { | ||
// key path; example: [user, email] | ||
repeated string keyPath = 1; | ||
// modify op: set, unset, inc, etc. | ||
ModifyOp modifyOp = 3; | ||
// json value; example: '"[email protected]"' | ||
string modifyValue = 4; | ||
} | ||
|
||
enum ModifyOp { | ||
Set = 0; | ||
Unset = 1; | ||
Inc = 2; | ||
AddToSet = 3; | ||
Pull = 4; | ||
} | ||
|
||
message DocumentDelete { | ||
string collection = 1; | ||
string documentId = 2; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters