1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

WIP fix tests and key value

This commit is contained in:
Mikhail Rakhmanov 2025-04-11 22:31:55 +02:00
parent 5d2e7ce5fe
commit 21b0b9e835
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
7 changed files with 152 additions and 32 deletions

View file

@ -2033,7 +2033,7 @@ type StoreKeyInner struct {
Peer []byte `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
TimestampMilli int64 `protobuf:"varint,4,opt,name=timestampMilli,proto3" json:"timestampMilli,omitempty"`
TimestampMicro int64 `protobuf:"varint,4,opt,name=timestampMicro,proto3" json:"timestampMicro,omitempty"`
AclHeadId string `protobuf:"bytes,5,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"`
Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
}
@ -2100,9 +2100,9 @@ func (m *StoreKeyInner) GetValue() []byte {
return nil
}
func (m *StoreKeyInner) GetTimestampMilli() int64 {
func (m *StoreKeyInner) GetTimestampMicro() int64 {
if m != nil {
return m.TimestampMilli
return m.TimestampMicro
}
return 0
}
@ -2293,8 +2293,8 @@ var fileDescriptor_80e49f1f4ac27799 = []byte{
0x4e, 0x99, 0x6e, 0xa6, 0x22, 0xd2, 0x8c, 0xd7, 0x5c, 0x21, 0x5e, 0x78, 0x1f, 0xea, 0x05, 0x93,
0x19, 0xba, 0x25, 0x6d, 0x4e, 0x01, 0xe5, 0xbc, 0x19, 0xc4, 0x02, 0x35, 0xc9, 0x49, 0xf1, 0x8f,
0x86, 0xf7, 0x9d, 0x28, 0xa2, 0x89, 0x58, 0x20, 0xc2, 0x8c, 0xec, 0x05, 0x2d, 0xce, 0x85, 0xa5,
0x66, 0x8f, 0x2c, 0x35, 0x1d, 0x8f, 0x92, 0x19, 0x8f, 0xab, 0x50, 0xd7, 0x9b, 0xed, 0x20, 0x08,
0xc3, 0x40, 0xba, 0x58, 0x22, 0x23, 0x58, 0x11, 0x6b, 0x55, 0x65, 0xda, 0xcb, 0x1c, 0x81, 0x1c,
0x66, 0x8f, 0x2c, 0x35, 0x1d, 0x8f, 0x92, 0x19, 0x8f, 0xab, 0x50, 0xd7, 0x9b, 0xed, 0x20, 0xf0,
0x92, 0x58, 0xba, 0x58, 0x22, 0x23, 0x58, 0x11, 0x6b, 0x55, 0x65, 0xda, 0xcb, 0x1c, 0x81, 0x1c,
0x28, 0x3d, 0xa3, 0x43, 0xb9, 0xa9, 0xaa, 0x44, 0x1c, 0xf1, 0x83, 0xd4, 0x5c, 0xf7, 0xf4, 0x1f,
0x98, 0xa3, 0x1b, 0x7f, 0x58, 0x50, 0xd9, 0x4b, 0x92, 0x9d, 0xd8, 0xa7, 0x0c, 0xd5, 0x01, 0x1e,
0x47, 0xf4, 0xbc, 0x4f, 0x3d, 0x4e, 0x7d, 0x67, 0x06, 0x39, 0xea, 0x6d, 0x73, 0x10, 0x30, 0x16,
@ -2322,7 +2322,7 @@ var fileDescriptor_80e49f1f4ac27799 = []byte{
0xd7, 0x71, 0x5c, 0x2c, 0xec, 0x45, 0x34, 0xc2, 0x31, 0xb6, 0x7d, 0x9b, 0xed, 0xe9, 0x04, 0xa9,
0xcc, 0xbb, 0xef, 0xff, 0xfc, 0xaa, 0x65, 0xbd, 0x7c, 0xd5, 0xb2, 0x7e, 0x7f, 0xd5, 0xb2, 0xbe,
0x7f, 0xdd, 0x9a, 0x79, 0xf9, 0xba, 0x35, 0xf3, 0xdb, 0xeb, 0xd6, 0xcc, 0x67, 0xcd, 0xe9, 0xff,
0x91, 0x39, 0x2e, 0xcb, 0x9f, 0x9b, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xe8, 0x68, 0xd7,
0x91, 0x39, 0x2e, 0xcb, 0x9f, 0x9b, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x8f, 0x50, 0x36,
0xb6, 0x11, 0x00, 0x00,
}
@ -3591,8 +3591,8 @@ func (m *StoreKeyInner) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x2a
}
if m.TimestampMilli != 0 {
i = encodeVarintSpacesync(dAtA, i, uint64(m.TimestampMilli))
if m.TimestampMicro != 0 {
i = encodeVarintSpacesync(dAtA, i, uint64(m.TimestampMicro))
i--
dAtA[i] = 0x20
}
@ -4243,8 +4243,8 @@ func (m *StoreKeyInner) Size() (n int) {
if l > 0 {
n += 1 + l + sovSpacesync(uint64(l))
}
if m.TimestampMilli != 0 {
n += 1 + sovSpacesync(uint64(m.TimestampMilli))
if m.TimestampMicro != 0 {
n += 1 + sovSpacesync(uint64(m.TimestampMicro))
}
l = len(m.AclHeadId)
if l > 0 {
@ -7933,9 +7933,9 @@ func (m *StoreKeyInner) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TimestampMilli", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field TimestampMicro", wireType)
}
m.TimestampMilli = 0
m.TimestampMicro = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSpacesync
@ -7945,7 +7945,7 @@ func (m *StoreKeyInner) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.TimestampMilli |= int64(b&0x7F) << shift
m.TimestampMicro |= int64(b&0x7F) << shift
if b < 0x80 {
break
}