feat: add a "test configuration" button to aid users setting up new repos (#582)
Build Snapshot Release / build (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled

This commit is contained in:
Gareth
2024-12-01 15:00:31 -08:00
committed by GitHub
parent d955350973
commit 1bb3cd70fd
12 changed files with 414 additions and 170 deletions
+91 -43
View File
@@ -20,6 +20,51 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type BoolValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *BoolValue) Reset() {
*x = BoolValue{}
mi := &file_types_value_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BoolValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BoolValue) ProtoMessage() {}
func (x *BoolValue) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BoolValue.ProtoReflect.Descriptor instead.
func (*BoolValue) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{0}
}
func (x *BoolValue) GetValue() bool {
if x != nil {
return x.Value
}
return false
}
type StringValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -30,7 +75,7 @@ type StringValue struct {
func (x *StringValue) Reset() {
*x = StringValue{}
mi := &file_types_value_proto_msgTypes[0]
mi := &file_types_value_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -42,7 +87,7 @@ func (x *StringValue) String() string {
func (*StringValue) ProtoMessage() {}
func (x *StringValue) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[0]
mi := &file_types_value_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -55,7 +100,7 @@ func (x *StringValue) ProtoReflect() protoreflect.Message {
// Deprecated: Use StringValue.ProtoReflect.Descriptor instead.
func (*StringValue) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{0}
return file_types_value_proto_rawDescGZIP(), []int{1}
}
func (x *StringValue) GetValue() string {
@@ -75,7 +120,7 @@ type BytesValue struct {
func (x *BytesValue) Reset() {
*x = BytesValue{}
mi := &file_types_value_proto_msgTypes[1]
mi := &file_types_value_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -87,7 +132,7 @@ func (x *BytesValue) String() string {
func (*BytesValue) ProtoMessage() {}
func (x *BytesValue) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[1]
mi := &file_types_value_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -100,7 +145,7 @@ func (x *BytesValue) ProtoReflect() protoreflect.Message {
// Deprecated: Use BytesValue.ProtoReflect.Descriptor instead.
func (*BytesValue) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{1}
return file_types_value_proto_rawDescGZIP(), []int{2}
}
func (x *BytesValue) GetValue() []byte {
@@ -120,7 +165,7 @@ type StringList struct {
func (x *StringList) Reset() {
*x = StringList{}
mi := &file_types_value_proto_msgTypes[2]
mi := &file_types_value_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -132,7 +177,7 @@ func (x *StringList) String() string {
func (*StringList) ProtoMessage() {}
func (x *StringList) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[2]
mi := &file_types_value_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -145,7 +190,7 @@ func (x *StringList) ProtoReflect() protoreflect.Message {
// Deprecated: Use StringList.ProtoReflect.Descriptor instead.
func (*StringList) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{2}
return file_types_value_proto_rawDescGZIP(), []int{3}
}
func (x *StringList) GetValues() []string {
@@ -165,7 +210,7 @@ type Int64Value struct {
func (x *Int64Value) Reset() {
*x = Int64Value{}
mi := &file_types_value_proto_msgTypes[3]
mi := &file_types_value_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -177,7 +222,7 @@ func (x *Int64Value) String() string {
func (*Int64Value) ProtoMessage() {}
func (x *Int64Value) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[3]
mi := &file_types_value_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -190,7 +235,7 @@ func (x *Int64Value) ProtoReflect() protoreflect.Message {
// Deprecated: Use Int64Value.ProtoReflect.Descriptor instead.
func (*Int64Value) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{3}
return file_types_value_proto_rawDescGZIP(), []int{4}
}
func (x *Int64Value) GetValue() int64 {
@@ -210,7 +255,7 @@ type Int64List struct {
func (x *Int64List) Reset() {
*x = Int64List{}
mi := &file_types_value_proto_msgTypes[4]
mi := &file_types_value_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -222,7 +267,7 @@ func (x *Int64List) String() string {
func (*Int64List) ProtoMessage() {}
func (x *Int64List) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[4]
mi := &file_types_value_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -235,7 +280,7 @@ func (x *Int64List) ProtoReflect() protoreflect.Message {
// Deprecated: Use Int64List.ProtoReflect.Descriptor instead.
func (*Int64List) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{4}
return file_types_value_proto_rawDescGZIP(), []int{5}
}
func (x *Int64List) GetValues() []int64 {
@@ -253,7 +298,7 @@ type Empty struct {
func (x *Empty) Reset() {
*x = Empty{}
mi := &file_types_value_proto_msgTypes[5]
mi := &file_types_value_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -265,7 +310,7 @@ func (x *Empty) String() string {
func (*Empty) ProtoMessage() {}
func (x *Empty) ProtoReflect() protoreflect.Message {
mi := &file_types_value_proto_msgTypes[5]
mi := &file_types_value_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -278,30 +323,32 @@ func (x *Empty) ProtoReflect() protoreflect.Message {
// Deprecated: Use Empty.ProtoReflect.Descriptor instead.
func (*Empty) Descriptor() ([]byte, []int) {
return file_types_value_proto_rawDescGZIP(), []int{5}
return file_types_value_proto_rawDescGZIP(), []int{6}
}
var File_types_value_proto protoreflect.FileDescriptor
var file_types_value_proto_rawDesc = []byte{
0x0a, 0x11, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x22, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x22, 0x24, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x0a, 0x49, 0x6e, 0x74,
0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a,
0x09, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 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, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f,
0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a,
0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x24, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x0a,
0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x23, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2f,
0x5a, 0x2d, 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, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -316,14 +363,15 @@ func file_types_value_proto_rawDescGZIP() []byte {
return file_types_value_proto_rawDescData
}
var file_types_value_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_types_value_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_types_value_proto_goTypes = []any{
(*StringValue)(nil), // 0: types.StringValue
(*BytesValue)(nil), // 1: types.BytesValue
(*StringList)(nil), // 2: types.StringList
(*Int64Value)(nil), // 3: types.Int64Value
(*Int64List)(nil), // 4: types.Int64List
(*Empty)(nil), // 5: types.Empty
(*BoolValue)(nil), // 0: types.BoolValue
(*StringValue)(nil), // 1: types.StringValue
(*BytesValue)(nil), // 2: types.BytesValue
(*StringList)(nil), // 3: types.StringList
(*Int64Value)(nil), // 4: types.Int64Value
(*Int64List)(nil), // 5: types.Int64List
(*Empty)(nil), // 6: types.Empty
}
var file_types_value_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@@ -344,7 +392,7 @@ func file_types_value_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_types_value_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
+113 -106
View File
@@ -1272,78 +1272,82 @@ var file_v1_service_proto_rawDesc = []byte{
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18,
0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x41, 0x64, 0x64, 0x65,
0x64, 0x32, 0xc6, 0x08, 0x0a, 0x08, 0x42, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x12, 0x31,
0x64, 0x32, 0xf7, 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, 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,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63,
0x6b, 0x52, 0x65, 0x70, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x08, 0x2e, 0x76, 0x31,
0x2e, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6f,
0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, 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, 0x3d, 0x0a, 0x0a, 0x44, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x54, 0x61, 0x73,
0x6b, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x54, 0x61, 0x73,
0x6b, 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, 0x3d, 0x0a, 0x0a, 0x44, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x54, 0x61, 0x73, 0x6b,
0x12, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x54, 0x61, 0x73, 0x6b,
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, 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,
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, 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, 0x34, 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, 0x30, 0x01, 0x12, 0x38, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d,
0x6d, 0x61, 0x6e, 0x64, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6d,
0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x00,
0x12, 0x39, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55,
0x52, 0x4c, 0x12, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 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, 0x12, 0x4d, 0x0a, 0x13, 0x47,
0x65, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61,
0x72, 0x64, 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, 0x1c, 0x2e, 0x76, 0x31, 0x2e,
0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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,
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, 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, 0x34, 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, 0x30, 0x01, 0x12, 0x38, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x43, 0x6f,
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x6f,
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x00, 0x12, 0x39, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
0x55, 0x52, 0x4c, 0x12, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36,
0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 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, 0x12, 0x4d, 0x0a, 0x13,
0x47, 0x65, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f,
0x61, 0x72, 0x64, 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, 0x1c, 0x2e, 0x76, 0x31,
0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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 (
@@ -1383,11 +1387,12 @@ var file_v1_service_proto_goTypes = []any{
(*Repo)(nil), // 19: v1.Repo
(*types.StringValue)(nil), // 20: types.StringValue
(*types.Int64Value)(nil), // 21: types.Int64Value
(*OperationEvent)(nil), // 22: v1.OperationEvent
(*OperationList)(nil), // 23: v1.OperationList
(*ResticSnapshotList)(nil), // 24: v1.ResticSnapshotList
(*types.BytesValue)(nil), // 25: types.BytesValue
(*types.StringList)(nil), // 26: types.StringList
(*types.BoolValue)(nil), // 22: types.BoolValue
(*OperationEvent)(nil), // 23: v1.OperationEvent
(*OperationList)(nil), // 24: v1.OperationList
(*ResticSnapshotList)(nil), // 25: v1.ResticSnapshotList
(*types.BytesValue)(nil), // 26: types.BytesValue
(*types.StringList)(nil), // 27: types.StringList
}
var file_v1_service_proto_depIdxs = []int32{
0, // 0: v1.DoRepoTaskRequest.task:type_name -> v1.DoRepoTaskRequest.Task
@@ -1400,42 +1405,44 @@ var file_v1_service_proto_depIdxs = []int32{
16, // 7: v1.SummaryDashboardResponse.BackupChart.status:type_name -> v1.OperationStatus
17, // 8: v1.Backrest.GetConfig:input_type -> google.protobuf.Empty
18, // 9: v1.Backrest.SetConfig:input_type -> v1.Config
19, // 10: v1.Backrest.AddRepo:input_type -> v1.Repo
17, // 11: v1.Backrest.GetOperationEvents:input_type -> google.protobuf.Empty
6, // 12: v1.Backrest.GetOperations:input_type -> v1.GetOperationsRequest
5, // 13: v1.Backrest.ListSnapshots:input_type -> v1.ListSnapshotsRequest
8, // 14: v1.Backrest.ListSnapshotFiles:input_type -> v1.ListSnapshotFilesRequest
20, // 15: v1.Backrest.Backup:input_type -> types.StringValue
2, // 16: v1.Backrest.DoRepoTask:input_type -> v1.DoRepoTaskRequest
4, // 17: v1.Backrest.Forget:input_type -> v1.ForgetRequest
7, // 18: v1.Backrest.Restore:input_type -> v1.RestoreSnapshotRequest
21, // 19: v1.Backrest.Cancel:input_type -> types.Int64Value
10, // 20: v1.Backrest.GetLogs:input_type -> v1.LogDataRequest
12, // 21: v1.Backrest.RunCommand:input_type -> v1.RunCommandRequest
21, // 22: v1.Backrest.GetDownloadURL:input_type -> types.Int64Value
3, // 23: v1.Backrest.ClearHistory:input_type -> v1.ClearHistoryRequest
20, // 24: v1.Backrest.PathAutocomplete:input_type -> types.StringValue
17, // 25: v1.Backrest.GetSummaryDashboard:input_type -> google.protobuf.Empty
18, // 26: v1.Backrest.GetConfig:output_type -> v1.Config
18, // 27: v1.Backrest.SetConfig:output_type -> v1.Config
18, // 28: v1.Backrest.AddRepo:output_type -> v1.Config
22, // 29: v1.Backrest.GetOperationEvents:output_type -> v1.OperationEvent
23, // 30: v1.Backrest.GetOperations:output_type -> v1.OperationList
24, // 31: v1.Backrest.ListSnapshots:output_type -> v1.ResticSnapshotList
9, // 32: v1.Backrest.ListSnapshotFiles:output_type -> v1.ListSnapshotFilesResponse
17, // 33: v1.Backrest.Backup:output_type -> google.protobuf.Empty
17, // 34: v1.Backrest.DoRepoTask:output_type -> google.protobuf.Empty
17, // 35: v1.Backrest.Forget:output_type -> google.protobuf.Empty
17, // 36: v1.Backrest.Restore:output_type -> google.protobuf.Empty
17, // 37: v1.Backrest.Cancel:output_type -> google.protobuf.Empty
25, // 38: v1.Backrest.GetLogs:output_type -> types.BytesValue
21, // 39: v1.Backrest.RunCommand:output_type -> types.Int64Value
20, // 40: v1.Backrest.GetDownloadURL:output_type -> types.StringValue
17, // 41: v1.Backrest.ClearHistory:output_type -> google.protobuf.Empty
26, // 42: v1.Backrest.PathAutocomplete:output_type -> types.StringList
13, // 43: v1.Backrest.GetSummaryDashboard:output_type -> v1.SummaryDashboardResponse
26, // [26:44] is the sub-list for method output_type
8, // [8:26] is the sub-list for method input_type
19, // 10: v1.Backrest.CheckRepoExists:input_type -> v1.Repo
19, // 11: v1.Backrest.AddRepo:input_type -> v1.Repo
17, // 12: v1.Backrest.GetOperationEvents:input_type -> google.protobuf.Empty
6, // 13: v1.Backrest.GetOperations:input_type -> v1.GetOperationsRequest
5, // 14: v1.Backrest.ListSnapshots:input_type -> v1.ListSnapshotsRequest
8, // 15: v1.Backrest.ListSnapshotFiles:input_type -> v1.ListSnapshotFilesRequest
20, // 16: v1.Backrest.Backup:input_type -> types.StringValue
2, // 17: v1.Backrest.DoRepoTask:input_type -> v1.DoRepoTaskRequest
4, // 18: v1.Backrest.Forget:input_type -> v1.ForgetRequest
7, // 19: v1.Backrest.Restore:input_type -> v1.RestoreSnapshotRequest
21, // 20: v1.Backrest.Cancel:input_type -> types.Int64Value
10, // 21: v1.Backrest.GetLogs:input_type -> v1.LogDataRequest
12, // 22: v1.Backrest.RunCommand:input_type -> v1.RunCommandRequest
21, // 23: v1.Backrest.GetDownloadURL:input_type -> types.Int64Value
3, // 24: v1.Backrest.ClearHistory:input_type -> v1.ClearHistoryRequest
20, // 25: v1.Backrest.PathAutocomplete:input_type -> types.StringValue
17, // 26: v1.Backrest.GetSummaryDashboard:input_type -> google.protobuf.Empty
18, // 27: v1.Backrest.GetConfig:output_type -> v1.Config
18, // 28: v1.Backrest.SetConfig:output_type -> v1.Config
22, // 29: v1.Backrest.CheckRepoExists:output_type -> types.BoolValue
18, // 30: v1.Backrest.AddRepo:output_type -> v1.Config
23, // 31: v1.Backrest.GetOperationEvents:output_type -> v1.OperationEvent
24, // 32: v1.Backrest.GetOperations:output_type -> v1.OperationList
25, // 33: v1.Backrest.ListSnapshots:output_type -> v1.ResticSnapshotList
9, // 34: v1.Backrest.ListSnapshotFiles:output_type -> v1.ListSnapshotFilesResponse
17, // 35: v1.Backrest.Backup:output_type -> google.protobuf.Empty
17, // 36: v1.Backrest.DoRepoTask:output_type -> google.protobuf.Empty
17, // 37: v1.Backrest.Forget:output_type -> google.protobuf.Empty
17, // 38: v1.Backrest.Restore:output_type -> google.protobuf.Empty
17, // 39: v1.Backrest.Cancel:output_type -> google.protobuf.Empty
26, // 40: v1.Backrest.GetLogs:output_type -> types.BytesValue
21, // 41: v1.Backrest.RunCommand:output_type -> types.Int64Value
20, // 42: v1.Backrest.GetDownloadURL:output_type -> types.StringValue
17, // 43: v1.Backrest.ClearHistory:output_type -> google.protobuf.Empty
27, // 44: v1.Backrest.PathAutocomplete:output_type -> types.StringList
13, // 45: v1.Backrest.GetSummaryDashboard:output_type -> v1.SummaryDashboardResponse
27, // [27:46] is the sub-list for method output_type
8, // [8:27] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
+38
View File
@@ -23,6 +23,7 @@ const _ = grpc.SupportPackageIsVersion9
const (
Backrest_GetConfig_FullMethodName = "/v1.Backrest/GetConfig"
Backrest_SetConfig_FullMethodName = "/v1.Backrest/SetConfig"
Backrest_CheckRepoExists_FullMethodName = "/v1.Backrest/CheckRepoExists"
Backrest_AddRepo_FullMethodName = "/v1.Backrest/AddRepo"
Backrest_GetOperationEvents_FullMethodName = "/v1.Backrest/GetOperationEvents"
Backrest_GetOperations_FullMethodName = "/v1.Backrest/GetOperations"
@@ -47,6 +48,7 @@ const (
type BackrestClient interface {
GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Config, error)
SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Config, error)
CheckRepoExists(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*types.BoolValue, error)
AddRepo(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*Config, error)
GetOperationEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OperationEvent], error)
GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*OperationList, error)
@@ -104,6 +106,16 @@ func (c *backrestClient) SetConfig(ctx context.Context, in *Config, opts ...grpc
return out, nil
}
func (c *backrestClient) CheckRepoExists(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*types.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(types.BoolValue)
err := c.cc.Invoke(ctx, Backrest_CheckRepoExists_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *backrestClient) AddRepo(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*Config, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Config)
@@ -288,6 +300,7 @@ func (c *backrestClient) GetSummaryDashboard(ctx context.Context, in *emptypb.Em
type BackrestServer interface {
GetConfig(context.Context, *emptypb.Empty) (*Config, error)
SetConfig(context.Context, *Config) (*Config, error)
CheckRepoExists(context.Context, *Repo) (*types.BoolValue, error)
AddRepo(context.Context, *Repo) (*Config, error)
GetOperationEvents(*emptypb.Empty, grpc.ServerStreamingServer[OperationEvent]) error
GetOperations(context.Context, *GetOperationsRequest) (*OperationList, error)
@@ -331,6 +344,9 @@ func (UnimplementedBackrestServer) GetConfig(context.Context, *emptypb.Empty) (*
func (UnimplementedBackrestServer) SetConfig(context.Context, *Config) (*Config, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetConfig not implemented")
}
func (UnimplementedBackrestServer) CheckRepoExists(context.Context, *Repo) (*types.BoolValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckRepoExists not implemented")
}
func (UnimplementedBackrestServer) AddRepo(context.Context, *Repo) (*Config, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddRepo not implemented")
}
@@ -436,6 +452,24 @@ func _Backrest_SetConfig_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _Backrest_CheckRepoExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Repo)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BackrestServer).CheckRepoExists(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Backrest_CheckRepoExists_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackrestServer).CheckRepoExists(ctx, req.(*Repo))
}
return interceptor(ctx, in, info, handler)
}
func _Backrest_AddRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Repo)
if err := dec(in); err != nil {
@@ -725,6 +759,10 @@ var Backrest_ServiceDesc = grpc.ServiceDesc{
MethodName: "SetConfig",
Handler: _Backrest_SetConfig_Handler,
},
{
MethodName: "CheckRepoExists",
Handler: _Backrest_CheckRepoExists_Handler,
},
{
MethodName: "AddRepo",
Handler: _Backrest_AddRepo_Handler,
+30
View File
@@ -39,6 +39,9 @@ const (
BackrestGetConfigProcedure = "/v1.Backrest/GetConfig"
// BackrestSetConfigProcedure is the fully-qualified name of the Backrest's SetConfig RPC.
BackrestSetConfigProcedure = "/v1.Backrest/SetConfig"
// BackrestCheckRepoExistsProcedure is the fully-qualified name of the Backrest's CheckRepoExists
// RPC.
BackrestCheckRepoExistsProcedure = "/v1.Backrest/CheckRepoExists"
// BackrestAddRepoProcedure is the fully-qualified name of the Backrest's AddRepo RPC.
BackrestAddRepoProcedure = "/v1.Backrest/AddRepo"
// BackrestGetOperationEventsProcedure is the fully-qualified name of the Backrest's
@@ -82,6 +85,7 @@ var (
backrestServiceDescriptor = v1.File_v1_service_proto.Services().ByName("Backrest")
backrestGetConfigMethodDescriptor = backrestServiceDescriptor.Methods().ByName("GetConfig")
backrestSetConfigMethodDescriptor = backrestServiceDescriptor.Methods().ByName("SetConfig")
backrestCheckRepoExistsMethodDescriptor = backrestServiceDescriptor.Methods().ByName("CheckRepoExists")
backrestAddRepoMethodDescriptor = backrestServiceDescriptor.Methods().ByName("AddRepo")
backrestGetOperationEventsMethodDescriptor = backrestServiceDescriptor.Methods().ByName("GetOperationEvents")
backrestGetOperationsMethodDescriptor = backrestServiceDescriptor.Methods().ByName("GetOperations")
@@ -104,6 +108,7 @@ var (
type BackrestClient interface {
GetConfig(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.Config], error)
SetConfig(context.Context, *connect.Request[v1.Config]) (*connect.Response[v1.Config], error)
CheckRepoExists(context.Context, *connect.Request[v1.Repo]) (*connect.Response[types.BoolValue], error)
AddRepo(context.Context, *connect.Request[v1.Repo]) (*connect.Response[v1.Config], error)
GetOperationEvents(context.Context, *connect.Request[emptypb.Empty]) (*connect.ServerStreamForClient[v1.OperationEvent], error)
GetOperations(context.Context, *connect.Request[v1.GetOperationsRequest]) (*connect.Response[v1.OperationList], error)
@@ -155,6 +160,12 @@ func NewBackrestClient(httpClient connect.HTTPClient, baseURL string, opts ...co
connect.WithSchema(backrestSetConfigMethodDescriptor),
connect.WithClientOptions(opts...),
),
checkRepoExists: connect.NewClient[v1.Repo, types.BoolValue](
httpClient,
baseURL+BackrestCheckRepoExistsProcedure,
connect.WithSchema(backrestCheckRepoExistsMethodDescriptor),
connect.WithClientOptions(opts...),
),
addRepo: connect.NewClient[v1.Repo, v1.Config](
httpClient,
baseURL+BackrestAddRepoProcedure,
@@ -258,6 +269,7 @@ func NewBackrestClient(httpClient connect.HTTPClient, baseURL string, opts ...co
type backrestClient struct {
getConfig *connect.Client[emptypb.Empty, v1.Config]
setConfig *connect.Client[v1.Config, v1.Config]
checkRepoExists *connect.Client[v1.Repo, types.BoolValue]
addRepo *connect.Client[v1.Repo, v1.Config]
getOperationEvents *connect.Client[emptypb.Empty, v1.OperationEvent]
getOperations *connect.Client[v1.GetOperationsRequest, v1.OperationList]
@@ -286,6 +298,11 @@ func (c *backrestClient) SetConfig(ctx context.Context, req *connect.Request[v1.
return c.setConfig.CallUnary(ctx, req)
}
// CheckRepoExists calls v1.Backrest.CheckRepoExists.
func (c *backrestClient) CheckRepoExists(ctx context.Context, req *connect.Request[v1.Repo]) (*connect.Response[types.BoolValue], error) {
return c.checkRepoExists.CallUnary(ctx, req)
}
// AddRepo calls v1.Backrest.AddRepo.
func (c *backrestClient) AddRepo(ctx context.Context, req *connect.Request[v1.Repo]) (*connect.Response[v1.Config], error) {
return c.addRepo.CallUnary(ctx, req)
@@ -370,6 +387,7 @@ func (c *backrestClient) GetSummaryDashboard(ctx context.Context, req *connect.R
type BackrestHandler interface {
GetConfig(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.Config], error)
SetConfig(context.Context, *connect.Request[v1.Config]) (*connect.Response[v1.Config], error)
CheckRepoExists(context.Context, *connect.Request[v1.Repo]) (*connect.Response[types.BoolValue], error)
AddRepo(context.Context, *connect.Request[v1.Repo]) (*connect.Response[v1.Config], error)
GetOperationEvents(context.Context, *connect.Request[emptypb.Empty], *connect.ServerStream[v1.OperationEvent]) error
GetOperations(context.Context, *connect.Request[v1.GetOperationsRequest]) (*connect.Response[v1.OperationList], error)
@@ -417,6 +435,12 @@ func NewBackrestHandler(svc BackrestHandler, opts ...connect.HandlerOption) (str
connect.WithSchema(backrestSetConfigMethodDescriptor),
connect.WithHandlerOptions(opts...),
)
backrestCheckRepoExistsHandler := connect.NewUnaryHandler(
BackrestCheckRepoExistsProcedure,
svc.CheckRepoExists,
connect.WithSchema(backrestCheckRepoExistsMethodDescriptor),
connect.WithHandlerOptions(opts...),
)
backrestAddRepoHandler := connect.NewUnaryHandler(
BackrestAddRepoProcedure,
svc.AddRepo,
@@ -519,6 +543,8 @@ func NewBackrestHandler(svc BackrestHandler, opts ...connect.HandlerOption) (str
backrestGetConfigHandler.ServeHTTP(w, r)
case BackrestSetConfigProcedure:
backrestSetConfigHandler.ServeHTTP(w, r)
case BackrestCheckRepoExistsProcedure:
backrestCheckRepoExistsHandler.ServeHTTP(w, r)
case BackrestAddRepoProcedure:
backrestAddRepoHandler.ServeHTTP(w, r)
case BackrestGetOperationEventsProcedure:
@@ -568,6 +594,10 @@ func (UnimplementedBackrestHandler) SetConfig(context.Context, *connect.Request[
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("v1.Backrest.SetConfig is not implemented"))
}
func (UnimplementedBackrestHandler) CheckRepoExists(context.Context, *connect.Request[v1.Repo]) (*connect.Response[types.BoolValue], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("v1.Backrest.CheckRepoExists is not implemented"))
}
func (UnimplementedBackrestHandler) AddRepo(context.Context, *connect.Request[v1.Repo]) (*connect.Response[v1.Config], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("v1.Backrest.AddRepo is not implemented"))
}
+40
View File
@@ -11,6 +11,7 @@ import (
"path"
"reflect"
"slices"
"strings"
"sync"
"time"
@@ -95,6 +96,45 @@ func (s *BackrestHandler) SetConfig(ctx context.Context, req *connect.Request[v1
return connect.NewResponse(newConfig), nil
}
func (s *BackrestHandler) CheckRepoExists(ctx context.Context, req *connect.Request[v1.Repo]) (*connect.Response[types.BoolValue], error) {
c, err := s.config.Get()
if err != nil {
return nil, fmt.Errorf("failed to get config: %w", err)
}
c = proto.Clone(c).(*v1.Config)
if idx := slices.IndexFunc(c.Repos, func(r *v1.Repo) bool { return r.Id == req.Msg.Id }); idx != -1 {
c.Repos[idx] = req.Msg
} else {
c.Repos = append(c.Repos, req.Msg)
}
if err := config.ValidateConfig(c); err != nil {
return nil, fmt.Errorf("validation error: %w", err)
}
bin, err := resticinstaller.FindOrInstallResticBinary()
if err != nil {
return nil, fmt.Errorf("failed to find or install restic binary: %w", err)
}
r, err := repo.NewRepoOrchestrator(c, req.Msg, bin)
if err != nil {
return nil, fmt.Errorf("failed to configure repo: %w", err)
}
ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
if err := r.Exists(ctx); err != nil {
if strings.Contains(err.Error(), "repository does not exist") {
return connect.NewResponse(&types.BoolValue{Value: false}), nil
}
return nil, err
}
return connect.NewResponse(&types.BoolValue{Value: true}), nil
}
// AddRepo implements POST /v1/config/repo, it includes validation that the repo can be initialized.
func (s *BackrestHandler) AddRepo(ctx context.Context, req *connect.Request[v1.Repo]) (*connect.Response[v1.Config], error) {
c, err := s.config.Get()
+4
View File
@@ -85,6 +85,10 @@ func (r *RepoOrchestrator) logger(ctx context.Context) *zap.Logger {
return logging.Logger(ctx, "[repo-manager] ").With(zap.String("repo", r.repoConfig.Id))
}
func (r *RepoOrchestrator) Exists(ctx context.Context) error {
return r.repo.Exists(ctx)
}
func (r *RepoOrchestrator) Init(ctx context.Context) error {
ctx, flush := forwardResticLogs(ctx)
defer flush()
+4
View File
@@ -4,6 +4,10 @@ package types;
option go_package = "github.com/garethgeorge/backrest/gen/go/types";
message BoolValue {
bool value = 1;
}
message StringValue {
string value = 1;
}
+2
View File
@@ -16,6 +16,8 @@ service Backrest {
rpc SetConfig (Config) returns (Config) {}
rpc CheckRepoExists (Repo) returns (types.BoolValue) {} // returns an error if the repo does not exist
rpc AddRepo (Repo) returns (Config) {}
rpc GetOperationEvents (google.protobuf.Empty) returns (stream OperationEvent) {}
+24 -7
View File
@@ -10,7 +10,24 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file types/value.proto.
*/
export const file_types_value: GenFile = /*@__PURE__*/
fileDesc("ChF0eXBlcy92YWx1ZS5wcm90bxIFdHlwZXMiHAoLU3RyaW5nVmFsdWUSDQoFdmFsdWUYASABKAkiGwoKQnl0ZXNWYWx1ZRINCgV2YWx1ZRgBIAEoDCIcCgpTdHJpbmdMaXN0Eg4KBnZhbHVlcxgBIAMoCSIbCgpJbnQ2NFZhbHVlEg0KBXZhbHVlGAEgASgDIhsKCUludDY0TGlzdBIOCgZ2YWx1ZXMYASADKAMiBwoFRW1wdHlCL1otZ2l0aHViLmNvbS9nYXJldGhnZW9yZ2UvYmFja3Jlc3QvZ2VuL2dvL3R5cGVzYgZwcm90bzM");
fileDesc("ChF0eXBlcy92YWx1ZS5wcm90bxIFdHlwZXMiGgoJQm9vbFZhbHVlEg0KBXZhbHVlGAEgASgIIhwKC1N0cmluZ1ZhbHVlEg0KBXZhbHVlGAEgASgJIhsKCkJ5dGVzVmFsdWUSDQoFdmFsdWUYASABKAwiHAoKU3RyaW5nTGlzdBIOCgZ2YWx1ZXMYASADKAkiGwoKSW50NjRWYWx1ZRINCgV2YWx1ZRgBIAEoAyIbCglJbnQ2NExpc3QSDgoGdmFsdWVzGAEgAygDIgcKBUVtcHR5Qi9aLWdpdGh1Yi5jb20vZ2FyZXRoZ2VvcmdlL2JhY2tyZXN0L2dlbi9nby90eXBlc2IGcHJvdG8z");
/**
* @generated from message types.BoolValue
*/
export type BoolValue = Message<"types.BoolValue"> & {
/**
* @generated from field: bool value = 1;
*/
value: boolean;
};
/**
* Describes the message types.BoolValue.
* Use `create(BoolValueSchema)` to create a new message.
*/
export const BoolValueSchema: GenMessage<BoolValue> = /*@__PURE__*/
messageDesc(file_types_value, 0);
/**
* @generated from message types.StringValue
@@ -27,7 +44,7 @@ export type StringValue = Message<"types.StringValue"> & {
* Use `create(StringValueSchema)` to create a new message.
*/
export const StringValueSchema: GenMessage<StringValue> = /*@__PURE__*/
messageDesc(file_types_value, 0);
messageDesc(file_types_value, 1);
/**
* @generated from message types.BytesValue
@@ -44,7 +61,7 @@ export type BytesValue = Message<"types.BytesValue"> & {
* Use `create(BytesValueSchema)` to create a new message.
*/
export const BytesValueSchema: GenMessage<BytesValue> = /*@__PURE__*/
messageDesc(file_types_value, 1);
messageDesc(file_types_value, 2);
/**
* @generated from message types.StringList
@@ -61,7 +78,7 @@ export type StringList = Message<"types.StringList"> & {
* Use `create(StringListSchema)` to create a new message.
*/
export const StringListSchema: GenMessage<StringList> = /*@__PURE__*/
messageDesc(file_types_value, 2);
messageDesc(file_types_value, 3);
/**
* @generated from message types.Int64Value
@@ -78,7 +95,7 @@ export type Int64Value = Message<"types.Int64Value"> & {
* Use `create(Int64ValueSchema)` to create a new message.
*/
export const Int64ValueSchema: GenMessage<Int64Value> = /*@__PURE__*/
messageDesc(file_types_value, 3);
messageDesc(file_types_value, 4);
/**
* @generated from message types.Int64List
@@ -95,7 +112,7 @@ export type Int64List = Message<"types.Int64List"> & {
* Use `create(Int64ListSchema)` to create a new message.
*/
export const Int64ListSchema: GenMessage<Int64List> = /*@__PURE__*/
messageDesc(file_types_value, 4);
messageDesc(file_types_value, 5);
/**
* @generated from message types.Empty
@@ -108,5 +125,5 @@ export type Empty = Message<"types.Empty"> & {
* Use `create(EmptySchema)` to create a new message.
*/
export const EmptySchema: GenMessage<Empty> = /*@__PURE__*/
messageDesc(file_types_value, 5);
messageDesc(file_types_value, 6);
+10 -2
View File
@@ -10,7 +10,7 @@ import type { ResticSnapshotListSchema } from "./restic_pb";
import { file_v1_restic } from "./restic_pb";
import type { OperationEventSchema, OperationListSchema, OperationStatus } from "./operations_pb";
import { file_v1_operations } from "./operations_pb";
import type { BytesValueSchema, Int64ValueSchema, StringListSchema, StringValueSchema } from "../types/value_pb";
import type { BoolValueSchema, BytesValueSchema, Int64ValueSchema, StringListSchema, StringValueSchema } from "../types/value_pb";
import { file_types_value } from "../types/value_pb";
import type { EmptySchema } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt";
@@ -21,7 +21,7 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file v1/service.proto.
*/
export const file_v1_service: GenFile = /*@__PURE__*/
fileDesc("ChB2MS9zZXJ2aWNlLnByb3RvEgJ2MSJhCgpPcFNlbGVjdG9yEgsKA2lkcxgBIAMoAxIPCgdyZXBvX2lkGAIgASgJEg8KB3BsYW5faWQYAyABKAkSEwoLc25hcHNob3RfaWQYBCABKAkSDwoHZmxvd19pZBgFIAEoAyLAAQoRRG9SZXBvVGFza1JlcXVlc3QSDwoHcmVwb19pZBgBIAEoCRIoCgR0YXNrGAIgASgOMhoudjEuRG9SZXBvVGFza1JlcXVlc3QuVGFzayJwCgRUYXNrEg0KCVRBU0tfTk9ORRAAEhgKFFRBU0tfSU5ERVhfU05BUFNIT1RTEAESDgoKVEFTS19QUlVORRACEg4KClRBU0tfQ0hFQ0sQAxIOCgpUQVNLX1NUQVRTEAQSDwoLVEFTS19VTkxPQ0sQBS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b2dsZS5wcm90b2J1Zi5FbXB0eSIAEjsKEFBhdGhBdXRvY29tcGxldGUSEi50eXBlcy5TdHJpbmdWYWx1ZRoRLnR5cGVzLlN0cmluZ0xpc3QiABJNChNHZXRTdW1tYXJ5RGFzaGJvYXJkEhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GhwudjEuU3VtbWFyeURhc2hib2FyZFJlc3BvbnNlIgBCLFoqZ2l0aHViLmNvbS9nYXJldGhnZW9yZ2UvYmFja3Jlc3QvZ2VuL2dvL3YxYgZwcm90bzM", [file_v1_config, file_v1_restic, file_v1_operations, file_types_value, file_google_protobuf_empty, file_google_api_annotations]);
fileDesc("ChB2MS9zZXJ2aWNlLnByb3RvEgJ2MSJhCgpPcFNlbGVjdG9yEgsKA2lkcxgBIAMoAxIPCgdyZXBvX2lkGAIgASgJEg8KB3BsYW5faWQYAyABKAkSEwoLc25hcHNob3RfaWQYBCABKAkSDwoHZmxvd19pZBgFIAEoAyLAAQoRRG9SZXBvVGFza1JlcXVlc3QSDwoHcmVwb19pZBgBIAEoCRIoCgR0YXNrGAIgASgOMhoudjEuRG9SZXBvVGFza1JlcXVlc3QuVGFzayJwCgRUYXNrEg0KCVRBU0tfTk9ORRAAEhgKFFRBU0tfSU5ERVhfU05BUFNIT1RTEAESDgoKVEFTS19QUlVORRACEg4KClRBU0tfQ0hFQ0sQAxIOCgpUQVNLX1NUQVRTEAQSDwoLVEFTS19VTkxPQ0sQBSJMChNDbGVhckhpc3RvcnlSZXF1ZXN0EiAKCHNlbGVjdG9yGAEgASgLMg4udjEuT3BTZWxlY3RvchITCgtvbmx5X2ZhaWxlZBgCIAEoCCJGCg1Gb3JnZXRSZXF1ZXN0Eg8KB3JlcG9faWQYASABKAkSDwoHcGxhbl9pZBgCIAEoCRITCgtzbmFwc2hvdF9pZBgDIAEoCSI4ChRMaXN0U25hcHNob3RzUmVxdWVzdBIPCgdyZXBvX2lkGAEgASgJEg8KB3BsYW5faWQYAiABKAkiSAoUR2V0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1Yi5jb20vZ2FyZXRoZ2VvcmdlL2JhY2tyZXN0L2dlbi9nby92MWIGcHJvdG8z", [file_v1_config, file_v1_restic, file_v1_operations, file_types_value, file_google_protobuf_empty, file_google_api_annotations]);
/**
* OpSelector is a message that can be used to select operations e.g. by query.
@@ -567,6 +567,14 @@ export const Backrest: GenService<{
input: typeof ConfigSchema;
output: typeof ConfigSchema;
},
/**
* @generated from rpc v1.Backrest.CheckRepoExists
*/
checkRepoExists: {
methodKind: "unary";
input: typeof RepoSchema;
output: typeof BoolValueSchema;
},
/**
* @generated from rpc v1.Backrest.AddRepo
*/
+17 -1
View File
@@ -3,7 +3,7 @@ import { FormInstance } from "antd";
export const validateForm = async <T>(form: FormInstance<T>) => {
try {
await form.validateFields();
return form.getFieldsValue();
return sanitizeUndefinedFields(form.getFieldsValue());
} catch (e: any) {
if (e.errorFields) {
const firstError = (e as any).errorFields?.[0]
@@ -14,6 +14,22 @@ export const validateForm = async <T>(form: FormInstance<T>) => {
}
};
const sanitizeUndefinedFields = <T>(obj: T): T => {
if (typeof obj !== "object" || obj === null) {
return obj;
} else if (Array.isArray(obj)) {
return obj.map(sanitizeUndefinedFields) as any;
}
const newObj: any = {};
for (const key in obj) {
if (obj[key] !== undefined) {
newObj[key] = sanitizeUndefinedFields(obj[key]);
}
}
return newObj;
}
// regex allows alphanumeric, underscore, dash, and dot
// this should be kept in sync with values permitted by SanitizeID on the backend
export const namePattern = /^[a-zA-Z0-9_\-\.]+$/;
+41 -11
View File
@@ -33,9 +33,8 @@ import { backrestService } from "../api";
import {
HooksFormList,
hooksListTooltipText,
HookFormData,
} from "../components/HooksFormList";
import { ConfirmButton } from "../components/SpinButton";
import { ConfirmButton, SpinButton } from "../components/SpinButton";
import { useConfig } from "../components/ConfigProvider";
import Cron from "react-js-cron";
import {
@@ -43,7 +42,7 @@ import {
ScheduleFormItem,
} from "../components/ScheduleFormItem";
import { isWindows } from "../state/buildcfg";
import { create, fromJson, toJson } from "@bufbuild/protobuf";
import { create, fromJson, JsonValue, toJson } from "@bufbuild/protobuf";
const repoDefaults = create(RepoSchema, {
prunePolicy: {
@@ -72,15 +71,14 @@ export const AddRepoModal = ({ template }: { template: Repo | null }) => {
const showModal = useShowModal();
const alertsApi = useAlertApi()!;
const [config, setConfig] = useConfig();
const [form] = Form.useForm();
const [form] = Form.useForm<JsonValue>();
useEffect(() => {
form.setFieldsValue(
template
? toJson(RepoSchema, template, {
alwaysEmitImplicit: true,
})
: toJson(RepoSchema, repoDefaults, { alwaysEmitImplicit: true })
);
const initVal = template
? toJson(RepoSchema, template, {
alwaysEmitImplicit: true,
})
: toJson(RepoSchema, repoDefaults, { alwaysEmitImplicit: true });
form.setFieldsValue(initVal);
}, [template]);
if (!config) {
@@ -195,6 +193,38 @@ export const AddRepoModal = ({ template }: { template: Repo | null }) => {
Delete
</ConfirmButton>
) : null,
<SpinButton
key="check"
onClickAsync={async () => {
let repoFormData = await validateForm(form);
console.log("checking repo", repoFormData);
const repo = fromJson(RepoSchema, repoFormData, {
ignoreUnknownFields: false,
});
try {
const exists = await backrestService.checkRepoExists(repo);
if (exists) {
alertsApi.success(
"Connected successfully to " +
repo.uri +
" and found an existing repo.",
10
);
} else {
alertsApi.success(
"Connected successfully to " +
repo.uri +
". No existing repo found at this location, a new one will be initialized",
10
);
}
} catch (e: any) {
alertsApi.error(formatErrorAlert(e, "Check error: "), 10);
}
}}
>
Test Configuration
</SpinButton>,
<Button
key="submit"
type="primary"