diff --git a/gen/go/v1/restic.pb.go b/gen/go/v1/restic.pb.go index 7586e196..35b87302 100644 --- a/gen/go/v1/restic.pb.go +++ b/gen/go/v1/restic.pb.go @@ -26,14 +26,15 @@ type ResticSnapshot struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - UnixTimeMs int64 `protobuf:"varint,2,opt,name=unix_time_ms,json=unixTimeMs,proto3" json:"unix_time_ms,omitempty"` - Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` - Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` - Tree string `protobuf:"bytes,5,opt,name=tree,proto3" json:"tree,omitempty"` // tree hash - Parent string `protobuf:"bytes,6,opt,name=parent,proto3" json:"parent,omitempty"` // parent snapshot's id - Paths []string `protobuf:"bytes,7,rep,name=paths,proto3" json:"paths,omitempty"` - Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + UnixTimeMs int64 `protobuf:"varint,2,opt,name=unix_time_ms,json=unixTimeMs,proto3" json:"unix_time_ms,omitempty"` + Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` + Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` + Tree string `protobuf:"bytes,5,opt,name=tree,proto3" json:"tree,omitempty"` // tree hash + Parent string `protobuf:"bytes,6,opt,name=parent,proto3" json:"parent,omitempty"` // parent snapshot's id + Paths []string `protobuf:"bytes,7,rep,name=paths,proto3" json:"paths,omitempty"` + Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` + Summary *SnapshotSummary `protobuf:"bytes,9,opt,name=summary,proto3" json:"summary,omitempty"` // added in 0.17.0 restic outputs the summary in the snapshot } func (x *ResticSnapshot) Reset() { @@ -124,6 +125,148 @@ func (x *ResticSnapshot) GetTags() []string { return nil } +func (x *ResticSnapshot) GetSummary() *SnapshotSummary { + if x != nil { + return x.Summary + } + return nil +} + +type SnapshotSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FilesNew int64 `protobuf:"varint,1,opt,name=files_new,json=filesNew,proto3" json:"files_new,omitempty"` + FilesChanged int64 `protobuf:"varint,2,opt,name=files_changed,json=filesChanged,proto3" json:"files_changed,omitempty"` + FilesUnmodified int64 `protobuf:"varint,3,opt,name=files_unmodified,json=filesUnmodified,proto3" json:"files_unmodified,omitempty"` + DirsNew int64 `protobuf:"varint,4,opt,name=dirs_new,json=dirsNew,proto3" json:"dirs_new,omitempty"` + DirsChanged int64 `protobuf:"varint,5,opt,name=dirs_changed,json=dirsChanged,proto3" json:"dirs_changed,omitempty"` + DirsUnmodified int64 `protobuf:"varint,6,opt,name=dirs_unmodified,json=dirsUnmodified,proto3" json:"dirs_unmodified,omitempty"` + DataBlobs int64 `protobuf:"varint,7,opt,name=data_blobs,json=dataBlobs,proto3" json:"data_blobs,omitempty"` + TreeBlobs int64 `protobuf:"varint,8,opt,name=tree_blobs,json=treeBlobs,proto3" json:"tree_blobs,omitempty"` + DataAdded int64 `protobuf:"varint,9,opt,name=data_added,json=dataAdded,proto3" json:"data_added,omitempty"` + TotalFilesProcessed int64 `protobuf:"varint,10,opt,name=total_files_processed,json=totalFilesProcessed,proto3" json:"total_files_processed,omitempty"` + TotalBytesProcessed int64 `protobuf:"varint,11,opt,name=total_bytes_processed,json=totalBytesProcessed,proto3" json:"total_bytes_processed,omitempty"` + TotalDuration float64 `protobuf:"fixed64,12,opt,name=total_duration,json=totalDuration,proto3" json:"total_duration,omitempty"` +} + +func (x *SnapshotSummary) Reset() { + *x = SnapshotSummary{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_restic_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SnapshotSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotSummary) ProtoMessage() {} + +func (x *SnapshotSummary) ProtoReflect() protoreflect.Message { + mi := &file_v1_restic_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotSummary.ProtoReflect.Descriptor instead. +func (*SnapshotSummary) Descriptor() ([]byte, []int) { + return file_v1_restic_proto_rawDescGZIP(), []int{1} +} + +func (x *SnapshotSummary) GetFilesNew() int64 { + if x != nil { + return x.FilesNew + } + return 0 +} + +func (x *SnapshotSummary) GetFilesChanged() int64 { + if x != nil { + return x.FilesChanged + } + return 0 +} + +func (x *SnapshotSummary) GetFilesUnmodified() int64 { + if x != nil { + return x.FilesUnmodified + } + return 0 +} + +func (x *SnapshotSummary) GetDirsNew() int64 { + if x != nil { + return x.DirsNew + } + return 0 +} + +func (x *SnapshotSummary) GetDirsChanged() int64 { + if x != nil { + return x.DirsChanged + } + return 0 +} + +func (x *SnapshotSummary) GetDirsUnmodified() int64 { + if x != nil { + return x.DirsUnmodified + } + return 0 +} + +func (x *SnapshotSummary) GetDataBlobs() int64 { + if x != nil { + return x.DataBlobs + } + return 0 +} + +func (x *SnapshotSummary) GetTreeBlobs() int64 { + if x != nil { + return x.TreeBlobs + } + return 0 +} + +func (x *SnapshotSummary) GetDataAdded() int64 { + if x != nil { + return x.DataAdded + } + return 0 +} + +func (x *SnapshotSummary) GetTotalFilesProcessed() int64 { + if x != nil { + return x.TotalFilesProcessed + } + return 0 +} + +func (x *SnapshotSummary) GetTotalBytesProcessed() int64 { + if x != nil { + return x.TotalBytesProcessed + } + return 0 +} + +func (x *SnapshotSummary) GetTotalDuration() float64 { + if x != nil { + return x.TotalDuration + } + return 0 +} + // ResticSnapshotList represents a list of restic snapshots. type ResticSnapshotList struct { state protoimpl.MessageState @@ -136,7 +279,7 @@ type ResticSnapshotList struct { func (x *ResticSnapshotList) Reset() { *x = ResticSnapshotList{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[1] + mi := &file_v1_restic_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -149,7 +292,7 @@ func (x *ResticSnapshotList) String() string { func (*ResticSnapshotList) ProtoMessage() {} func (x *ResticSnapshotList) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[1] + mi := &file_v1_restic_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,7 +305,7 @@ func (x *ResticSnapshotList) ProtoReflect() protoreflect.Message { // Deprecated: Use ResticSnapshotList.ProtoReflect.Descriptor instead. func (*ResticSnapshotList) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{1} + return file_v1_restic_proto_rawDescGZIP(), []int{2} } func (x *ResticSnapshotList) GetSnapshots() []*ResticSnapshot { @@ -188,7 +331,7 @@ type BackupProgressEntry struct { func (x *BackupProgressEntry) Reset() { *x = BackupProgressEntry{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[2] + mi := &file_v1_restic_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -201,7 +344,7 @@ func (x *BackupProgressEntry) String() string { func (*BackupProgressEntry) ProtoMessage() {} func (x *BackupProgressEntry) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[2] + mi := &file_v1_restic_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -214,7 +357,7 @@ func (x *BackupProgressEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use BackupProgressEntry.ProtoReflect.Descriptor instead. func (*BackupProgressEntry) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{2} + return file_v1_restic_proto_rawDescGZIP(), []int{3} } func (m *BackupProgressEntry) GetEntry() isBackupProgressEntry_Entry { @@ -272,7 +415,7 @@ type BackupProgressStatusEntry struct { func (x *BackupProgressStatusEntry) Reset() { *x = BackupProgressStatusEntry{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[3] + mi := &file_v1_restic_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -285,7 +428,7 @@ func (x *BackupProgressStatusEntry) String() string { func (*BackupProgressStatusEntry) ProtoMessage() {} func (x *BackupProgressStatusEntry) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[3] + mi := &file_v1_restic_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -298,7 +441,7 @@ func (x *BackupProgressStatusEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use BackupProgressStatusEntry.ProtoReflect.Descriptor instead. func (*BackupProgressStatusEntry) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{3} + return file_v1_restic_proto_rawDescGZIP(), []int{4} } func (x *BackupProgressStatusEntry) GetPercentDone() float64 { @@ -368,7 +511,7 @@ type BackupProgressSummary struct { func (x *BackupProgressSummary) Reset() { *x = BackupProgressSummary{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[4] + mi := &file_v1_restic_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -381,7 +524,7 @@ func (x *BackupProgressSummary) String() string { func (*BackupProgressSummary) ProtoMessage() {} func (x *BackupProgressSummary) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[4] + mi := &file_v1_restic_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -394,7 +537,7 @@ func (x *BackupProgressSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use BackupProgressSummary.ProtoReflect.Descriptor instead. func (*BackupProgressSummary) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{4} + return file_v1_restic_proto_rawDescGZIP(), []int{5} } func (x *BackupProgressSummary) GetFilesNew() int64 { @@ -502,7 +645,7 @@ type BackupProgressError struct { func (x *BackupProgressError) Reset() { *x = BackupProgressError{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[5] + mi := &file_v1_restic_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -515,7 +658,7 @@ func (x *BackupProgressError) String() string { func (*BackupProgressError) ProtoMessage() {} func (x *BackupProgressError) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[5] + mi := &file_v1_restic_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -528,7 +671,7 @@ func (x *BackupProgressError) ProtoReflect() protoreflect.Message { // Deprecated: Use BackupProgressError.ProtoReflect.Descriptor instead. func (*BackupProgressError) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{5} + return file_v1_restic_proto_rawDescGZIP(), []int{6} } func (x *BackupProgressError) GetItem() string { @@ -570,7 +713,7 @@ type RestoreProgressEntry struct { func (x *RestoreProgressEntry) Reset() { *x = RestoreProgressEntry{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[6] + mi := &file_v1_restic_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -583,7 +726,7 @@ func (x *RestoreProgressEntry) String() string { func (*RestoreProgressEntry) ProtoMessage() {} func (x *RestoreProgressEntry) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[6] + mi := &file_v1_restic_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -596,7 +739,7 @@ func (x *RestoreProgressEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use RestoreProgressEntry.ProtoReflect.Descriptor instead. func (*RestoreProgressEntry) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{6} + return file_v1_restic_proto_rawDescGZIP(), []int{7} } func (x *RestoreProgressEntry) GetMessageType() string { @@ -663,7 +806,7 @@ type RepoStats struct { func (x *RepoStats) Reset() { *x = RepoStats{} if protoimpl.UnsafeEnabled { - mi := &file_v1_restic_proto_msgTypes[7] + mi := &file_v1_restic_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -676,7 +819,7 @@ func (x *RepoStats) String() string { func (*RepoStats) ProtoMessage() {} func (x *RepoStats) ProtoReflect() protoreflect.Message { - mi := &file_v1_restic_proto_msgTypes[7] + mi := &file_v1_restic_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -689,7 +832,7 @@ func (x *RepoStats) ProtoReflect() protoreflect.Message { // Deprecated: Use RepoStats.ProtoReflect.Descriptor instead. func (*RepoStats) Descriptor() ([]byte, []int) { - return file_v1_restic_proto_rawDescGZIP(), []int{7} + return file_v1_restic_proto_rawDescGZIP(), []int{8} } func (x *RepoStats) GetTotalSize() int64 { @@ -731,7 +874,7 @@ var File_v1_restic_proto protoreflect.FileDescriptor var file_v1_restic_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0xd0, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x69, 0x63, + 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0xff, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, @@ -744,107 +887,140 @@ var file_v1_restic_proto_rawDesc = []byte{ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x46, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x74, - 0x69, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, - 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, - 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, - 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x44, 0x6f, - 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x64, 0x6f, - 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x44, - 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x64, 0x6f, 0x6e, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, 0x73, 0x44, 0x6f, - 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x69, - 0x6c, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0xf8, 0x03, 0x0a, 0x15, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x23, 0x0a, 0x0d, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x64, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x75, 0x6e, 0x6d, 0x6f, 0x64, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x55, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x64, 0x69, 0x72, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x64, 0x69, 0x72, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x72, 0x73, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, - 0x69, 0x72, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, - 0x72, 0x73, 0x5f, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x73, 0x55, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x6c, 0x6f, 0x62, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, - 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x72, 0x65, 0x65, 0x42, 0x6c, 0x6f, 0x62, - 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64, 0x64, 0x65, 0x64, - 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, - 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, - 0x22, 0x5b, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x64, - 0x75, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x75, 0x72, - 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x95, 0x02, - 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x45, 0x6c, 0x61, 0x70, 0x73, - 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x6f, - 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x44, 0x6f, 0x6e, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, 0x67, 0x65, 0x6f, - 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xd1, 0x03, 0x0a, 0x0f, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x29, 0x0a, + 0x10, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x55, 0x6e, + 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x73, + 0x5f, 0x6e, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x69, 0x72, 0x73, + 0x4e, 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x72, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x69, 0x72, 0x73, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x72, 0x73, 0x5f, 0x75, + 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x64, 0x69, 0x72, 0x73, 0x55, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x72, 0x65, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x12, 0x52, + 0x65, 0x73, 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x69, 0x63, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x6f, + 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0xf8, 0x03, 0x0a, 0x15, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4e, 0x65, 0x77, 0x12, + 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x75, 0x6e, + 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x55, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x73, 0x5f, 0x6e, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x64, 0x69, 0x72, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, + 0x72, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x64, 0x69, 0x72, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x64, 0x69, 0x72, 0x73, 0x5f, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x73, 0x55, 0x6e, 0x6d, 0x6f, + 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, + 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x62, 0x6c, + 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x72, 0x65, 0x65, 0x42, + 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64, 0x64, + 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64, + 0x64, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x16, + 0x0a, 0x06, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x95, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5f, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x45, 0x6c, + 0x61, 0x70, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x6e, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x70, + 0x6f, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, + 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x62, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x2c, 0x5a, 0x2a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, + 0x67, 0x65, 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -859,26 +1035,28 @@ func file_v1_restic_proto_rawDescGZIP() []byte { return file_v1_restic_proto_rawDescData } -var file_v1_restic_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_v1_restic_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_v1_restic_proto_goTypes = []interface{}{ (*ResticSnapshot)(nil), // 0: v1.ResticSnapshot - (*ResticSnapshotList)(nil), // 1: v1.ResticSnapshotList - (*BackupProgressEntry)(nil), // 2: v1.BackupProgressEntry - (*BackupProgressStatusEntry)(nil), // 3: v1.BackupProgressStatusEntry - (*BackupProgressSummary)(nil), // 4: v1.BackupProgressSummary - (*BackupProgressError)(nil), // 5: v1.BackupProgressError - (*RestoreProgressEntry)(nil), // 6: v1.RestoreProgressEntry - (*RepoStats)(nil), // 7: v1.RepoStats + (*SnapshotSummary)(nil), // 1: v1.SnapshotSummary + (*ResticSnapshotList)(nil), // 2: v1.ResticSnapshotList + (*BackupProgressEntry)(nil), // 3: v1.BackupProgressEntry + (*BackupProgressStatusEntry)(nil), // 4: v1.BackupProgressStatusEntry + (*BackupProgressSummary)(nil), // 5: v1.BackupProgressSummary + (*BackupProgressError)(nil), // 6: v1.BackupProgressError + (*RestoreProgressEntry)(nil), // 7: v1.RestoreProgressEntry + (*RepoStats)(nil), // 8: v1.RepoStats } var file_v1_restic_proto_depIdxs = []int32{ - 0, // 0: v1.ResticSnapshotList.snapshots:type_name -> v1.ResticSnapshot - 3, // 1: v1.BackupProgressEntry.status:type_name -> v1.BackupProgressStatusEntry - 4, // 2: v1.BackupProgressEntry.summary:type_name -> v1.BackupProgressSummary - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 1, // 0: v1.ResticSnapshot.summary:type_name -> v1.SnapshotSummary + 0, // 1: v1.ResticSnapshotList.snapshots:type_name -> v1.ResticSnapshot + 4, // 2: v1.BackupProgressEntry.status:type_name -> v1.BackupProgressStatusEntry + 5, // 3: v1.BackupProgressEntry.summary:type_name -> v1.BackupProgressSummary + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_v1_restic_proto_init() } @@ -900,7 +1078,7 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResticSnapshotList); i { + switch v := v.(*SnapshotSummary); i { case 0: return &v.state case 1: @@ -912,7 +1090,7 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackupProgressEntry); i { + switch v := v.(*ResticSnapshotList); i { case 0: return &v.state case 1: @@ -924,7 +1102,7 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackupProgressStatusEntry); i { + switch v := v.(*BackupProgressEntry); i { case 0: return &v.state case 1: @@ -936,7 +1114,7 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackupProgressSummary); i { + switch v := v.(*BackupProgressStatusEntry); i { case 0: return &v.state case 1: @@ -948,7 +1126,7 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackupProgressError); i { + switch v := v.(*BackupProgressSummary); i { case 0: return &v.state case 1: @@ -960,7 +1138,7 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestoreProgressEntry); i { + switch v := v.(*BackupProgressError); i { case 0: return &v.state case 1: @@ -972,6 +1150,18 @@ func file_v1_restic_proto_init() { } } file_v1_restic_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreProgressEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_restic_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RepoStats); i { case 0: return &v.state @@ -984,7 +1174,7 @@ func file_v1_restic_proto_init() { } } } - file_v1_restic_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_v1_restic_proto_msgTypes[3].OneofWrappers = []interface{}{ (*BackupProgressEntry_Status)(nil), (*BackupProgressEntry_Summary)(nil), } @@ -994,7 +1184,7 @@ func file_v1_restic_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_v1_restic_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/protoutil/conversion.go b/internal/protoutil/conversion.go index e1b91a96..79c6c7eb 100644 --- a/internal/protoutil/conversion.go +++ b/internal/protoutil/conversion.go @@ -17,6 +17,20 @@ func SnapshotToProto(s *restic.Snapshot) *v1.ResticSnapshot { Username: s.Username, Tags: s.Tags, Parent: s.Parent, + Summary: &v1.SnapshotSummary{ + FilesNew: int64(s.SnapshotSummary.FilesNew), + FilesChanged: int64(s.SnapshotSummary.FilesChanged), + FilesUnmodified: int64(s.SnapshotSummary.FilesUnmodified), + DirsNew: int64(s.SnapshotSummary.DirsNew), + DirsChanged: int64(s.SnapshotSummary.DirsChanged), + DirsUnmodified: int64(s.SnapshotSummary.DirsUnmodified), + DataBlobs: int64(s.SnapshotSummary.DataBlobs), + TreeBlobs: int64(s.SnapshotSummary.TreeBlobs), + DataAdded: int64(s.SnapshotSummary.DataAdded), + TotalFilesProcessed: int64(s.SnapshotSummary.TotalFilesProcessed), + TotalBytesProcessed: int64(s.SnapshotSummary.TotalBytesProcessed), + TotalDuration: float64(s.SnapshotSummary.DurationMs()) / 1000.0, + }, } } diff --git a/pkg/restic/outputs.go b/pkg/restic/outputs.go index 8a4a9564..aa1254b6 100644 --- a/pkg/restic/outputs.go +++ b/pkg/restic/outputs.go @@ -13,15 +13,16 @@ import ( ) type Snapshot struct { - Id string `json:"id"` - Time string `json:"time"` - Tree string `json:"tree"` - Paths []string `json:"paths"` - Hostname string `json:"hostname"` - Username string `json:"username"` - Tags []string `json:"tags"` - Parent string `json:"parent"` - unixTimeMs int64 `json:"-"` + Id string `json:"id"` + Time string `json:"time"` + Tree string `json:"tree"` + Paths []string `json:"paths"` + Hostname string `json:"hostname"` + Username string `json:"username"` + Tags []string `json:"tags"` + Parent string `json:"parent"` + SnapshotSummary SnapshotSummary `json:"summary"` + unixTimeMs int64 `json:"-"` } func (s *Snapshot) UnixTimeMs() int64 { @@ -36,6 +37,41 @@ func (s *Snapshot) UnixTimeMs() int64 { return s.unixTimeMs } +type SnapshotSummary struct { + BackupStart string `json:"backup_start"` + BackupEnd string `json:"backup_end"` + FilesNew int64 `json:"files_new"` + FilesChanged int64 `json:"files_changed"` + FilesUnmodified int64 `json:"files_unmodified"` + DirsNew int64 `json:"dirs_new"` + DirsChanged int64 `json:"dirs_changed"` + DirsUnmodified int64 `json:"dirs_unmodified"` + DataBlobs int64 `json:"data_blobs"` + TreeBlobs int64 `json:"tree_blobs"` + DataAdded int64 `json:"data_added"` + DataAddedPacked int64 `json:"data_added_packed"` + TotalFilesProcessed int64 `json:"total_files_processed"` + TotalBytesProcessed int64 `json:"total_bytes_processed"` + unixDurationMs int64 `json:"-"` +} + +// Duration returns the duration of the snapshot in milliseconds. +func (s *SnapshotSummary) DurationMs() int64 { + if s.unixDurationMs != 0 { + return s.unixDurationMs + } + start, err := time.Parse(time.RFC3339Nano, s.BackupStart) + if err != nil { + return 0 + } + end, err := time.Parse(time.RFC3339Nano, s.BackupEnd) + if err != nil { + return 0 + } + s.unixDurationMs = end.Sub(start).Milliseconds() + return s.unixDurationMs +} + func (s *Snapshot) Validate() error { if err := ValidateSnapshotId(s.Id); err != nil { return fmt.Errorf("snapshot.id invalid: %v", err) diff --git a/pkg/restic/restic_test.go b/pkg/restic/restic_test.go index ff566fe2..ffcee2f3 100644 --- a/pkg/restic/restic_test.go +++ b/pkg/restic/restic_test.go @@ -227,9 +227,10 @@ func TestSnapshot(t *testing.T) { } var tests = []struct { - name string - opts []GenericOption - count int + name string + opts []GenericOption + count int + checkSnapshotFields bool }{ { name: "no options", @@ -237,9 +238,10 @@ func TestSnapshot(t *testing.T) { count: 10, }, { - name: "with tag", - opts: []GenericOption{WithTags("tag1")}, - count: 1, + name: "with tag", + opts: []GenericOption{WithTags("tag1")}, + count: 1, + checkSnapshotFields: true, }, } @@ -259,11 +261,56 @@ func TestSnapshot(t *testing.T) { if snapshot.UnixTimeMs() == 0 { t.Errorf("wanted snapshot time to be non-zero, got: %v", snapshot.UnixTimeMs()) } + if snapshot.SnapshotSummary.DurationMs() == 0 { + t.Errorf("wanted snapshot duration to be non-zero, got: %v", snapshot.SnapshotSummary.DurationMs()) + } + if tc.checkSnapshotFields { + checkSnapshotFieldsHelper(t, snapshot) + } } }) } } +func checkSnapshotFieldsHelper(t *testing.T, snapshot *Snapshot) { + if snapshot.Id == "" { + t.Errorf("wanted snapshot ID to be non-empty, got: %v", snapshot.Id) + } + if snapshot.Tree == "" { + t.Errorf("wanted snapshot tree to be non-empty, got: %v", snapshot.Tree) + } + if snapshot.Hostname == "" { + t.Errorf("wanted snapshot hostname to be non-empty, got: %v", snapshot.Hostname) + } + if snapshot.Username == "" { + t.Errorf("wanted snapshot username to be non-empty, got: %v", snapshot.Username) + } + if len(snapshot.Paths) == 0 { + t.Errorf("wanted snapshot paths to be non-empty, got: %v", snapshot.Paths) + } + if len(snapshot.Tags) == 0 { + t.Errorf("wanted snapshot tags to be non-empty, got: %v", snapshot.Tags) + } + if snapshot.UnixTimeMs() == 0 { + t.Errorf("wanted snapshot time to be non-zero, got: %v", snapshot.UnixTimeMs()) + } + if snapshot.SnapshotSummary.TreeBlobs == 0 { + t.Errorf("wanted snapshot tree blobs to be non-zero, got: %v", snapshot.SnapshotSummary.TreeBlobs) + } + if snapshot.SnapshotSummary.DataAdded == 0 { + t.Errorf("wanted snapshot data added to be non-zero, got: %v", snapshot.SnapshotSummary.DataAdded) + } + if snapshot.SnapshotSummary.TotalFilesProcessed == 0 { + t.Errorf("wanted snapshot total files processed to be non-zero, got: %v", snapshot.SnapshotSummary.TotalFilesProcessed) + } + if snapshot.SnapshotSummary.TotalBytesProcessed == 0 { + t.Errorf("wanted snapshot total bytes processed to be non-zero, got: %v", snapshot.SnapshotSummary.TotalBytesProcessed) + } + if snapshot.SnapshotSummary.DurationMs() == 0 { + t.Errorf("wanted snapshot duration to be non-zero, got: %v", snapshot.SnapshotSummary.DurationMs()) + } +} + func TestLs(t *testing.T) { t.Parallel() diff --git a/proto/v1/restic.proto b/proto/v1/restic.proto index 411a9483..7c373a1b 100644 --- a/proto/v1/restic.proto +++ b/proto/v1/restic.proto @@ -14,6 +14,22 @@ message ResticSnapshot { string parent = 6; // parent snapshot's id repeated string paths = 7; repeated string tags = 8; + SnapshotSummary summary = 9; // added in 0.17.0 restic outputs the summary in the snapshot +} + +message SnapshotSummary { + int64 files_new = 1; + int64 files_changed = 2; + int64 files_unmodified = 3; + int64 dirs_new = 4; + int64 dirs_changed = 5; + int64 dirs_unmodified = 6; + int64 data_blobs = 7; + int64 tree_blobs = 8; + int64 data_added = 9; + int64 total_files_processed = 10; + int64 total_bytes_processed = 11; + double total_duration = 12; } // ResticSnapshotList represents a list of restic snapshots. diff --git a/webui/gen/ts/v1/restic_pb.ts b/webui/gen/ts/v1/restic_pb.ts index 692435af..be4660bf 100644 --- a/webui/gen/ts/v1/restic_pb.ts +++ b/webui/gen/ts/v1/restic_pb.ts @@ -56,6 +56,13 @@ export class ResticSnapshot extends Message { */ tags: string[] = []; + /** + * added in 0.17.0 restic outputs the summary in the snapshot + * + * @generated from field: v1.SnapshotSummary summary = 9; + */ + summary?: SnapshotSummary; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -72,6 +79,7 @@ export class ResticSnapshot extends Message { { no: 6, name: "parent", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 7, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, { no: 8, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 9, name: "summary", kind: "message", T: SnapshotSummary }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): ResticSnapshot { @@ -91,6 +99,109 @@ export class ResticSnapshot extends Message { } } +/** + * @generated from message v1.SnapshotSummary + */ +export class SnapshotSummary extends Message { + /** + * @generated from field: int64 files_new = 1; + */ + filesNew = protoInt64.zero; + + /** + * @generated from field: int64 files_changed = 2; + */ + filesChanged = protoInt64.zero; + + /** + * @generated from field: int64 files_unmodified = 3; + */ + filesUnmodified = protoInt64.zero; + + /** + * @generated from field: int64 dirs_new = 4; + */ + dirsNew = protoInt64.zero; + + /** + * @generated from field: int64 dirs_changed = 5; + */ + dirsChanged = protoInt64.zero; + + /** + * @generated from field: int64 dirs_unmodified = 6; + */ + dirsUnmodified = protoInt64.zero; + + /** + * @generated from field: int64 data_blobs = 7; + */ + dataBlobs = protoInt64.zero; + + /** + * @generated from field: int64 tree_blobs = 8; + */ + treeBlobs = protoInt64.zero; + + /** + * @generated from field: int64 data_added = 9; + */ + dataAdded = protoInt64.zero; + + /** + * @generated from field: int64 total_files_processed = 10; + */ + totalFilesProcessed = protoInt64.zero; + + /** + * @generated from field: int64 total_bytes_processed = 11; + */ + totalBytesProcessed = protoInt64.zero; + + /** + * @generated from field: double total_duration = 12; + */ + totalDuration = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "v1.SnapshotSummary"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "files_new", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 2, name: "files_changed", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "files_unmodified", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "dirs_new", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 5, name: "dirs_changed", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 6, name: "dirs_unmodified", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 7, name: "data_blobs", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 8, name: "tree_blobs", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 9, name: "data_added", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 10, name: "total_files_processed", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 11, name: "total_bytes_processed", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 12, name: "total_duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SnapshotSummary { + return new SnapshotSummary().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SnapshotSummary { + return new SnapshotSummary().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SnapshotSummary { + return new SnapshotSummary().fromJsonString(jsonString, options); + } + + static equals(a: SnapshotSummary | PlainMessage | undefined, b: SnapshotSummary | PlainMessage | undefined): boolean { + return proto3.util.equals(SnapshotSummary, a, b); + } +} + /** * ResticSnapshotList represents a list of restic snapshots. *