diff --git a/gen/go/v1/service.pb.go b/gen/go/v1/service.pb.go index 5328cb02..18dcecb5 100644 --- a/gen/go/v1/service.pb.go +++ b/gen/go/v1/service.pb.go @@ -94,6 +94,69 @@ func (x *ClearHistoryRequest) GetOps() []int64 { return nil } +type ForgetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RepoId string `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` + PlanId string `protobuf:"bytes,2,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` + SnapshotId string `protobuf:"bytes,3,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` +} + +func (x *ForgetRequest) Reset() { + *x = ForgetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ForgetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForgetRequest) ProtoMessage() {} + +func (x *ForgetRequest) ProtoReflect() protoreflect.Message { + mi := &file_v1_service_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 ForgetRequest.ProtoReflect.Descriptor instead. +func (*ForgetRequest) Descriptor() ([]byte, []int) { + return file_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ForgetRequest) GetRepoId() string { + if x != nil { + return x.RepoId + } + return "" +} + +func (x *ForgetRequest) GetPlanId() string { + if x != nil { + return x.PlanId + } + return "" +} + +func (x *ForgetRequest) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + type ListSnapshotsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -106,7 +169,7 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[1] + mi := &file_v1_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -119,7 +182,7 @@ func (x *ListSnapshotsRequest) String() string { func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[1] + mi := &file_v1_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -132,7 +195,7 @@ func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSnapshotsRequest.ProtoReflect.Descriptor instead. func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{1} + return file_v1_service_proto_rawDescGZIP(), []int{2} } func (x *ListSnapshotsRequest) GetRepoId() string { @@ -164,7 +227,7 @@ type GetOperationsRequest struct { func (x *GetOperationsRequest) Reset() { *x = GetOperationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[2] + mi := &file_v1_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -177,7 +240,7 @@ func (x *GetOperationsRequest) String() string { func (*GetOperationsRequest) ProtoMessage() {} func (x *GetOperationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[2] + mi := &file_v1_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -190,7 +253,7 @@ func (x *GetOperationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOperationsRequest.ProtoReflect.Descriptor instead. func (*GetOperationsRequest) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{2} + return file_v1_service_proto_rawDescGZIP(), []int{3} } func (x *GetOperationsRequest) GetRepoId() string { @@ -242,7 +305,7 @@ type RestoreSnapshotRequest struct { func (x *RestoreSnapshotRequest) Reset() { *x = RestoreSnapshotRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[3] + mi := &file_v1_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -255,7 +318,7 @@ func (x *RestoreSnapshotRequest) String() string { func (*RestoreSnapshotRequest) ProtoMessage() {} func (x *RestoreSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[3] + mi := &file_v1_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -268,7 +331,7 @@ func (x *RestoreSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RestoreSnapshotRequest.ProtoReflect.Descriptor instead. func (*RestoreSnapshotRequest) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{3} + return file_v1_service_proto_rawDescGZIP(), []int{4} } func (x *RestoreSnapshotRequest) GetPlanId() string { @@ -312,7 +375,7 @@ type ListSnapshotFilesRequest struct { func (x *ListSnapshotFilesRequest) Reset() { *x = ListSnapshotFilesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[4] + mi := &file_v1_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -325,7 +388,7 @@ func (x *ListSnapshotFilesRequest) String() string { func (*ListSnapshotFilesRequest) ProtoMessage() {} func (x *ListSnapshotFilesRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[4] + mi := &file_v1_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -338,7 +401,7 @@ func (x *ListSnapshotFilesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSnapshotFilesRequest.ProtoReflect.Descriptor instead. func (*ListSnapshotFilesRequest) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{4} + return file_v1_service_proto_rawDescGZIP(), []int{5} } func (x *ListSnapshotFilesRequest) GetRepoId() string { @@ -374,7 +437,7 @@ type ListSnapshotFilesResponse struct { func (x *ListSnapshotFilesResponse) Reset() { *x = ListSnapshotFilesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[5] + mi := &file_v1_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -387,7 +450,7 @@ func (x *ListSnapshotFilesResponse) String() string { func (*ListSnapshotFilesResponse) ProtoMessage() {} func (x *ListSnapshotFilesResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[5] + mi := &file_v1_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -400,7 +463,7 @@ func (x *ListSnapshotFilesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSnapshotFilesResponse.ProtoReflect.Descriptor instead. func (*ListSnapshotFilesResponse) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{5} + return file_v1_service_proto_rawDescGZIP(), []int{6} } func (x *ListSnapshotFilesResponse) GetPath() string { @@ -428,7 +491,7 @@ type LogDataRequest struct { func (x *LogDataRequest) Reset() { *x = LogDataRequest{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[6] + mi := &file_v1_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -441,7 +504,7 @@ func (x *LogDataRequest) String() string { func (*LogDataRequest) ProtoMessage() {} func (x *LogDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[6] + mi := &file_v1_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -454,7 +517,7 @@ func (x *LogDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LogDataRequest.ProtoReflect.Descriptor instead. func (*LogDataRequest) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{6} + return file_v1_service_proto_rawDescGZIP(), []int{7} } func (x *LogDataRequest) GetRef() string { @@ -484,7 +547,7 @@ type LsEntry struct { func (x *LsEntry) Reset() { *x = LsEntry{} if protoimpl.UnsafeEnabled { - mi := &file_v1_service_proto_msgTypes[7] + mi := &file_v1_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -497,7 +560,7 @@ func (x *LsEntry) String() string { func (*LsEntry) ProtoMessage() {} func (x *LsEntry) ProtoReflect() protoreflect.Message { - mi := &file_v1_service_proto_msgTypes[7] + mi := &file_v1_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -510,7 +573,7 @@ func (x *LsEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use LsEntry.ProtoReflect.Descriptor instead. func (*LsEntry) Descriptor() ([]byte, []int) { - return file_v1_service_proto_rawDescGZIP(), []int{7} + return file_v1_service_proto_rawDescGZIP(), []int{8} } func (x *LsEntry) GetName() string { @@ -603,127 +666,133 @@ var file_v1_service_proto_rawDesc = []byte{ 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6f, 0x6e, 0x6c, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x03, 0x6f, 0x70, 0x73, 0x22, 0x48, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x17, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, - 0x64, 0x22, 0x92, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, - 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x70, - 0x6f, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, - 0x15, 0x0a, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x22, 0x7e, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x68, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x22, 0x56, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x25, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, - 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x22, 0xd3, 0x01, 0x0a, - 0x07, 0x4c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x28, 0x03, 0x52, 0x03, 0x6f, 0x70, 0x73, 0x22, 0x62, 0x0a, 0x0d, 0x46, 0x6f, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x14, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, + 0x69, 0x64, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x22, 0x7e, 0x0a, 0x16, 0x52, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x68, 0x0a, 0x18, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x74, 0x69, - 0x6d, 0x65, 0x32, 0xa8, 0x08, 0x0a, 0x08, 0x42, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x12, - 0x31, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x2e, 0x67, + 0x70, 0x61, 0x74, 0x68, 0x22, 0x56, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x25, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x0e, + 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, + 0x22, 0xd3, 0x01, 0x0a, 0x07, 0x4c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x32, 0xa7, 0x08, 0x0a, 0x08, 0x42, 0x61, 0x63, 0x6b, 0x72, + 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x12, 0x25, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x12, 0x21, 0x0a, + 0x07, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, + 0x12, 0x44, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x3e, 0x0a, 0x0e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x73, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x36, 0x0a, 0x06, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x05, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, + 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x00, 0x12, 0x25, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x0a, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x12, 0x21, 0x0a, 0x07, 0x41, 0x64, 0x64, - 0x52, 0x65, 0x70, 0x6f, 0x12, 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x0a, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0e, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x12, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x06, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, + 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x00, + 0x12, 0x41, 0x0a, 0x0c, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x05, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x12, 0x12, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x06, 0x46, 0x6f, - 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x12, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x05, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x35, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x11, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, - 0x0c, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x3b, 0x0a, 0x10, 0x50, 0x61, 0x74, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 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, + 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x10, 0x50, 0x61, 0x74, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x11, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, + 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 ( @@ -738,65 +807,66 @@ func file_v1_service_proto_rawDescGZIP() []byte { return file_v1_service_proto_rawDescData } -var file_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_v1_service_proto_goTypes = []interface{}{ (*ClearHistoryRequest)(nil), // 0: v1.ClearHistoryRequest - (*ListSnapshotsRequest)(nil), // 1: v1.ListSnapshotsRequest - (*GetOperationsRequest)(nil), // 2: v1.GetOperationsRequest - (*RestoreSnapshotRequest)(nil), // 3: v1.RestoreSnapshotRequest - (*ListSnapshotFilesRequest)(nil), // 4: v1.ListSnapshotFilesRequest - (*ListSnapshotFilesResponse)(nil), // 5: v1.ListSnapshotFilesResponse - (*LogDataRequest)(nil), // 6: v1.LogDataRequest - (*LsEntry)(nil), // 7: v1.LsEntry - (*emptypb.Empty)(nil), // 8: google.protobuf.Empty - (*Config)(nil), // 9: v1.Config - (*Repo)(nil), // 10: v1.Repo - (*types.StringValue)(nil), // 11: types.StringValue - (*types.Int64Value)(nil), // 12: types.Int64Value - (*OperationEvent)(nil), // 13: v1.OperationEvent - (*OperationList)(nil), // 14: v1.OperationList - (*ResticSnapshotList)(nil), // 15: v1.ResticSnapshotList - (*types.BytesValue)(nil), // 16: types.BytesValue - (*types.StringList)(nil), // 17: types.StringList + (*ForgetRequest)(nil), // 1: v1.ForgetRequest + (*ListSnapshotsRequest)(nil), // 2: v1.ListSnapshotsRequest + (*GetOperationsRequest)(nil), // 3: v1.GetOperationsRequest + (*RestoreSnapshotRequest)(nil), // 4: v1.RestoreSnapshotRequest + (*ListSnapshotFilesRequest)(nil), // 5: v1.ListSnapshotFilesRequest + (*ListSnapshotFilesResponse)(nil), // 6: v1.ListSnapshotFilesResponse + (*LogDataRequest)(nil), // 7: v1.LogDataRequest + (*LsEntry)(nil), // 8: v1.LsEntry + (*emptypb.Empty)(nil), // 9: google.protobuf.Empty + (*Config)(nil), // 10: v1.Config + (*Repo)(nil), // 11: v1.Repo + (*types.StringValue)(nil), // 12: types.StringValue + (*types.Int64Value)(nil), // 13: types.Int64Value + (*OperationEvent)(nil), // 14: v1.OperationEvent + (*OperationList)(nil), // 15: v1.OperationList + (*ResticSnapshotList)(nil), // 16: v1.ResticSnapshotList + (*types.BytesValue)(nil), // 17: types.BytesValue + (*types.StringList)(nil), // 18: types.StringList } var file_v1_service_proto_depIdxs = []int32{ - 7, // 0: v1.ListSnapshotFilesResponse.entries:type_name -> v1.LsEntry - 8, // 1: v1.Backrest.GetConfig:input_type -> google.protobuf.Empty - 9, // 2: v1.Backrest.SetConfig:input_type -> v1.Config - 10, // 3: v1.Backrest.AddRepo:input_type -> v1.Repo - 8, // 4: v1.Backrest.GetOperationEvents:input_type -> google.protobuf.Empty - 2, // 5: v1.Backrest.GetOperations:input_type -> v1.GetOperationsRequest - 1, // 6: v1.Backrest.ListSnapshots:input_type -> v1.ListSnapshotsRequest - 4, // 7: v1.Backrest.ListSnapshotFiles:input_type -> v1.ListSnapshotFilesRequest - 11, // 8: v1.Backrest.IndexSnapshots:input_type -> types.StringValue - 11, // 9: v1.Backrest.Backup:input_type -> types.StringValue - 11, // 10: v1.Backrest.Prune:input_type -> types.StringValue - 11, // 11: v1.Backrest.Forget:input_type -> types.StringValue - 3, // 12: v1.Backrest.Restore:input_type -> v1.RestoreSnapshotRequest - 11, // 13: v1.Backrest.Unlock:input_type -> types.StringValue - 11, // 14: v1.Backrest.Stats:input_type -> types.StringValue - 12, // 15: v1.Backrest.Cancel:input_type -> types.Int64Value - 6, // 16: v1.Backrest.GetLogs:input_type -> v1.LogDataRequest + 8, // 0: v1.ListSnapshotFilesResponse.entries:type_name -> v1.LsEntry + 9, // 1: v1.Backrest.GetConfig:input_type -> google.protobuf.Empty + 10, // 2: v1.Backrest.SetConfig:input_type -> v1.Config + 11, // 3: v1.Backrest.AddRepo:input_type -> v1.Repo + 9, // 4: v1.Backrest.GetOperationEvents:input_type -> google.protobuf.Empty + 3, // 5: v1.Backrest.GetOperations:input_type -> v1.GetOperationsRequest + 2, // 6: v1.Backrest.ListSnapshots:input_type -> v1.ListSnapshotsRequest + 5, // 7: v1.Backrest.ListSnapshotFiles:input_type -> v1.ListSnapshotFilesRequest + 12, // 8: v1.Backrest.IndexSnapshots:input_type -> types.StringValue + 12, // 9: v1.Backrest.Backup:input_type -> types.StringValue + 12, // 10: v1.Backrest.Prune:input_type -> types.StringValue + 1, // 11: v1.Backrest.Forget:input_type -> v1.ForgetRequest + 4, // 12: v1.Backrest.Restore:input_type -> v1.RestoreSnapshotRequest + 12, // 13: v1.Backrest.Unlock:input_type -> types.StringValue + 12, // 14: v1.Backrest.Stats:input_type -> types.StringValue + 13, // 15: v1.Backrest.Cancel:input_type -> types.Int64Value + 7, // 16: v1.Backrest.GetLogs:input_type -> v1.LogDataRequest 0, // 17: v1.Backrest.ClearHistory:input_type -> v1.ClearHistoryRequest - 11, // 18: v1.Backrest.PathAutocomplete:input_type -> types.StringValue - 9, // 19: v1.Backrest.GetConfig:output_type -> v1.Config - 9, // 20: v1.Backrest.SetConfig:output_type -> v1.Config - 9, // 21: v1.Backrest.AddRepo:output_type -> v1.Config - 13, // 22: v1.Backrest.GetOperationEvents:output_type -> v1.OperationEvent - 14, // 23: v1.Backrest.GetOperations:output_type -> v1.OperationList - 15, // 24: v1.Backrest.ListSnapshots:output_type -> v1.ResticSnapshotList - 5, // 25: v1.Backrest.ListSnapshotFiles:output_type -> v1.ListSnapshotFilesResponse - 8, // 26: v1.Backrest.IndexSnapshots:output_type -> google.protobuf.Empty - 8, // 27: v1.Backrest.Backup:output_type -> google.protobuf.Empty - 8, // 28: v1.Backrest.Prune:output_type -> google.protobuf.Empty - 8, // 29: v1.Backrest.Forget:output_type -> google.protobuf.Empty - 8, // 30: v1.Backrest.Restore:output_type -> google.protobuf.Empty - 8, // 31: v1.Backrest.Unlock:output_type -> google.protobuf.Empty - 8, // 32: v1.Backrest.Stats:output_type -> google.protobuf.Empty - 8, // 33: v1.Backrest.Cancel:output_type -> google.protobuf.Empty - 16, // 34: v1.Backrest.GetLogs:output_type -> types.BytesValue - 8, // 35: v1.Backrest.ClearHistory:output_type -> google.protobuf.Empty - 17, // 36: v1.Backrest.PathAutocomplete:output_type -> types.StringList + 12, // 18: v1.Backrest.PathAutocomplete:input_type -> types.StringValue + 10, // 19: v1.Backrest.GetConfig:output_type -> v1.Config + 10, // 20: v1.Backrest.SetConfig:output_type -> v1.Config + 10, // 21: v1.Backrest.AddRepo:output_type -> v1.Config + 14, // 22: v1.Backrest.GetOperationEvents:output_type -> v1.OperationEvent + 15, // 23: v1.Backrest.GetOperations:output_type -> v1.OperationList + 16, // 24: v1.Backrest.ListSnapshots:output_type -> v1.ResticSnapshotList + 6, // 25: v1.Backrest.ListSnapshotFiles:output_type -> v1.ListSnapshotFilesResponse + 9, // 26: v1.Backrest.IndexSnapshots:output_type -> google.protobuf.Empty + 9, // 27: v1.Backrest.Backup:output_type -> google.protobuf.Empty + 9, // 28: v1.Backrest.Prune:output_type -> google.protobuf.Empty + 9, // 29: v1.Backrest.Forget:output_type -> google.protobuf.Empty + 9, // 30: v1.Backrest.Restore:output_type -> google.protobuf.Empty + 9, // 31: v1.Backrest.Unlock:output_type -> google.protobuf.Empty + 9, // 32: v1.Backrest.Stats:output_type -> google.protobuf.Empty + 9, // 33: v1.Backrest.Cancel:output_type -> google.protobuf.Empty + 17, // 34: v1.Backrest.GetLogs:output_type -> types.BytesValue + 9, // 35: v1.Backrest.ClearHistory:output_type -> google.protobuf.Empty + 18, // 36: v1.Backrest.PathAutocomplete:output_type -> types.StringList 19, // [19:37] is the sub-list for method output_type 1, // [1:19] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -826,7 +896,7 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSnapshotsRequest); i { + switch v := v.(*ForgetRequest); i { case 0: return &v.state case 1: @@ -838,7 +908,7 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOperationsRequest); i { + switch v := v.(*ListSnapshotsRequest); i { case 0: return &v.state case 1: @@ -850,7 +920,7 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestoreSnapshotRequest); i { + switch v := v.(*GetOperationsRequest); i { case 0: return &v.state case 1: @@ -862,7 +932,7 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSnapshotFilesRequest); i { + switch v := v.(*RestoreSnapshotRequest); i { case 0: return &v.state case 1: @@ -874,7 +944,7 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSnapshotFilesResponse); i { + switch v := v.(*ListSnapshotFilesRequest); i { case 0: return &v.state case 1: @@ -886,7 +956,7 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogDataRequest); i { + switch v := v.(*ListSnapshotFilesResponse); i { case 0: return &v.state case 1: @@ -898,6 +968,18 @@ func file_v1_service_proto_init() { } } file_v1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LsEntry); i { case 0: return &v.state @@ -916,7 +998,7 @@ func file_v1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/go/v1/service_grpc.pb.go b/gen/go/v1/service_grpc.pb.go index 08abf124..ad13e56e 100644 --- a/gen/go/v1/service_grpc.pb.go +++ b/gen/go/v1/service_grpc.pb.go @@ -59,7 +59,7 @@ type BackrestClient interface { // Prune schedules a prune operation. It accepts a plan id and returns empty if the task is enqueued. Prune(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) // Forget schedules a forget operation. It accepts a plan id and returns empty if the task is enqueued. - Forget(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) + Forget(ctx context.Context, in *ForgetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Restore schedules a restore operation. Restore(ctx context.Context, in *RestoreSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Unlock synchronously attempts to unlock the repo. Will block if other operations are in progress. @@ -197,7 +197,7 @@ func (c *backrestClient) Prune(ctx context.Context, in *types.StringValue, opts return out, nil } -func (c *backrestClient) Forget(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Forget(ctx context.Context, in *ForgetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Backrest_Forget_FullMethodName, in, out, opts...) if err != nil { @@ -287,7 +287,7 @@ type BackrestServer interface { // Prune schedules a prune operation. It accepts a plan id and returns empty if the task is enqueued. Prune(context.Context, *types.StringValue) (*emptypb.Empty, error) // Forget schedules a forget operation. It accepts a plan id and returns empty if the task is enqueued. - Forget(context.Context, *types.StringValue) (*emptypb.Empty, error) + Forget(context.Context, *ForgetRequest) (*emptypb.Empty, error) // Restore schedules a restore operation. Restore(context.Context, *RestoreSnapshotRequest) (*emptypb.Empty, error) // Unlock synchronously attempts to unlock the repo. Will block if other operations are in progress. @@ -339,7 +339,7 @@ func (UnimplementedBackrestServer) Backup(context.Context, *types.StringValue) ( func (UnimplementedBackrestServer) Prune(context.Context, *types.StringValue) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Prune not implemented") } -func (UnimplementedBackrestServer) Forget(context.Context, *types.StringValue) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Forget(context.Context, *ForgetRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Forget not implemented") } func (UnimplementedBackrestServer) Restore(context.Context, *RestoreSnapshotRequest) (*emptypb.Empty, error) { @@ -560,7 +560,7 @@ func _Backrest_Prune_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Backrest_Forget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.StringValue) + in := new(ForgetRequest) if err := dec(in); err != nil { return nil, err } @@ -572,7 +572,7 @@ func _Backrest_Forget_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: Backrest_Forget_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackrestServer).Forget(ctx, req.(*types.StringValue)) + return srv.(BackrestServer).Forget(ctx, req.(*ForgetRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/gen/go/v1/v1connect/service.connect.go b/gen/go/v1/v1connect/service.connect.go index 5158de40..af6003c0 100644 --- a/gen/go/v1/v1connect/service.connect.go +++ b/gen/go/v1/v1connect/service.connect.go @@ -115,7 +115,7 @@ type BackrestClient interface { // Prune schedules a prune operation. It accepts a plan id and returns empty if the task is enqueued. Prune(context.Context, *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) // Forget schedules a forget operation. It accepts a plan id and returns empty if the task is enqueued. - Forget(context.Context, *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) + Forget(context.Context, *connect.Request[v1.ForgetRequest]) (*connect.Response[emptypb.Empty], error) // Restore schedules a restore operation. Restore(context.Context, *connect.Request[v1.RestoreSnapshotRequest]) (*connect.Response[emptypb.Empty], error) // Unlock synchronously attempts to unlock the repo. Will block if other operations are in progress. @@ -202,7 +202,7 @@ func NewBackrestClient(httpClient connect.HTTPClient, baseURL string, opts ...co connect.WithSchema(backrestPruneMethodDescriptor), connect.WithClientOptions(opts...), ), - forget: connect.NewClient[types.StringValue, emptypb.Empty]( + forget: connect.NewClient[v1.ForgetRequest, emptypb.Empty]( httpClient, baseURL+BackrestForgetProcedure, connect.WithSchema(backrestForgetMethodDescriptor), @@ -265,7 +265,7 @@ type backrestClient struct { indexSnapshots *connect.Client[types.StringValue, emptypb.Empty] backup *connect.Client[types.StringValue, emptypb.Empty] prune *connect.Client[types.StringValue, emptypb.Empty] - forget *connect.Client[types.StringValue, emptypb.Empty] + forget *connect.Client[v1.ForgetRequest, emptypb.Empty] restore *connect.Client[v1.RestoreSnapshotRequest, emptypb.Empty] unlock *connect.Client[types.StringValue, emptypb.Empty] stats *connect.Client[types.StringValue, emptypb.Empty] @@ -326,7 +326,7 @@ func (c *backrestClient) Prune(ctx context.Context, req *connect.Request[types.S } // Forget calls v1.Backrest.Forget. -func (c *backrestClient) Forget(ctx context.Context, req *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) { +func (c *backrestClient) Forget(ctx context.Context, req *connect.Request[v1.ForgetRequest]) (*connect.Response[emptypb.Empty], error) { return c.forget.CallUnary(ctx, req) } @@ -381,7 +381,7 @@ type BackrestHandler interface { // Prune schedules a prune operation. It accepts a plan id and returns empty if the task is enqueued. Prune(context.Context, *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) // Forget schedules a forget operation. It accepts a plan id and returns empty if the task is enqueued. - Forget(context.Context, *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) + Forget(context.Context, *connect.Request[v1.ForgetRequest]) (*connect.Response[emptypb.Empty], error) // Restore schedules a restore operation. Restore(context.Context, *connect.Request[v1.RestoreSnapshotRequest]) (*connect.Response[emptypb.Empty], error) // Unlock synchronously attempts to unlock the repo. Will block if other operations are in progress. @@ -599,7 +599,7 @@ func (UnimplementedBackrestHandler) Prune(context.Context, *connect.Request[type return nil, connect.NewError(connect.CodeUnimplemented, errors.New("v1.Backrest.Prune is not implemented")) } -func (UnimplementedBackrestHandler) Forget(context.Context, *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) { +func (UnimplementedBackrestHandler) Forget(context.Context, *connect.Request[v1.ForgetRequest]) (*connect.Response[emptypb.Empty], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("v1.Backrest.Forget is not implemented")) } diff --git a/internal/api/backresthandler.go b/internal/api/backresthandler.go index 8b0c396c..5ecec918 100644 --- a/internal/api/backresthandler.go +++ b/internal/api/backresthandler.go @@ -291,22 +291,40 @@ func (s *BackrestHandler) Backup(ctx context.Context, req *connect.Request[types return connect.NewResponse(&emptypb.Empty{}), err } -func (s *BackrestHandler) Forget(ctx context.Context, req *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) { - plan, err := s.orchestrator.GetPlan(req.Msg.Value) - if err != nil { - return nil, fmt.Errorf("failed to get plan %q: %w", req.Msg.Value, err) +func (s *BackrestHandler) Forget(ctx context.Context, req *connect.Request[v1.ForgetRequest]) (*connect.Response[emptypb.Empty], error) { + at := time.Now() + var err error + if req.Msg.SnapshotId != "" && req.Msg.PlanId != "" && req.Msg.RepoId != "" { + wait := make(chan struct{}) + s.orchestrator.ScheduleTask( + orchestrator.NewOneoffForgetSnapshotTask(s.orchestrator, req.Msg.RepoId, req.Msg.PlanId, req.Msg.SnapshotId, at), + orchestrator.TaskPriorityInteractive+orchestrator.TaskPriorityForget, func(e error) { + err = e + close(wait) + }) + <-wait + } else if req.Msg.RepoId != "" && req.Msg.PlanId != "" { + plan, err := s.orchestrator.GetPlan(req.Msg.PlanId) + if err != nil { + return nil, fmt.Errorf("failed to get plan %q: %w", req.Msg.PlanId, err) + } + + wait := make(chan struct{}) + s.orchestrator.ScheduleTask( + orchestrator.NewOneoffForgetTask(s.orchestrator, plan, "", at), + orchestrator.TaskPriorityInteractive+orchestrator.TaskPriorityForget, func(e error) { + err = e + close(wait) + }) + <-wait + } else { + return nil, errors.New("must specify repoId and planId and (optionally) snapshotId") } - at := time.Now() - var wg sync.WaitGroup - wg.Add(1) - s.orchestrator.ScheduleTask(orchestrator.NewOneoffForgetTask(s.orchestrator, plan, "", at), orchestrator.TaskPriorityInteractive+orchestrator.TaskPriorityForget, func(e error) { - err = e - wg.Done() - }) - s.orchestrator.ScheduleTask(orchestrator.NewOneoffIndexSnapshotsTask(s.orchestrator, plan.Repo, at), orchestrator.TaskPriorityInteractive+orchestrator.TaskPriorityIndexSnapshots) - wg.Wait() - return connect.NewResponse(&emptypb.Empty{}), err + if err != nil { + return nil, err + } + return connect.NewResponse(&emptypb.Empty{}), nil } func (s *BackrestHandler) Prune(ctx context.Context, req *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error) { diff --git a/internal/orchestrator/repo.go b/internal/orchestrator/repo.go index ab780be7..51479bab 100644 --- a/internal/orchestrator/repo.go +++ b/internal/orchestrator/repo.go @@ -137,6 +137,14 @@ func (r *RepoOrchestrator) Forget(ctx context.Context, plan *v1.Plan) ([]*v1.Res return forgotten, nil } +func (r *RepoOrchestrator) ForgetSnapshot(ctx context.Context, snapshotId string) error { + r.mu.Lock() + defer r.mu.Unlock() + + r.l.Debug("Forget snapshot with ID", zap.String("snapshot", snapshotId)) + return r.repo.ForgetSnapshot(ctx, snapshotId) +} + func (r *RepoOrchestrator) Prune(ctx context.Context, output io.Writer) error { r.mu.Lock() defer r.mu.Unlock() diff --git a/internal/orchestrator/taskforget.go b/internal/orchestrator/taskforget.go index 1bf9f134..b7d55385 100644 --- a/internal/orchestrator/taskforget.go +++ b/internal/orchestrator/taskforget.go @@ -2,7 +2,6 @@ package orchestrator import ( "context" - "errors" "fmt" "time" @@ -11,7 +10,6 @@ import ( "github.com/garethgeorge/backrest/internal/oplog/indexutil" "github.com/hashicorp/go-multierror" "go.uber.org/zap" - "google.golang.org/protobuf/proto" ) // ForgetTask tracks a forget operation. @@ -60,10 +58,6 @@ func (t *ForgetTask) Next(now time.Time) *time.Time { } func (t *ForgetTask) Run(ctx context.Context) error { - if t.plan.Retention == nil || proto.Equal(t.plan.Retention, &v1.RetentionPolicy{}) { - return errors.New("plan does not have a retention policy") - } - if err := t.runWithOpAndContext(ctx, func(ctx context.Context, op *v1.Operation) error { forgetOp := &v1.Operation_OperationForget{ OperationForget: &v1.OperationForget{}, diff --git a/internal/orchestrator/taskforgetsnapshot.go b/internal/orchestrator/taskforgetsnapshot.go new file mode 100644 index 00000000..0cc435ee --- /dev/null +++ b/internal/orchestrator/taskforgetsnapshot.go @@ -0,0 +1,94 @@ +package orchestrator + +import ( + "context" + "fmt" + "time" + + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" + "github.com/hashicorp/go-multierror" + "go.uber.org/zap" +) + +// ForgetTask tracks a forget operation. +type ForgetSnapshotTask struct { + TaskWithOperation + repoId string + planId string + forgetSnapshot string + at *time.Time +} + +var _ Task = &ForgetSnapshotTask{} + +func NewOneoffForgetSnapshotTask(orchestrator *Orchestrator, repoId, planId, forgetSnapshot string, at time.Time) *ForgetSnapshotTask { + return &ForgetSnapshotTask{ + TaskWithOperation: TaskWithOperation{ + orch: orchestrator, + }, + repoId: repoId, + planId: planId, + at: &at, + forgetSnapshot: forgetSnapshot, + } +} + +func (t *ForgetSnapshotTask) Name() string { + return fmt.Sprintf("forget snapshot %q", t.forgetSnapshot) +} + +func (t *ForgetSnapshotTask) Next(now time.Time) *time.Time { + ret := t.at + if ret != nil { + t.at = nil + if err := t.setOperation(&v1.Operation{ + PlanId: t.planId, + RepoId: t.repoId, + UnixTimeStartMs: timeToUnixMillis(*ret), + Status: v1.OperationStatus_STATUS_PENDING, + Op: &v1.Operation_OperationForget{}, + }); err != nil { + zap.S().Errorf("task %v failed to add operation to oplog: %v", t.Name(), err) + return nil + } + } + return ret +} + +func (t *ForgetSnapshotTask) Run(ctx context.Context) error { + id := t.op.Id + if err := t.runWithOpAndContext(ctx, func(ctx context.Context, op *v1.Operation) error { + repo, err := t.orch.GetRepo(t.repoId) + if err != nil { + return fmt.Errorf("get repo %q: %w", t.repoId, err) + } + + // Find snapshot to forget + var ops []*v1.Operation + t.orch.OpLog.ForEachBySnapshotId(t.forgetSnapshot, indexutil.CollectAll(), func(op *v1.Operation) error { + ops = append(ops, op) + return nil + }) + + for _, op := range ops { + if indexOp, ok := op.Op.(*v1.Operation_OperationIndexSnapshot); ok { + err := repo.ForgetSnapshot(ctx, op.SnapshotId) + if err != nil { + return fmt.Errorf("forget %q: %w", op.SnapshotId, err) + } + indexOp.OperationIndexSnapshot.Forgot = true + if e := t.orch.OpLog.Update(op); err != nil { + err = multierror.Append(err, fmt.Errorf("mark index snapshot %v as forgotten: %w", op.Id, e)) + continue + } + } + } + + return err + }); err != nil { + return err + } + + return t.orch.OpLog.Delete(id) +} diff --git a/pkg/restic/restic.go b/pkg/restic/restic.go index a8497a8d..ff8adb89 100644 --- a/pkg/restic/restic.go +++ b/pkg/restic/restic.go @@ -227,6 +227,26 @@ func (r *Repo) Forget(ctx context.Context, policy *RetentionPolicy, opts ...Gene return &result[0], nil } +func (r *Repo) ForgetSnapshot(ctx context.Context, snapshotId string, opts ...GenericOption) error { + opt := resolveOpts(opts) + + args := []string{"forget", "--json", snapshotId} + args = append(args, r.extraArgs...) + args = append(args, opt.extraArgs...) + args = append(args, snapshotId) + + cmd := exec.CommandContext(ctx, r.cmd, args...) + cmd.Env = append(cmd.Env, r.buildEnv()...) + cmd.Env = append(cmd.Env, opt.extraEnv...) + + output, err := cmd.CombinedOutput() + if err != nil { + return newCmdError(cmd, string(output), err) + } + + return nil +} + func (r *Repo) Prune(ctx context.Context, pruneOutput io.Writer, opts ...GenericOption) error { opt := resolveOpts(opts) diff --git a/pkg/restic/restic_test.go b/pkg/restic/restic_test.go index d619f221..7001d2b7 100644 --- a/pkg/restic/restic_test.go +++ b/pkg/restic/restic_test.go @@ -252,10 +252,10 @@ func TestResticForget(t *testing.T) { ids = append(ids, output.SnapshotId) } - // prune all snapshots + // forget snapshots res, err := r.Forget(context.Background(), &RetentionPolicy{KeepLastN: 3}) if err != nil { - t.Fatalf("failed to prune snapshots: %v", err) + t.Fatalf("failed to forget snapshots: %v", err) } if len(res.Keep) != 3 { @@ -286,6 +286,45 @@ func TestResticForget(t *testing.T) { } } +func TestForgetSnapshotId(t *testing.T) { + t.Parallel() + + repo := t.TempDir() + r := NewRepo(helpers.ResticBinary(t), &v1.Repo{ + Id: "test", + Uri: repo, + Password: "test", + }, WithFlags("--no-cache")) + if err := r.Init(context.Background()); err != nil { + t.Fatalf("failed to init repo: %v", err) + } + + testData := helpers.CreateTestData(t) + + ids := make([]string, 0) + for i := 0; i < 5; i++ { + output, err := r.Backup(context.Background(), nil, WithBackupPaths(testData)) + if err != nil { + t.Fatalf("failed to backup and create new snapshot: %v", err) + } + ids = append(ids, output.SnapshotId) + } + + // forget snapshot by ID + err := r.ForgetSnapshot(context.Background(), ids[0]) + if err != nil { + t.Fatalf("failed to forget snapshots: %v", err) + } + + snapshots, err := r.Snapshots(context.Background()) + if err != nil { + t.Fatalf("failed to list snapshots: %v", err) + } + if len(snapshots) != 4 { + t.Errorf("wanted 4 snapshots, got: %d", len(snapshots)) + } +} + func TestResticPrune(t *testing.T) { t.Parallel() diff --git a/proto/v1/service.proto b/proto/v1/service.proto index 57bd227f..0e28f5e5 100644 --- a/proto/v1/service.proto +++ b/proto/v1/service.proto @@ -36,7 +36,7 @@ service Backrest { rpc Prune(types.StringValue) returns (google.protobuf.Empty) {} // Forget schedules a forget operation. It accepts a plan id and returns empty if the task is enqueued. - rpc Forget(types.StringValue) returns (google.protobuf.Empty) {} + rpc Forget(ForgetRequest) returns (google.protobuf.Empty) {} // Restore schedules a restore operation. rpc Restore(RestoreSnapshotRequest) returns (google.protobuf.Empty) {} @@ -67,6 +67,12 @@ message ClearHistoryRequest { repeated int64 ops = 4; } +message ForgetRequest { + string repo_id = 1; + string plan_id = 2; + string snapshot_id = 3; +} + message ListSnapshotsRequest { string repo_id = 1; string plan_id = 2; diff --git a/webui/gen/ts/v1/service_connect.ts b/webui/gen/ts/v1/service_connect.ts index 2d0997fb..4816f668 100644 --- a/webui/gen/ts/v1/service_connect.ts +++ b/webui/gen/ts/v1/service_connect.ts @@ -6,7 +6,7 @@ import { Empty, MethodKind } from "@bufbuild/protobuf"; import { Config, Repo } from "./config_pb.js"; import { OperationEvent, OperationList } from "./operations_pb.js"; -import { ClearHistoryRequest, GetOperationsRequest, ListSnapshotFilesRequest, ListSnapshotFilesResponse, ListSnapshotsRequest, LogDataRequest, RestoreSnapshotRequest } from "./service_pb.js"; +import { ClearHistoryRequest, ForgetRequest, GetOperationsRequest, ListSnapshotFilesRequest, ListSnapshotFilesResponse, ListSnapshotsRequest, LogDataRequest, RestoreSnapshotRequest } from "./service_pb.js"; import { ResticSnapshotList } from "./restic_pb.js"; import { BytesValue, Int64Value, StringList, StringValue } from "../types/value_pb.js"; @@ -119,7 +119,7 @@ export const Backrest = { */ forget: { name: "Forget", - I: StringValue, + I: ForgetRequest, O: Empty, kind: MethodKind.Unary, }, diff --git a/webui/gen/ts/v1/service_pb.ts b/webui/gen/ts/v1/service_pb.ts index a4934497..468af18c 100644 --- a/webui/gen/ts/v1/service_pb.ts +++ b/webui/gen/ts/v1/service_pb.ts @@ -61,6 +61,55 @@ export class ClearHistoryRequest extends Message { } } +/** + * @generated from message v1.ForgetRequest + */ +export class ForgetRequest extends Message { + /** + * @generated from field: string repo_id = 1; + */ + repoId = ""; + + /** + * @generated from field: string plan_id = 2; + */ + planId = ""; + + /** + * @generated from field: string snapshot_id = 3; + */ + snapshotId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "v1.ForgetRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "repo_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "plan_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "snapshot_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ForgetRequest { + return new ForgetRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ForgetRequest { + return new ForgetRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ForgetRequest { + return new ForgetRequest().fromJsonString(jsonString, options); + } + + static equals(a: ForgetRequest | PlainMessage | undefined, b: ForgetRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ForgetRequest, a, b); + } +} + /** * @generated from message v1.ListSnapshotsRequest */ diff --git a/webui/src/components/OperationTree.tsx b/webui/src/components/OperationTree.tsx index da917cf9..144c521b 100644 --- a/webui/src/components/OperationTree.tsx +++ b/webui/src/components/OperationTree.tsx @@ -10,7 +10,7 @@ import { subscribeToOperations, unsubscribeFromOperations, } from "../state/oplog"; -import { Button, Col, Divider, Empty, Modal, Row, Tree } from "antd"; +import { Button, Col, Divider, Empty, Modal, Row, Tooltip, Tree } from "antd"; import _ from "lodash"; import { DataNode } from "antd/es/tree"; import { @@ -29,10 +29,11 @@ import { import { OperationEvent, OperationEventType, OperationStatus } from "../../gen/ts/v1/operations_pb"; import { useAlertApi } from "./Alerts"; import { OperationList } from "./OperationList"; -import { ClearHistoryRequest, GetOperationsRequest } from "../../gen/ts/v1/service_pb"; +import { ClearHistoryRequest, ForgetRequest, GetOperationsRequest } from "../../gen/ts/v1/service_pb"; import { isMobile } from "../lib/browserutil"; import { useShowModal } from "./ModalManager"; import { backrestService } from "../api"; +import { ConfirmButton } from "./SpinButton"; type OpTreeNode = DataNode & { backup?: BackupInfo; @@ -263,9 +264,23 @@ const sortByKey = (a: OpTreeNode, b: OpTreeNode) => { }; const BackupView = ({ backup }: { backup?: BackupInfo }) => { + const alertApi = useAlertApi(); if (!backup) { return ; } else { + const doDeleteSnapshot = async () => { + try { + await backrestService.forget(new ForgetRequest({ + planId: backup.planId!, + repoId: backup.repoId!, + snapshotId: backup.snapshotId! + })); + alertApi!.success("Snapshot forgotten."); + } catch (e) { + alertApi!.error("Failed to forget snapshot: " + e); + } + } + return
{ }}>

Backup on {formatTime(backup.displayTime)}

- + {backup.snapshotId ? + + Forget Snapshot (Destructive) + : { + backrestService.clearHistory(new ClearHistoryRequest({ + ops: backup.operations.map((op) => op.id), + })) + }} + > + Delete Event + }
op && !shouldHideOperation(op)} /> diff --git a/webui/src/components/SpinButton.tsx b/webui/src/components/SpinButton.tsx index 6ef5d7b4..dcf537d0 100644 --- a/webui/src/components/SpinButton.tsx +++ b/webui/src/components/SpinButton.tsx @@ -45,6 +45,7 @@ export const ConfirmButton: React.FC { setClicked(false); }, confirmTimeout); + return; } setClicked(false); diff --git a/webui/src/state/oplog.ts b/webui/src/state/oplog.ts index 0ae248cf..e27413b4 100644 --- a/webui/src/state/oplog.ts +++ b/webui/src/state/oplog.ts @@ -199,6 +199,7 @@ export class BackupInfoCollector { snapshotInfo, forgotten, hidden, + snapshotId: operations[0].snapshotId, planId: operations[0].planId, repoId: operations[0].repoId, };