-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: versioned protobufs #32
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
daa2118
feat: minor refactoring. move formatSchemaType to utils.js
d2ae537
chore: update schemasPrefix.js
cae214d
feat: version protobufs. contemplate invalid schemaVersion on tests
3e33597
feat: fromPartial on encoding to allow optional lists on input
5668f73
feat: throw error if invalid type_schemaVersion on decoding
0527860
feat: add formatSchemaType on utils to get key to schemas
4bab3a0
feat: add preset and filter proto and make semi-working example for both
549197e
feat: build versioning of schemas from filesystem instead of on schemas
89965ac
feat:
4348219
chore: solved minor type error
17750cf
feat: handle type casing with schemaPrefix
88653d8
chore: logic error on `inheritsFromCommon`
2193743
feat: add tests for many doc types. Test present fields and values
ffd7b25
feat: add coreOwnership and device schema
760a9fe
feat: add schema for role
604161c
feat: add testing for validation of JSONSchema docs
670cc9e
feat: created_at is saved as Timestamp on protobuf
4cdcb4a
feat: timestamp is saved as Timestamp on protobuf
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
syntax = "proto3"; | ||
package mapeo; | ||
|
||
import "google/protobuf/struct.proto"; | ||
import "common/v1.proto"; | ||
|
||
message CoreOwnership_1 { | ||
Common_1 common = 1; | ||
string action = 2; | ||
string coreId = 3; | ||
string projectId = 4; | ||
string storeType = 5; | ||
string signature = 6; | ||
int32 authorIndex = 7; | ||
int32 deviceIndex = 8; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
syntax = "proto3"; | ||
package mapeo; | ||
|
||
import "google/protobuf/struct.proto"; | ||
import "common/v1.proto"; | ||
|
||
message Device_1 { | ||
Common_1 common = 1; | ||
string action = 2; | ||
string authorId = 3; | ||
string projectId = 4; | ||
string signature = 5; | ||
int32 authorIndex = 6; | ||
int32 deviceIndex = 7; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
package mapeo; | ||
|
||
import "google/protobuf/any.proto"; | ||
|
||
message Field_1 { | ||
bytes id = 1; | ||
// keys can be an array of strings or a string | ||
google.protobuf.Any key = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
syntax = "proto3"; | ||
package mapeo; | ||
|
||
import "google/protobuf/struct.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
message Filter_1 { | ||
bytes id = 1; | ||
google.protobuf.Timestamp created_at = 2; | ||
repeated string filter = 3; | ||
string name = 4; | ||
optional google.protobuf.Timestamp timestamp = 5; | ||
optional string userId = 6; | ||
optional string deviceId = 7; | ||
repeated string links = 8; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could catch this before it gets to the encode step. Is this only applicable to required arrays?