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

Merge branch 'GO-2301-new-node-types' of github.com:anyproto/any-sync into GO-2301-new-node-types

This commit is contained in:
Anton Akentev 2023-11-06 17:16:00 +00:00
commit ef137d46ca
2 changed files with 54 additions and 0 deletions

View file

@ -1351,6 +1351,8 @@ type DeletionLogRecord struct {
Status DeletionLogRecordStatus `protobuf:"varint,3,opt,name=status,proto3,enum=coordinator.DeletionLogRecordStatus" json:"status,omitempty"`
// Timestamp is a unixtimestamp of record creation
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// FileGroup is a key of group for file nodes
FileGroup string `protobuf:"bytes,5,opt,name=fileGroup,proto3" json:"fileGroup,omitempty"`
}
func (m *DeletionLogRecord) Reset() { *m = DeletionLogRecord{} }
@ -1414,6 +1416,13 @@ func (m *DeletionLogRecord) GetTimestamp() int64 {
return 0
}
func (m *DeletionLogRecord) GetFileGroup() string {
if m != nil {
return m.FileGroup
}
return ""
}
// SpaceDeleteRequest contains the deletion confirmation for the space to be deleted
type SpaceDeleteRequest struct {
SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
@ -2758,6 +2767,13 @@ func (m *DeletionLogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.FileGroup) > 0 {
i -= len(m.FileGroup)
copy(dAtA[i:], m.FileGroup)
i = encodeVarintCoordinator(dAtA, i, uint64(len(m.FileGroup)))
i--
dAtA[i] = 0x2a
}
if m.Timestamp != 0 {
i = encodeVarintCoordinator(dAtA, i, uint64(m.Timestamp))
i--
@ -3424,6 +3440,10 @@ func (m *DeletionLogRecord) Size() (n int) {
if m.Timestamp != 0 {
n += 1 + sovCoordinator(uint64(m.Timestamp))
}
l = len(m.FileGroup)
if l > 0 {
n += 1 + l + sovCoordinator(uint64(l))
}
return n
}
@ -6124,6 +6144,38 @@ func (m *DeletionLogRecord) Unmarshal(dAtA []byte) error {
break
}
}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FileGroup", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FileGroup = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCoordinator(dAtA[iNdEx:])

View file

@ -244,6 +244,8 @@ message DeletionLogRecord {
DeletionLogRecordStatus status = 3;
// Timestamp is a unixtimestamp of record creation
int64 timestamp = 4;
// FileGroup is a key of group for file nodes
string fileGroup = 5;
}
enum DeletionLogRecordStatus {