mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Add datatype and check for periodicsync
This commit is contained in:
parent
b7f39c114f
commit
10687d2dc1
9 changed files with 131 additions and 50 deletions
|
@ -20,6 +20,7 @@ type BuilderContent struct {
|
|||
ReadKey crypto.SymKey
|
||||
Content []byte
|
||||
Timestamp int64
|
||||
DataType string
|
||||
}
|
||||
|
||||
type InitialContent struct {
|
||||
|
@ -169,6 +170,7 @@ func (c *changeBuilder) Build(payload BuilderContent) (ch *Change, rawIdChange *
|
|||
Timestamp: payload.Timestamp,
|
||||
Identity: identity,
|
||||
IsSnapshot: payload.IsSnapshot,
|
||||
DataType: payload.DataType,
|
||||
}
|
||||
if payload.ReadKey != nil {
|
||||
var encrypted []byte
|
||||
|
@ -225,6 +227,7 @@ func (c *changeBuilder) Marshall(ch *Change) (raw *treechangeproto.RawTreeChange
|
|||
Timestamp: ch.Timestamp,
|
||||
Identity: identity,
|
||||
IsSnapshot: ch.IsSnapshot,
|
||||
DataType: ch.DataType,
|
||||
}
|
||||
var marshalled []byte
|
||||
marshalled, err = treeChange.Marshal()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue