Update aclrecordproto

This commit is contained in:
mcrakhman 2023-03-22 18:51:01 +01:00
parent d20f5fc2b3
commit 18240ea5ef
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B
4 changed files with 255 additions and 532 deletions

View File

@ -174,7 +174,7 @@ type AclRecord struct {
PrevId string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"` PrevId string `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"`
Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
CurrentReadKeyHash uint64 `protobuf:"varint,4,opt,name=currentReadKeyHash,proto3" json:"currentReadKeyHash,omitempty"` ReadKeyId string `protobuf:"bytes,4,opt,name=readKeyId,proto3" json:"readKeyId,omitempty"`
Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
} }
@ -232,11 +232,11 @@ func (m *AclRecord) GetData() []byte {
return nil return nil
} }
func (m *AclRecord) GetCurrentReadKeyHash() uint64 { func (m *AclRecord) GetReadKeyId() string {
if m != nil { if m != nil {
return m.CurrentReadKeyHash return m.ReadKeyId
} }
return 0 return ""
} }
func (m *AclRecord) GetTimestamp() int64 { func (m *AclRecord) GetTimestamp() int64 {
@ -248,12 +248,11 @@ func (m *AclRecord) GetTimestamp() int64 {
type AclRoot struct { type AclRoot struct {
Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
SpaceId string `protobuf:"bytes,3,opt,name=spaceId,proto3" json:"spaceId,omitempty"` EncryptedReadKey []byte `protobuf:"bytes,3,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"`
EncryptedReadKey []byte `protobuf:"bytes,4,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"` DerivationScheme string `protobuf:"bytes,4,opt,name=derivationScheme,proto3" json:"derivationScheme,omitempty"`
DerivationScheme string `protobuf:"bytes,5,opt,name=derivationScheme,proto3" json:"derivationScheme,omitempty"` CurrentReadKeyHash uint64 `protobuf:"varint,5,opt,name=currentReadKeyHash,proto3" json:"currentReadKeyHash,omitempty"`
CurrentReadKeyHash uint64 `protobuf:"varint,6,opt,name=currentReadKeyHash,proto3" json:"currentReadKeyHash,omitempty"` Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Timestamp int64 `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
} }
func (m *AclRoot) Reset() { *m = AclRoot{} } func (m *AclRoot) Reset() { *m = AclRoot{} }
@ -296,13 +295,6 @@ func (m *AclRoot) GetIdentity() []byte {
return nil return nil
} }
func (m *AclRoot) GetEncryptionKey() []byte {
if m != nil {
return m.EncryptionKey
}
return nil
}
func (m *AclRoot) GetSpaceId() string { func (m *AclRoot) GetSpaceId() string {
if m != nil { if m != nil {
return m.SpaceId return m.SpaceId
@ -508,7 +500,7 @@ func (m *AclData) GetAclContent() []*AclContentValue {
} }
type AclState struct { type AclState struct {
ReadKeyHashes []uint64 `protobuf:"varint,1,rep,packed,name=readKeyHashes,proto3" json:"readKeyHashes,omitempty"` ReadKeyIds []string `protobuf:"bytes,1,rep,name=readKeyIds,proto3" json:"readKeyIds,omitempty"`
UserStates []*AclUserState `protobuf:"bytes,2,rep,name=userStates,proto3" json:"userStates,omitempty"` UserStates []*AclUserState `protobuf:"bytes,2,rep,name=userStates,proto3" json:"userStates,omitempty"`
Invites map[string]*AclUserInvite `protobuf:"bytes,3,rep,name=invites,proto3" json:"invites,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Invites map[string]*AclUserInvite `protobuf:"bytes,3,rep,name=invites,proto3" json:"invites,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
} }
@ -546,9 +538,9 @@ func (m *AclState) XXX_DiscardUnknown() {
var xxx_messageInfo_AclState proto.InternalMessageInfo var xxx_messageInfo_AclState proto.InternalMessageInfo
func (m *AclState) GetReadKeyHashes() []uint64 { func (m *AclState) GetReadKeyIds() []string {
if m != nil { if m != nil {
return m.ReadKeyHashes return m.ReadKeyIds
} }
return nil return nil
} }
@ -569,8 +561,7 @@ func (m *AclState) GetInvites() map[string]*AclUserInvite {
type AclUserState struct { type AclUserState struct {
Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` Permissions AclUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"`
Permissions AclUserPermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"`
} }
func (m *AclUserState) Reset() { *m = AclUserState{} } func (m *AclUserState) Reset() { *m = AclUserState{} }
@ -613,13 +604,6 @@ func (m *AclUserState) GetIdentity() []byte {
return nil return nil
} }
func (m *AclUserState) GetEncryptionKey() []byte {
if m != nil {
return m.EncryptionKey
}
return nil
}
func (m *AclUserState) GetPermissions() AclUserPermissions { func (m *AclUserState) GetPermissions() AclUserPermissions {
if m != nil { if m != nil {
return m.Permissions return m.Permissions
@ -629,9 +613,8 @@ func (m *AclUserState) GetPermissions() AclUserPermissions {
type AclUserAdd struct { type AclUserAdd struct {
Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,2,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"`
EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` Permissions AclUserPermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"`
Permissions AclUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"`
} }
func (m *AclUserAdd) Reset() { *m = AclUserAdd{} } func (m *AclUserAdd) Reset() { *m = AclUserAdd{} }
@ -674,13 +657,6 @@ func (m *AclUserAdd) GetIdentity() []byte {
return nil return nil
} }
func (m *AclUserAdd) GetEncryptionKey() []byte {
if m != nil {
return m.EncryptionKey
}
return nil
}
func (m *AclUserAdd) GetEncryptedReadKeys() [][]byte { func (m *AclUserAdd) GetEncryptedReadKeys() [][]byte {
if m != nil { if m != nil {
return m.EncryptedReadKeys return m.EncryptedReadKeys
@ -697,9 +673,8 @@ func (m *AclUserAdd) GetPermissions() AclUserPermissions {
type AclUserInvite struct { type AclUserInvite struct {
AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"` AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"`
EncryptSymKeyHash uint64 `protobuf:"varint,2,opt,name=encryptSymKeyHash,proto3" json:"encryptSymKeyHash,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,2,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"`
EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` Permissions AclUserPermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"`
Permissions AclUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.AclUserPermissions" json:"permissions,omitempty"`
} }
func (m *AclUserInvite) Reset() { *m = AclUserInvite{} } func (m *AclUserInvite) Reset() { *m = AclUserInvite{} }
@ -742,13 +717,6 @@ func (m *AclUserInvite) GetAcceptPublicKey() []byte {
return nil return nil
} }
func (m *AclUserInvite) GetEncryptSymKeyHash() uint64 {
if m != nil {
return m.EncryptSymKeyHash
}
return 0
}
func (m *AclUserInvite) GetEncryptedReadKeys() [][]byte { func (m *AclUserInvite) GetEncryptedReadKeys() [][]byte {
if m != nil { if m != nil {
return m.EncryptedReadKeys return m.EncryptedReadKeys
@ -893,8 +861,7 @@ func (m *AclUserRemove) GetReadKeyReplaces() []*AclReadKeyReplace {
type AclReadKeyReplace struct { type AclReadKeyReplace struct {
Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` EncryptedReadKey []byte `protobuf:"bytes,2,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"`
EncryptedReadKey []byte `protobuf:"bytes,3,opt,name=encryptedReadKey,proto3" json:"encryptedReadKey,omitempty"`
} }
func (m *AclReadKeyReplace) Reset() { *m = AclReadKeyReplace{} } func (m *AclReadKeyReplace) Reset() { *m = AclReadKeyReplace{} }
@ -937,13 +904,6 @@ func (m *AclReadKeyReplace) GetIdentity() []byte {
return nil return nil
} }
func (m *AclReadKeyReplace) GetEncryptionKey() []byte {
if m != nil {
return m.EncryptionKey
}
return nil
}
func (m *AclReadKeyReplace) GetEncryptedReadKey() []byte { func (m *AclReadKeyReplace) GetEncryptedReadKey() []byte {
if m != nil { if m != nil {
return m.EncryptedReadKey return m.EncryptedReadKey
@ -1004,7 +964,7 @@ func (m *AclUserPermissionChange) GetPermissions() AclUserPermissions {
} }
type AclSyncMessage struct { type AclSyncMessage struct {
Content *AclSyncContentValue `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Content *AclSyncContentValue `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
} }
func (m *AclSyncMessage) Reset() { *m = AclSyncMessage{} } func (m *AclSyncMessage) Reset() { *m = AclSyncMessage{} }
@ -1192,68 +1152,66 @@ func init() {
} }
var fileDescriptor_c8e9f754f34e929b = []byte{ var fileDescriptor_c8e9f754f34e929b = []byte{
// 962 bytes of a gzipped FileDescriptorProto // 943 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
0x17, 0xf7, 0xac, 0x9d, 0x38, 0x7e, 0x76, 0x13, 0x67, 0xbe, 0x5f, 0x5a, 0x2b, 0x2a, 0x56, 0xb4, 0x14, 0xf7, 0xda, 0x49, 0x1c, 0x3f, 0xbb, 0x89, 0x33, 0x40, 0xbb, 0x8a, 0x8a, 0x15, 0xad, 0x40,
0x02, 0x29, 0xaa, 0x2a, 0x47, 0x18, 0xa4, 0x54, 0x11, 0xa2, 0x72, 0x4b, 0x91, 0xdd, 0x08, 0xa9, 0x8a, 0xaa, 0xca, 0x11, 0x06, 0x29, 0x55, 0x84, 0xa8, 0xdc, 0x52, 0x64, 0xb7, 0x42, 0xaa, 0x26,
0x9a, 0x00, 0x45, 0xbd, 0x4d, 0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 0xc9, 0xd0, 0x0f, 0x8e, 0x00, 0x37, 0x45, 0xc1, 0x3d, 0xd8, 0x98, 0x39, 0xbe, 0x1b, 0x0c, 0xbc, 0x12, 0x5c, 0x31, 0xd1, 0x77, 0xf4, 0xb3, 0x3e, 0x21, 0x26, 0xfa, 0xcd, 0x27, 0x8f, 0x7f,
0x5b, 0x18, 0x60, 0xf3, 0xa5, 0x70, 0x15, 0x17, 0x43, 0xa4, 0xd7, 0xba, 0x42, 0x5c, 0x0c, 0xad, 0xb9, 0x1e, 0x38, 0x57, 0xd7, 0x03, 0xe7, 0x8f, 0xeb, 0x81, 0xf3, 0xc3, 0xcd, 0xa0, 0x71, 0x75,
0x27, 0x8f, 0x7f, 0xbb, 0x1c, 0xa3, 0xd7, 0x97, 0x63, 0xf4, 0xf7, 0xe5, 0x18, 0xfd, 0x78, 0x35, 0x33, 0x68, 0xfc, 0x7e, 0x33, 0x68, 0xbc, 0x7e, 0xff, 0x1f, 0x7d, 0x4b, 0x5e, 0xec, 0x98, 0x9f,
0x6e, 0xbd, 0xbe, 0x1a, 0xb7, 0xfe, 0xba, 0x1a, 0xb7, 0x5e, 0xbd, 0xff, 0x46, 0xdf, 0xca, 0x67, 0x0f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xca, 0x88, 0xea, 0x1c, 0x7b, 0x0a, 0x00, 0x00,
0x9b, 0xe6, 0xcf, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xd9, 0x79, 0xd5, 0x5b, 0x0b,
0x00, 0x00,
} }
func (m *RawAclRecord) Marshal() (dAtA []byte, err error) { func (m *RawAclRecord) Marshal() (dAtA []byte, err error) {
@ -1369,10 +1327,12 @@ func (m *AclRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i-- i--
dAtA[i] = 0x28 dAtA[i] = 0x28
} }
if m.CurrentReadKeyHash != 0 { if len(m.ReadKeyId) > 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.CurrentReadKeyHash)) i -= len(m.ReadKeyId)
copy(dAtA[i:], m.ReadKeyId)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.ReadKeyId)))
i-- i--
dAtA[i] = 0x20 dAtA[i] = 0x22
} }
if len(m.Data) > 0 { if len(m.Data) > 0 {
i -= len(m.Data) i -= len(m.Data)
@ -1421,39 +1381,32 @@ func (m *AclRoot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
if m.Timestamp != 0 { if m.Timestamp != 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.Timestamp)) i = encodeVarintAclrecord(dAtA, i, uint64(m.Timestamp))
i-- i--
dAtA[i] = 0x38 dAtA[i] = 0x30
} }
if m.CurrentReadKeyHash != 0 { if m.CurrentReadKeyHash != 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.CurrentReadKeyHash)) i = encodeVarintAclrecord(dAtA, i, uint64(m.CurrentReadKeyHash))
i-- i--
dAtA[i] = 0x30 dAtA[i] = 0x28
} }
if len(m.DerivationScheme) > 0 { if len(m.DerivationScheme) > 0 {
i -= len(m.DerivationScheme) i -= len(m.DerivationScheme)
copy(dAtA[i:], m.DerivationScheme) copy(dAtA[i:], m.DerivationScheme)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.DerivationScheme))) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.DerivationScheme)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x22
} }
if len(m.EncryptedReadKey) > 0 { if len(m.EncryptedReadKey) > 0 {
i -= len(m.EncryptedReadKey) i -= len(m.EncryptedReadKey)
copy(dAtA[i:], m.EncryptedReadKey) copy(dAtA[i:], m.EncryptedReadKey)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey)))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x1a
} }
if len(m.SpaceId) > 0 { if len(m.SpaceId) > 0 {
i -= len(m.SpaceId) i -= len(m.SpaceId)
copy(dAtA[i:], m.SpaceId) copy(dAtA[i:], m.SpaceId)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.SpaceId))) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.SpaceId)))
i-- i--
dAtA[i] = 0x1a
}
if len(m.EncryptionKey) > 0 {
i -= len(m.EncryptionKey)
copy(dAtA[i:], m.EncryptionKey)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey)))
i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Identity) > 0 { if len(m.Identity) > 0 {
@ -1700,24 +1653,15 @@ func (m *AclState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
} }
if len(m.ReadKeyHashes) > 0 { if len(m.ReadKeyIds) > 0 {
dAtA8 := make([]byte, len(m.ReadKeyHashes)*10) for iNdEx := len(m.ReadKeyIds) - 1; iNdEx >= 0; iNdEx-- {
var j7 int i -= len(m.ReadKeyIds[iNdEx])
for _, num := range m.ReadKeyHashes { copy(dAtA[i:], m.ReadKeyIds[iNdEx])
for num >= 1<<7 { i = encodeVarintAclrecord(dAtA, i, uint64(len(m.ReadKeyIds[iNdEx])))
dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j7++
}
dAtA8[j7] = uint8(num)
j7++
}
i -= j7
copy(dAtA[i:], dAtA8[:j7])
i = encodeVarintAclrecord(dAtA, i, uint64(j7))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
}
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
@ -1744,14 +1688,7 @@ func (m *AclUserState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
if m.Permissions != 0 { if m.Permissions != 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions))
i-- i--
dAtA[i] = 0x18 dAtA[i] = 0x10
}
if len(m.EncryptionKey) > 0 {
i -= len(m.EncryptionKey)
copy(dAtA[i:], m.EncryptionKey)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey)))
i--
dAtA[i] = 0x12
} }
if len(m.Identity) > 0 { if len(m.Identity) > 0 {
i -= len(m.Identity) i -= len(m.Identity)
@ -1786,7 +1723,7 @@ func (m *AclUserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) {
if m.Permissions != 0 { if m.Permissions != 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions))
i-- i--
dAtA[i] = 0x20 dAtA[i] = 0x18
} }
if len(m.EncryptedReadKeys) > 0 { if len(m.EncryptedReadKeys) > 0 {
for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- {
@ -1794,16 +1731,9 @@ func (m *AclUserAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.EncryptedReadKeys[iNdEx]) copy(dAtA[i:], m.EncryptedReadKeys[iNdEx])
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx]))) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx])))
i-- i--
dAtA[i] = 0x1a
}
}
if len(m.EncryptionKey) > 0 {
i -= len(m.EncryptionKey)
copy(dAtA[i:], m.EncryptionKey)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey)))
i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
}
if len(m.Identity) > 0 { if len(m.Identity) > 0 {
i -= len(m.Identity) i -= len(m.Identity)
copy(dAtA[i:], m.Identity) copy(dAtA[i:], m.Identity)
@ -1837,7 +1767,7 @@ func (m *AclUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) {
if m.Permissions != 0 { if m.Permissions != 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions))
i-- i--
dAtA[i] = 0x20 dAtA[i] = 0x18
} }
if len(m.EncryptedReadKeys) > 0 { if len(m.EncryptedReadKeys) > 0 {
for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.EncryptedReadKeys) - 1; iNdEx >= 0; iNdEx-- {
@ -1845,14 +1775,9 @@ func (m *AclUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.EncryptedReadKeys[iNdEx]) copy(dAtA[i:], m.EncryptedReadKeys[iNdEx])
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx]))) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKeys[iNdEx])))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x12
} }
} }
if m.EncryptSymKeyHash != 0 {
i = encodeVarintAclrecord(dAtA, i, uint64(m.EncryptSymKeyHash))
i--
dAtA[i] = 0x10
}
if len(m.AcceptPublicKey) > 0 { if len(m.AcceptPublicKey) > 0 {
i -= len(m.AcceptPublicKey) i -= len(m.AcceptPublicKey)
copy(dAtA[i:], m.AcceptPublicKey) copy(dAtA[i:], m.AcceptPublicKey)
@ -1992,13 +1917,6 @@ func (m *AclReadKeyReplace) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.EncryptedReadKey) copy(dAtA[i:], m.EncryptedReadKey)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey))) i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptedReadKey)))
i-- i--
dAtA[i] = 0x1a
}
if len(m.EncryptionKey) > 0 {
i -= len(m.EncryptionKey)
copy(dAtA[i:], m.EncryptionKey)
i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptionKey)))
i--
dAtA[i] = 0x12 dAtA[i] = 0x12
} }
if len(m.Identity) > 0 { if len(m.Identity) > 0 {
@ -2076,7 +1994,7 @@ func (m *AclSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintAclrecord(dAtA, i, uint64(size)) i = encodeVarintAclrecord(dAtA, i, uint64(size))
} }
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0xa
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
@ -2242,8 +2160,9 @@ func (m *AclRecord) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
} }
if m.CurrentReadKeyHash != 0 { l = len(m.ReadKeyId)
n += 1 + sovAclrecord(uint64(m.CurrentReadKeyHash)) if l > 0 {
n += 1 + l + sovAclrecord(uint64(l))
} }
if m.Timestamp != 0 { if m.Timestamp != 0 {
n += 1 + sovAclrecord(uint64(m.Timestamp)) n += 1 + sovAclrecord(uint64(m.Timestamp))
@ -2261,10 +2180,6 @@ func (m *AclRoot) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
} }
l = len(m.EncryptionKey)
if l > 0 {
n += 1 + l + sovAclrecord(uint64(l))
}
l = len(m.SpaceId) l = len(m.SpaceId)
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
@ -2379,12 +2294,11 @@ func (m *AclState) Size() (n int) {
} }
var l int var l int
_ = l _ = l
if len(m.ReadKeyHashes) > 0 { if len(m.ReadKeyIds) > 0 {
l = 0 for _, s := range m.ReadKeyIds {
for _, e := range m.ReadKeyHashes { l = len(s)
l += sovAclrecord(uint64(e)) n += 1 + l + sovAclrecord(uint64(l))
} }
n += 1 + sovAclrecord(uint64(l)) + l
} }
if len(m.UserStates) > 0 { if len(m.UserStates) > 0 {
for _, e := range m.UserStates { for _, e := range m.UserStates {
@ -2418,10 +2332,6 @@ func (m *AclUserState) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
} }
l = len(m.EncryptionKey)
if l > 0 {
n += 1 + l + sovAclrecord(uint64(l))
}
if m.Permissions != 0 { if m.Permissions != 0 {
n += 1 + sovAclrecord(uint64(m.Permissions)) n += 1 + sovAclrecord(uint64(m.Permissions))
} }
@ -2438,10 +2348,6 @@ func (m *AclUserAdd) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
} }
l = len(m.EncryptionKey)
if l > 0 {
n += 1 + l + sovAclrecord(uint64(l))
}
if len(m.EncryptedReadKeys) > 0 { if len(m.EncryptedReadKeys) > 0 {
for _, b := range m.EncryptedReadKeys { for _, b := range m.EncryptedReadKeys {
l = len(b) l = len(b)
@ -2464,9 +2370,6 @@ func (m *AclUserInvite) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
} }
if m.EncryptSymKeyHash != 0 {
n += 1 + sovAclrecord(uint64(m.EncryptSymKeyHash))
}
if len(m.EncryptedReadKeys) > 0 { if len(m.EncryptedReadKeys) > 0 {
for _, b := range m.EncryptedReadKeys { for _, b := range m.EncryptedReadKeys {
l = len(b) l = len(b)
@ -2539,10 +2442,6 @@ func (m *AclReadKeyReplace) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
} }
l = len(m.EncryptionKey)
if l > 0 {
n += 1 + l + sovAclrecord(uint64(l))
}
l = len(m.EncryptedReadKey) l = len(m.EncryptedReadKey)
if l > 0 { if l > 0 {
n += 1 + l + sovAclrecord(uint64(l)) n += 1 + l + sovAclrecord(uint64(l))
@ -3056,10 +2955,10 @@ func (m *AclRecord) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 4: case 4:
if wireType != 0 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentReadKeyHash", wireType) return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType)
} }
m.CurrentReadKeyHash = 0 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowAclrecord return ErrIntOverflowAclrecord
@ -3069,11 +2968,24 @@ func (m *AclRecord) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
m.CurrentReadKeyHash |= uint64(b&0x7F) << shift stringLen |= uint64(b&0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthAclrecord
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthAclrecord
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ReadKeyId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5: case 5:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
@ -3178,40 +3090,6 @@ func (m *AclRoot) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthAclrecord
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthAclrecord
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...)
if m.EncryptionKey == nil {
m.EncryptionKey = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType)
} }
@ -3243,7 +3121,7 @@ func (m *AclRoot) Unmarshal(dAtA []byte) error {
} }
m.SpaceId = string(dAtA[iNdEx:postIndex]) m.SpaceId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 4: case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType)
} }
@ -3277,7 +3155,7 @@ func (m *AclRoot) Unmarshal(dAtA []byte) error {
m.EncryptedReadKey = []byte{} m.EncryptedReadKey = []byte{}
} }
iNdEx = postIndex iNdEx = postIndex
case 5: case 4:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DerivationScheme", wireType) return fmt.Errorf("proto: wrong wireType = %d for field DerivationScheme", wireType)
} }
@ -3309,7 +3187,7 @@ func (m *AclRoot) Unmarshal(dAtA []byte) error {
} }
m.DerivationScheme = string(dAtA[iNdEx:postIndex]) m.DerivationScheme = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 6: case 5:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentReadKeyHash", wireType) return fmt.Errorf("proto: wrong wireType = %d for field CurrentReadKeyHash", wireType)
} }
@ -3328,7 +3206,7 @@ func (m *AclRoot) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 7: case 6:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
} }
@ -3707,8 +3585,10 @@ func (m *AclState) Unmarshal(dAtA []byte) error {
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
if wireType == 0 { if wireType != 2 {
var v uint64 return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyIds", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowAclrecord return ErrIntOverflowAclrecord
@ -3718,70 +3598,24 @@ func (m *AclState) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
v |= uint64(b&0x7F) << shift stringLen |= uint64(b&0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
m.ReadKeyHashes = append(m.ReadKeyHashes, v) intStringLen := int(stringLen)
} else if wireType == 2 { if intStringLen < 0 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthAclrecord return ErrInvalidLengthAclrecord
} }
postIndex := iNdEx + packedLen postIndex := iNdEx + intStringLen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLengthAclrecord return ErrInvalidLengthAclrecord
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
var elementCount int m.ReadKeyIds = append(m.ReadKeyIds, string(dAtA[iNdEx:postIndex]))
var count int iNdEx = postIndex
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.ReadKeyHashes) == 0 {
m.ReadKeyHashes = make([]uint64, 0, elementCount)
}
for iNdEx < postIndex {
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.ReadKeyHashes = append(m.ReadKeyHashes, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyHashes", wireType)
}
case 2: case 2:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field UserStates", wireType) return fmt.Errorf("proto: wrong wireType = %d for field UserStates", wireType)
@ -4030,40 +3864,6 @@ func (m *AclUserState) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthAclrecord
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthAclrecord
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...)
if m.EncryptionKey == nil {
m.EncryptionKey = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
} }
@ -4167,40 +3967,6 @@ func (m *AclUserAdd) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthAclrecord
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthAclrecord
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...)
if m.EncryptionKey == nil {
m.EncryptionKey = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType)
} }
@ -4232,7 +3998,7 @@ func (m *AclUserAdd) Unmarshal(dAtA []byte) error {
m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx)) m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx))
copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex]) copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 4: case 3:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
} }
@ -4336,25 +4102,6 @@ func (m *AclUserInvite) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptSymKeyHash", wireType)
}
m.EncryptSymKeyHash = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EncryptSymKeyHash |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType)
} }
@ -4386,7 +4133,7 @@ func (m *AclUserInvite) Unmarshal(dAtA []byte) error {
m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx)) m.EncryptedReadKeys = append(m.EncryptedReadKeys, make([]byte, postIndex-iNdEx))
copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex]) copy(m.EncryptedReadKeys[len(m.EncryptedReadKeys)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 4: case 3:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
} }
@ -4826,40 +4573,6 @@ func (m *AclReadKeyReplace) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAclrecord
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthAclrecord
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthAclrecord
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EncryptionKey = append(m.EncryptionKey[:0], dAtA[iNdEx:postIndex]...)
if m.EncryptionKey == nil {
m.EncryptionKey = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType) return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKey", wireType)
} }
@ -5046,7 +4759,7 @@ func (m *AclSyncMessage) Unmarshal(dAtA []byte) error {
return fmt.Errorf("proto: AclSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: AclSyncMessage: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 2: case 1:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
} }

View File

@ -18,18 +18,17 @@ message AclRecord {
string prevId = 1; string prevId = 1;
bytes identity = 2; bytes identity = 2;
bytes data = 3; bytes data = 3;
uint64 currentReadKeyHash = 4; string readKeyId = 4;
int64 timestamp = 5; int64 timestamp = 5;
} }
message AclRoot { message AclRoot {
bytes identity = 1; bytes identity = 1;
bytes encryptionKey = 2; string spaceId = 2;
string spaceId = 3; bytes encryptedReadKey = 3;
bytes encryptedReadKey = 4; string derivationScheme = 4;
string derivationScheme = 5; uint64 currentReadKeyHash = 5;
uint64 currentReadKeyHash = 6; int64 timestamp = 6;
int64 timestamp = 7;
} }
message AclContentValue { message AclContentValue {
@ -47,29 +46,26 @@ message AclData {
} }
message AclState { message AclState {
repeated uint64 readKeyHashes = 1; repeated string readKeyIds = 1;
repeated AclUserState userStates = 2; repeated AclUserState userStates = 2;
map<string, AclUserInvite> invites = 3; map<string, AclUserInvite> invites = 3;
} }
message AclUserState { message AclUserState {
bytes identity = 1; bytes identity = 1;
bytes encryptionKey = 2; AclUserPermissions permissions = 2;
AclUserPermissions permissions = 3;
} }
message AclUserAdd { message AclUserAdd {
bytes identity = 1; bytes identity = 1;
bytes encryptionKey = 2; repeated bytes encryptedReadKeys = 2;
repeated bytes encryptedReadKeys = 3; AclUserPermissions permissions = 3;
AclUserPermissions permissions = 4;
} }
message AclUserInvite { message AclUserInvite {
bytes acceptPublicKey = 1; bytes acceptPublicKey = 1;
uint64 encryptSymKeyHash = 2; repeated bytes encryptedReadKeys = 2;
repeated bytes encryptedReadKeys = 3; AclUserPermissions permissions = 3;
AclUserPermissions permissions = 4;
} }
message AclUserJoin { message AclUserJoin {
@ -87,8 +83,7 @@ message AclUserRemove {
message AclReadKeyReplace { message AclReadKeyReplace {
bytes identity = 1; bytes identity = 1;
bytes encryptionKey = 2; bytes encryptedReadKey = 2;
bytes encryptedReadKey = 3;
} }
message AclUserPermissionChange { message AclUserPermissionChange {
@ -103,7 +98,7 @@ enum AclUserPermissions {
} }
message AclSyncMessage { message AclSyncMessage {
AclSyncContentValue content = 2; AclSyncContentValue content = 1;
} }
// AclSyncContentValue provides different types for acl sync // AclSyncContentValue provides different types for acl sync

View File

@ -30,8 +30,8 @@ message TreeChange {
string snapshotBaseId = 3; string snapshotBaseId = 3;
// ChangesData is an arbitrary payload to be read by the client // ChangesData is an arbitrary payload to be read by the client
bytes changesData = 4; bytes changesData = 4;
// CurrentReadKeyHash is the hash of the read key which is used to encrypt this change // ReadKeyId is the id of the read key
uint64 currentReadKeyHash = 5; string readKeyId = 5;
// Timestamp is this change creation timestamp // Timestamp is this change creation timestamp
int64 timestamp = 6; int64 timestamp = 6;
// Identity is a public key with which the raw payload of this change is signed // Identity is a public key with which the raw payload of this change is signed

View File

@ -132,8 +132,8 @@ type TreeChange struct {
SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"` SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"`
// ChangesData is an arbitrary payload to be read by the client // ChangesData is an arbitrary payload to be read by the client
ChangesData []byte `protobuf:"bytes,4,opt,name=changesData,proto3" json:"changesData,omitempty"` ChangesData []byte `protobuf:"bytes,4,opt,name=changesData,proto3" json:"changesData,omitempty"`
// CurrentReadKeyHash is the hash of the read key which is used to encrypt this change // ReadKeyId is the id of the read key
CurrentReadKeyHash uint64 `protobuf:"varint,5,opt,name=currentReadKeyHash,proto3" json:"currentReadKeyHash,omitempty"` ReadKeyId string `protobuf:"bytes,5,opt,name=readKeyId,proto3" json:"readKeyId,omitempty"`
// Timestamp is this change creation timestamp // Timestamp is this change creation timestamp
Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Identity is a public key with which the raw payload of this change is signed // Identity is a public key with which the raw payload of this change is signed
@ -203,11 +203,11 @@ func (m *TreeChange) GetChangesData() []byte {
return nil return nil
} }
func (m *TreeChange) GetCurrentReadKeyHash() uint64 { func (m *TreeChange) GetReadKeyId() string {
if m != nil { if m != nil {
return m.CurrentReadKeyHash return m.ReadKeyId
} }
return 0 return ""
} }
func (m *TreeChange) GetTimestamp() int64 { func (m *TreeChange) GetTimestamp() int64 {
@ -806,51 +806,50 @@ func init() {
} }
var fileDescriptor_5033f0301ef9b772 = []byte{ var fileDescriptor_5033f0301ef9b772 = []byte{
// 690 bytes of a gzipped FileDescriptorProto // 677 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xc1, 0x4e, 0xdb, 0x4a, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xcf, 0x4f, 0xd4, 0x40,
0x14, 0xf5, 0x38, 0x01, 0xc3, 0x25, 0xc0, 0x7b, 0x03, 0x0b, 0x0b, 0xbd, 0xe7, 0x5a, 0x56, 0xd5, 0x14, 0xee, 0x74, 0x81, 0xb2, 0x8f, 0x05, 0x74, 0xe0, 0xd0, 0x10, 0xad, 0x4d, 0x63, 0x74, 0xbd,
0xa6, 0x1b, 0x90, 0xe8, 0xaa, 0x55, 0x25, 0x54, 0x28, 0xd4, 0x11, 0x6a, 0x85, 0x06, 0x4a, 0xa5, 0x40, 0x82, 0x27, 0x8d, 0x09, 0x11, 0x04, 0x77, 0x43, 0x34, 0x64, 0x40, 0x4c, 0xbc, 0x0d, 0xed,
0xee, 0x06, 0xfb, 0x42, 0x5c, 0x25, 0xb6, 0xeb, 0x99, 0x14, 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33, 0x13, 0x4d, 0x95, 0xa8, 0x89, 0xe6, 0x5f, 0x81, 0x2c, 0x70, 0x4e, 0xb3, 0xe0, 0x9d, 0xea, 0xc5, 0xd4, 0xbd, 0xba, 0xd1, 0x39, 0xaf, 0xdd, 0xf3, 0x68, 0xea, 0x9e, 0x9f,
0x61, 0x66, 0x6b, 0xf5, 0xc2, 0xf3, 0xa8, 0x76, 0xf3, 0x93, 0x99, 0x9b, 0x7f, 0xe6, 0xae, 0xd6, 0xba, 0x99, 0xcd, 0x19, 0x37, 0xf3, 0xee, 0xdb, 0xbf, 0xb7, 0x0e, 0xba, 0xbe, 0x75, 0xd0, 0xbf,
0x1b, 0xee, 0xea, 0xdd, 0x97, 0xbf, 0x6f, 0x2c, 0x72, 0x75, 0x63, 0x91, 0x3f, 0x37, 0x16, 0xf9, 0x5b, 0x07, 0xfd, 0x1e, 0x3b, 0xc6, 0xf5, 0xd8, 0x31, 0x6e, 0xc6, 0x8e, 0xf1, 0xe5, 0xf9, 0x1d,
0x71, 0x6b, 0x69, 0x57, 0xb7, 0x96, 0x76, 0x7d, 0x6b, 0x69, 0x1f, 0x1e, 0xdf, 0xf1, 0x6b, 0x77, 0xbf, 0x6d, 0x67, 0x0b, 0xea, 0xe7, 0xe5, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xc0, 0xf7,
0x36, 0xaf, 0x7e, 0x9e, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x24, 0x93, 0x3b, 0x00, 0x1f, 0x07, 0x30, 0x0d, 0x07, 0x00, 0x00,
0x00, 0x00,
} }
func (m *RootChange) Marshal() (dAtA []byte, err error) { func (m *RootChange) Marshal() (dAtA []byte, err error) {
@ -965,10 +964,12 @@ func (m *TreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i-- i--
dAtA[i] = 0x30 dAtA[i] = 0x30
} }
if m.CurrentReadKeyHash != 0 { if len(m.ReadKeyId) > 0 {
i = encodeVarintTreechange(dAtA, i, uint64(m.CurrentReadKeyHash)) i -= len(m.ReadKeyId)
copy(dAtA[i:], m.ReadKeyId)
i = encodeVarintTreechange(dAtA, i, uint64(len(m.ReadKeyId)))
i-- i--
dAtA[i] = 0x28 dAtA[i] = 0x2a
} }
if len(m.ChangesData) > 0 { if len(m.ChangesData) > 0 {
i -= len(m.ChangesData) i -= len(m.ChangesData)
@ -1543,8 +1544,9 @@ func (m *TreeChange) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovTreechange(uint64(l)) n += 1 + l + sovTreechange(uint64(l))
} }
if m.CurrentReadKeyHash != 0 { l = len(m.ReadKeyId)
n += 1 + sovTreechange(uint64(m.CurrentReadKeyHash)) if l > 0 {
n += 1 + l + sovTreechange(uint64(l))
} }
if m.Timestamp != 0 { if m.Timestamp != 0 {
n += 1 + sovTreechange(uint64(m.Timestamp)) n += 1 + sovTreechange(uint64(m.Timestamp))
@ -2214,10 +2216,10 @@ func (m *TreeChange) Unmarshal(dAtA []byte) error {
} }
iNdEx = postIndex iNdEx = postIndex
case 5: case 5:
if wireType != 0 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentReadKeyHash", wireType) return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType)
} }
m.CurrentReadKeyHash = 0 var stringLen uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowTreechange return ErrIntOverflowTreechange
@ -2227,11 +2229,24 @@ func (m *TreeChange) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
m.CurrentReadKeyHash |= uint64(b&0x7F) << shift stringLen |= uint64(b&0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTreechange
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTreechange
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ReadKeyId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6: case 6:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)