diff --git a/pkg/rpc/pb/model_http_gzip.pb.go b/pkg/rpc/pb/model_http_gzip.pb.go new file mode 100644 index 0000000..3409c46 --- /dev/null +++ b/pkg/rpc/pb/model_http_gzip.pb.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_http_gzip.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HTTPGzip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` + Level int32 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` + MinLength *SizeCapacity `protobuf:"bytes,4,opt,name=minLength,proto3" json:"minLength,omitempty"` + MaxLength *SizeCapacity `protobuf:"bytes,5,opt,name=maxLength,proto3" json:"maxLength,omitempty"` +} + +func (x *HTTPGzip) Reset() { + *x = HTTPGzip{} + if protoimpl.UnsafeEnabled { + mi := &file_model_http_gzip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPGzip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPGzip) ProtoMessage() {} + +func (x *HTTPGzip) ProtoReflect() protoreflect.Message { + mi := &file_model_http_gzip_proto_msgTypes[0] + 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 HTTPGzip.ProtoReflect.Descriptor instead. +func (*HTTPGzip) Descriptor() ([]byte, []int) { + return file_model_http_gzip_proto_rawDescGZIP(), []int{0} +} + +func (x *HTTPGzip) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *HTTPGzip) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *HTTPGzip) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *HTTPGzip) GetMinLength() *SizeCapacity { + if x != nil { + return x.MinLength + } + return nil +} + +func (x *HTTPGzip) GetMaxLength() *SizeCapacity { + if x != nil { + return x.MaxLength + } + return nil +} + +var File_model_http_gzip_proto protoreflect.FileDescriptor + +var file_model_http_gzip_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x67, 0x7a, 0x69, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x19, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x48, 0x54, 0x54, 0x50, 0x47, + 0x7a, 0x69, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, + 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, + 0x74, 0x79, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2e, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, + 0x74, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_http_gzip_proto_rawDescOnce sync.Once + file_model_http_gzip_proto_rawDescData = file_model_http_gzip_proto_rawDesc +) + +func file_model_http_gzip_proto_rawDescGZIP() []byte { + file_model_http_gzip_proto_rawDescOnce.Do(func() { + file_model_http_gzip_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_http_gzip_proto_rawDescData) + }) + return file_model_http_gzip_proto_rawDescData +} + +var file_model_http_gzip_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_http_gzip_proto_goTypes = []interface{}{ + (*HTTPGzip)(nil), // 0: pb.HTTPGzip + (*SizeCapacity)(nil), // 1: pb.SizeCapacity +} +var file_model_http_gzip_proto_depIdxs = []int32{ + 1, // 0: pb.HTTPGzip.minLength:type_name -> pb.SizeCapacity + 1, // 1: pb.HTTPGzip.maxLength:type_name -> pb.SizeCapacity + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_model_http_gzip_proto_init() } +func file_model_http_gzip_proto_init() { + if File_model_http_gzip_proto != nil { + return + } + file_model_size_capacity_proto_init() + if !protoimpl.UnsafeEnabled { + file_model_http_gzip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPGzip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_http_gzip_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_http_gzip_proto_goTypes, + DependencyIndexes: file_model_http_gzip_proto_depIdxs, + MessageInfos: file_model_http_gzip_proto_msgTypes, + }.Build() + File_model_http_gzip_proto = out.File + file_model_http_gzip_proto_rawDesc = nil + file_model_http_gzip_proto_goTypes = nil + file_model_http_gzip_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/model_http_web.pb.go b/pkg/rpc/pb/model_http_web.pb.go index 961d382..ec593de 100644 --- a/pkg/rpc/pb/model_http_web.pb.go +++ b/pkg/rpc/pb/model_http_web.pb.go @@ -30,8 +30,10 @@ type HTTPWeb struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` + Root string `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"` + GzipId int64 `protobuf:"varint,4,opt,name=gzipId,proto3" json:"gzipId,omitempty"` } func (x *HTTPWeb) Reset() { @@ -73,6 +75,13 @@ func (x *HTTPWeb) GetId() int64 { return 0 } +func (x *HTTPWeb) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + func (x *HTTPWeb) GetRoot() string { if x != nil { return x.Root @@ -80,15 +89,25 @@ func (x *HTTPWeb) GetRoot() string { return "" } +func (x *HTTPWeb) GetGzipId() int64 { + if x != nil { + return x.GzipId + } + return 0 +} + var File_model_http_web_proto protoreflect.FileDescriptor var file_model_http_web_proto_rawDesc = []byte{ 0x0a, 0x14, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x77, 0x65, 0x62, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x2d, 0x0a, 0x07, 0x48, 0x54, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x59, 0x0a, 0x07, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x67, 0x7a, 0x69, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, + 0x7a, 0x69, 0x70, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/rpc/pb/model_size_capacity.pb.go b/pkg/rpc/pb/model_size_capacity.pb.go new file mode 100644 index 0000000..91a7a50 --- /dev/null +++ b/pkg/rpc/pb/model_size_capacity.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_size_capacity.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type SizeCapacity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` +} + +func (x *SizeCapacity) Reset() { + *x = SizeCapacity{} + if protoimpl.UnsafeEnabled { + mi := &file_model_size_capacity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SizeCapacity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SizeCapacity) ProtoMessage() {} + +func (x *SizeCapacity) ProtoReflect() protoreflect.Message { + mi := &file_model_size_capacity_proto_msgTypes[0] + 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 SizeCapacity.ProtoReflect.Descriptor instead. +func (*SizeCapacity) Descriptor() ([]byte, []int) { + return file_model_size_capacity_proto_rawDescGZIP(), []int{0} +} + +func (x *SizeCapacity) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *SizeCapacity) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +var File_model_size_capacity_proto protoreflect.FileDescriptor + +var file_model_size_capacity_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x63, 0x61, 0x70, + 0x61, 0x63, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, + 0x38, 0x0a, 0x0c, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_size_capacity_proto_rawDescOnce sync.Once + file_model_size_capacity_proto_rawDescData = file_model_size_capacity_proto_rawDesc +) + +func file_model_size_capacity_proto_rawDescGZIP() []byte { + file_model_size_capacity_proto_rawDescOnce.Do(func() { + file_model_size_capacity_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_size_capacity_proto_rawDescData) + }) + return file_model_size_capacity_proto_rawDescData +} + +var file_model_size_capacity_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_size_capacity_proto_goTypes = []interface{}{ + (*SizeCapacity)(nil), // 0: pb.SizeCapacity +} +var file_model_size_capacity_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_model_size_capacity_proto_init() } +func file_model_size_capacity_proto_init() { + if File_model_size_capacity_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_size_capacity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SizeCapacity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_size_capacity_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_size_capacity_proto_goTypes, + DependencyIndexes: file_model_size_capacity_proto_depIdxs, + MessageInfos: file_model_size_capacity_proto_msgTypes, + }.Build() + File_model_size_capacity_proto = out.File + file_model_size_capacity_proto_rawDesc = nil + file_model_size_capacity_proto_goTypes = nil + file_model_size_capacity_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_http_gzip.pb.go b/pkg/rpc/pb/service_http_gzip.pb.go new file mode 100644 index 0000000..a18b318 --- /dev/null +++ b/pkg/rpc/pb/service_http_gzip.pb.go @@ -0,0 +1,702 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_http_gzip.proto + +package pb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// 创建Gzip配置 +type CreateHTTPGzipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + MinLength *SizeCapacity `protobuf:"bytes,2,opt,name=minLength,proto3" json:"minLength,omitempty"` + MaxLength *SizeCapacity `protobuf:"bytes,3,opt,name=maxLength,proto3" json:"maxLength,omitempty"` +} + +func (x *CreateHTTPGzipRequest) Reset() { + *x = CreateHTTPGzipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_gzip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHTTPGzipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHTTPGzipRequest) ProtoMessage() {} + +func (x *CreateHTTPGzipRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_gzip_proto_msgTypes[0] + 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 CreateHTTPGzipRequest.ProtoReflect.Descriptor instead. +func (*CreateHTTPGzipRequest) Descriptor() ([]byte, []int) { + return file_service_http_gzip_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateHTTPGzipRequest) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *CreateHTTPGzipRequest) GetMinLength() *SizeCapacity { + if x != nil { + return x.MinLength + } + return nil +} + +func (x *CreateHTTPGzipRequest) GetMaxLength() *SizeCapacity { + if x != nil { + return x.MaxLength + } + return nil +} + +type CreateHTTPGzipResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GzipId int64 `protobuf:"varint,1,opt,name=gzipId,proto3" json:"gzipId,omitempty"` +} + +func (x *CreateHTTPGzipResponse) Reset() { + *x = CreateHTTPGzipResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_gzip_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHTTPGzipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHTTPGzipResponse) ProtoMessage() {} + +func (x *CreateHTTPGzipResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_gzip_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 CreateHTTPGzipResponse.ProtoReflect.Descriptor instead. +func (*CreateHTTPGzipResponse) Descriptor() ([]byte, []int) { + return file_service_http_gzip_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateHTTPGzipResponse) GetGzipId() int64 { + if x != nil { + return x.GzipId + } + return 0 +} + +// 查找Gzip配置 +type FindEnabledGzipConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GzipId int64 `protobuf:"varint,1,opt,name=gzipId,proto3" json:"gzipId,omitempty"` +} + +func (x *FindEnabledGzipConfigRequest) Reset() { + *x = FindEnabledGzipConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_gzip_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledGzipConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledGzipConfigRequest) ProtoMessage() {} + +func (x *FindEnabledGzipConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_gzip_proto_msgTypes[2] + 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 FindEnabledGzipConfigRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledGzipConfigRequest) Descriptor() ([]byte, []int) { + return file_service_http_gzip_proto_rawDescGZIP(), []int{2} +} + +func (x *FindEnabledGzipConfigRequest) GetGzipId() int64 { + if x != nil { + return x.GzipId + } + return 0 +} + +type FindEnabledGzipConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *FindEnabledGzipConfigResponse) Reset() { + *x = FindEnabledGzipConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_gzip_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledGzipConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledGzipConfigResponse) ProtoMessage() {} + +func (x *FindEnabledGzipConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_gzip_proto_msgTypes[3] + 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 FindEnabledGzipConfigResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledGzipConfigResponse) Descriptor() ([]byte, []int) { + return file_service_http_gzip_proto_rawDescGZIP(), []int{3} +} + +func (x *FindEnabledGzipConfigResponse) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +// 修改Gzip配置 +type UpdateHTTPGzipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GzipId int64 `protobuf:"varint,1,opt,name=gzipId,proto3" json:"gzipId,omitempty"` + Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` + MinLength *SizeCapacity `protobuf:"bytes,3,opt,name=minLength,proto3" json:"minLength,omitempty"` + MaxLength *SizeCapacity `protobuf:"bytes,4,opt,name=maxLength,proto3" json:"maxLength,omitempty"` +} + +func (x *UpdateHTTPGzipRequest) Reset() { + *x = UpdateHTTPGzipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_gzip_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPGzipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPGzipRequest) ProtoMessage() {} + +func (x *UpdateHTTPGzipRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_gzip_proto_msgTypes[4] + 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 UpdateHTTPGzipRequest.ProtoReflect.Descriptor instead. +func (*UpdateHTTPGzipRequest) Descriptor() ([]byte, []int) { + return file_service_http_gzip_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateHTTPGzipRequest) GetGzipId() int64 { + if x != nil { + return x.GzipId + } + return 0 +} + +func (x *UpdateHTTPGzipRequest) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *UpdateHTTPGzipRequest) GetMinLength() *SizeCapacity { + if x != nil { + return x.MinLength + } + return nil +} + +func (x *UpdateHTTPGzipRequest) GetMaxLength() *SizeCapacity { + if x != nil { + return x.MaxLength + } + return nil +} + +type UpdateHTTPGzipResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateHTTPGzipResponse) Reset() { + *x = UpdateHTTPGzipResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_gzip_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPGzipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPGzipResponse) ProtoMessage() {} + +func (x *UpdateHTTPGzipResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_gzip_proto_msgTypes[5] + 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 UpdateHTTPGzipResponse.ProtoReflect.Descriptor instead. +func (*UpdateHTTPGzipResponse) Descriptor() ([]byte, []int) { + return file_service_http_gzip_proto_rawDescGZIP(), []int{5} +} + +var File_service_http_gzip_proto protoreflect.FileDescriptor + +var file_service_http_gzip_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x67, + 0x7a, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x19, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, + 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x09, 0x6d, + 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x09, 0x6d, + 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x30, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x7a, 0x69, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x67, 0x7a, 0x69, 0x70, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x1c, 0x46, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x7a, 0x69, 0x70, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x7a, + 0x69, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x7a, 0x69, 0x70, + 0x49, 0x64, 0x22, 0x37, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x47, 0x7a, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa5, 0x01, 0x0a, 0x15, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x7a, 0x69, 0x70, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x7a, 0x69, 0x70, 0x49, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x7a, 0x65, + 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x7a, 0x65, + 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0x18, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, + 0x50, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x85, 0x02, + 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, + 0x7a, 0x69, 0x70, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, + 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, + 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x19, 0x66, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, + 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x7a, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x7a, 0x69, 0x70, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x19, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, + 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_http_gzip_proto_rawDescOnce sync.Once + file_service_http_gzip_proto_rawDescData = file_service_http_gzip_proto_rawDesc +) + +func file_service_http_gzip_proto_rawDescGZIP() []byte { + file_service_http_gzip_proto_rawDescOnce.Do(func() { + file_service_http_gzip_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_http_gzip_proto_rawDescData) + }) + return file_service_http_gzip_proto_rawDescData +} + +var file_service_http_gzip_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_service_http_gzip_proto_goTypes = []interface{}{ + (*CreateHTTPGzipRequest)(nil), // 0: pb.CreateHTTPGzipRequest + (*CreateHTTPGzipResponse)(nil), // 1: pb.CreateHTTPGzipResponse + (*FindEnabledGzipConfigRequest)(nil), // 2: pb.FindEnabledGzipConfigRequest + (*FindEnabledGzipConfigResponse)(nil), // 3: pb.FindEnabledGzipConfigResponse + (*UpdateHTTPGzipRequest)(nil), // 4: pb.UpdateHTTPGzipRequest + (*UpdateHTTPGzipResponse)(nil), // 5: pb.UpdateHTTPGzipResponse + (*SizeCapacity)(nil), // 6: pb.SizeCapacity +} +var file_service_http_gzip_proto_depIdxs = []int32{ + 6, // 0: pb.CreateHTTPGzipRequest.minLength:type_name -> pb.SizeCapacity + 6, // 1: pb.CreateHTTPGzipRequest.maxLength:type_name -> pb.SizeCapacity + 6, // 2: pb.UpdateHTTPGzipRequest.minLength:type_name -> pb.SizeCapacity + 6, // 3: pb.UpdateHTTPGzipRequest.maxLength:type_name -> pb.SizeCapacity + 0, // 4: pb.HTTPGzipService.createHTTPGzip:input_type -> pb.CreateHTTPGzipRequest + 2, // 5: pb.HTTPGzipService.findEnabledHTTPGzipConfig:input_type -> pb.FindEnabledGzipConfigRequest + 4, // 6: pb.HTTPGzipService.updateHTTPGzip:input_type -> pb.UpdateHTTPGzipRequest + 1, // 7: pb.HTTPGzipService.createHTTPGzip:output_type -> pb.CreateHTTPGzipResponse + 3, // 8: pb.HTTPGzipService.findEnabledHTTPGzipConfig:output_type -> pb.FindEnabledGzipConfigResponse + 5, // 9: pb.HTTPGzipService.updateHTTPGzip:output_type -> pb.UpdateHTTPGzipResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_service_http_gzip_proto_init() } +func file_service_http_gzip_proto_init() { + if File_service_http_gzip_proto != nil { + return + } + file_model_size_capacity_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_http_gzip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHTTPGzipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_gzip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHTTPGzipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_gzip_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledGzipConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_gzip_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledGzipConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_gzip_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPGzipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_gzip_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPGzipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_http_gzip_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_http_gzip_proto_goTypes, + DependencyIndexes: file_service_http_gzip_proto_depIdxs, + MessageInfos: file_service_http_gzip_proto_msgTypes, + }.Build() + File_service_http_gzip_proto = out.File + file_service_http_gzip_proto_rawDesc = nil + file_service_http_gzip_proto_goTypes = nil + file_service_http_gzip_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HTTPGzipServiceClient is the client API for HTTPGzipService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HTTPGzipServiceClient interface { + // 创建Gzip配置 + CreateHTTPGzip(ctx context.Context, in *CreateHTTPGzipRequest, opts ...grpc.CallOption) (*CreateHTTPGzipResponse, error) + // 查找Gzip配置 + FindEnabledHTTPGzipConfig(ctx context.Context, in *FindEnabledGzipConfigRequest, opts ...grpc.CallOption) (*FindEnabledGzipConfigResponse, error) + // 修改Gzip配置 + UpdateHTTPGzip(ctx context.Context, in *UpdateHTTPGzipRequest, opts ...grpc.CallOption) (*UpdateHTTPGzipResponse, error) +} + +type hTTPGzipServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHTTPGzipServiceClient(cc grpc.ClientConnInterface) HTTPGzipServiceClient { + return &hTTPGzipServiceClient{cc} +} + +func (c *hTTPGzipServiceClient) CreateHTTPGzip(ctx context.Context, in *CreateHTTPGzipRequest, opts ...grpc.CallOption) (*CreateHTTPGzipResponse, error) { + out := new(CreateHTTPGzipResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPGzipService/createHTTPGzip", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPGzipServiceClient) FindEnabledHTTPGzipConfig(ctx context.Context, in *FindEnabledGzipConfigRequest, opts ...grpc.CallOption) (*FindEnabledGzipConfigResponse, error) { + out := new(FindEnabledGzipConfigResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPGzipService/findEnabledHTTPGzipConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPGzipServiceClient) UpdateHTTPGzip(ctx context.Context, in *UpdateHTTPGzipRequest, opts ...grpc.CallOption) (*UpdateHTTPGzipResponse, error) { + out := new(UpdateHTTPGzipResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPGzipService/updateHTTPGzip", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HTTPGzipServiceServer is the server API for HTTPGzipService service. +type HTTPGzipServiceServer interface { + // 创建Gzip配置 + CreateHTTPGzip(context.Context, *CreateHTTPGzipRequest) (*CreateHTTPGzipResponse, error) + // 查找Gzip配置 + FindEnabledHTTPGzipConfig(context.Context, *FindEnabledGzipConfigRequest) (*FindEnabledGzipConfigResponse, error) + // 修改Gzip配置 + UpdateHTTPGzip(context.Context, *UpdateHTTPGzipRequest) (*UpdateHTTPGzipResponse, error) +} + +// UnimplementedHTTPGzipServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHTTPGzipServiceServer struct { +} + +func (*UnimplementedHTTPGzipServiceServer) CreateHTTPGzip(context.Context, *CreateHTTPGzipRequest) (*CreateHTTPGzipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPGzip not implemented") +} +func (*UnimplementedHTTPGzipServiceServer) FindEnabledHTTPGzipConfig(context.Context, *FindEnabledGzipConfigRequest) (*FindEnabledGzipConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledHTTPGzipConfig not implemented") +} +func (*UnimplementedHTTPGzipServiceServer) UpdateHTTPGzip(context.Context, *UpdateHTTPGzipRequest) (*UpdateHTTPGzipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPGzip not implemented") +} + +func RegisterHTTPGzipServiceServer(s *grpc.Server, srv HTTPGzipServiceServer) { + s.RegisterService(&_HTTPGzipService_serviceDesc, srv) +} + +func _HTTPGzipService_CreateHTTPGzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateHTTPGzipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPGzipServiceServer).CreateHTTPGzip(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPGzipService/CreateHTTPGzip", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPGzipServiceServer).CreateHTTPGzip(ctx, req.(*CreateHTTPGzipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPGzipService_FindEnabledHTTPGzipConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledGzipConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPGzipServiceServer).FindEnabledHTTPGzipConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPGzipService/FindEnabledHTTPGzipConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPGzipServiceServer).FindEnabledHTTPGzipConfig(ctx, req.(*FindEnabledGzipConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPGzipService_UpdateHTTPGzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHTTPGzipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPGzipServiceServer).UpdateHTTPGzip(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPGzipService/UpdateHTTPGzip", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPGzipServiceServer).UpdateHTTPGzip(ctx, req.(*UpdateHTTPGzipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HTTPGzipService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.HTTPGzipService", + HandlerType: (*HTTPGzipServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createHTTPGzip", + Handler: _HTTPGzipService_CreateHTTPGzip_Handler, + }, + { + MethodName: "findEnabledHTTPGzipConfig", + Handler: _HTTPGzipService_FindEnabledHTTPGzipConfig_Handler, + }, + { + MethodName: "updateHTTPGzip", + Handler: _HTTPGzipService_UpdateHTTPGzip_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_http_gzip.proto", +} diff --git a/pkg/rpc/pb/service_http_web.pb.go b/pkg/rpc/pb/service_http_web.pb.go index e518240..aa2251c 100644 --- a/pkg/rpc/pb/service_http_web.pb.go +++ b/pkg/rpc/pb/service_http_web.pb.go @@ -219,7 +219,7 @@ func (x *FindEnabledHTTPWebResponse) GetWeb() *HTTPWeb { return nil } -// 更新Web配置 +// 更改Web配置 type UpdateHTTPWebRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -313,6 +313,100 @@ func (*UpdateHTTPWebResponse) Descriptor() ([]byte, []int) { return file_service_http_web_proto_rawDescGZIP(), []int{5} } +// 更改Gzip配置 +type UpdateHTTPWebGzipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebId int64 `protobuf:"varint,1,opt,name=webId,proto3" json:"webId,omitempty"` + GzipId int64 `protobuf:"varint,2,opt,name=gzipId,proto3" json:"gzipId,omitempty"` +} + +func (x *UpdateHTTPWebGzipRequest) Reset() { + *x = UpdateHTTPWebGzipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPWebGzipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPWebGzipRequest) ProtoMessage() {} + +func (x *UpdateHTTPWebGzipRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_proto_msgTypes[6] + 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 UpdateHTTPWebGzipRequest.ProtoReflect.Descriptor instead. +func (*UpdateHTTPWebGzipRequest) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateHTTPWebGzipRequest) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +func (x *UpdateHTTPWebGzipRequest) GetGzipId() int64 { + if x != nil { + return x.GzipId + } + return 0 +} + +type UpdateHTTPWebGzipResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateHTTPWebGzipResponse) Reset() { + *x = UpdateHTTPWebGzipResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPWebGzipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPWebGzipResponse) ProtoMessage() {} + +func (x *UpdateHTTPWebGzipResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_proto_msgTypes[7] + 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 UpdateHTTPWebGzipResponse.ProtoReflect.Descriptor instead. +func (*UpdateHTTPWebGzipResponse) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{7} +} + var File_service_http_web_proto protoreflect.FileDescriptor var file_service_http_web_proto_rawDesc = []byte{ @@ -337,23 +431,35 @@ var file_service_http_web_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, 0x01, 0x0a, 0x0e, 0x48, 0x54, 0x54, - 0x50, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, - 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x7a, + 0x69, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x7a, 0x69, 0x70, + 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, + 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xc3, 0x02, 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, + 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, + 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x1d, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, + 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, + 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, + 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, + 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -368,7 +474,7 @@ func file_service_http_web_proto_rawDescGZIP() []byte { return file_service_http_web_proto_rawDescData } -var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_service_http_web_proto_goTypes = []interface{}{ (*CreateHTTPWebRequest)(nil), // 0: pb.CreateHTTPWebRequest (*CreateHTTPWebResponse)(nil), // 1: pb.CreateHTTPWebResponse @@ -376,18 +482,22 @@ var file_service_http_web_proto_goTypes = []interface{}{ (*FindEnabledHTTPWebResponse)(nil), // 3: pb.FindEnabledHTTPWebResponse (*UpdateHTTPWebRequest)(nil), // 4: pb.UpdateHTTPWebRequest (*UpdateHTTPWebResponse)(nil), // 5: pb.UpdateHTTPWebResponse - (*HTTPWeb)(nil), // 6: pb.HTTPWeb + (*UpdateHTTPWebGzipRequest)(nil), // 6: pb.UpdateHTTPWebGzipRequest + (*UpdateHTTPWebGzipResponse)(nil), // 7: pb.UpdateHTTPWebGzipResponse + (*HTTPWeb)(nil), // 8: pb.HTTPWeb } var file_service_http_web_proto_depIdxs = []int32{ - 6, // 0: pb.FindEnabledHTTPWebResponse.web:type_name -> pb.HTTPWeb + 8, // 0: pb.FindEnabledHTTPWebResponse.web:type_name -> pb.HTTPWeb 0, // 1: pb.HTTPWebService.createHTTPWeb:input_type -> pb.CreateHTTPWebRequest 2, // 2: pb.HTTPWebService.findEnabledHTTPWeb:input_type -> pb.FindEnabledHTTPWebRequest 4, // 3: pb.HTTPWebService.updateHTTPWeb:input_type -> pb.UpdateHTTPWebRequest - 1, // 4: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse - 3, // 5: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse - 5, // 6: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.UpdateHTTPWebResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type + 6, // 4: pb.HTTPWebService.updateHTTPWebGzip:input_type -> pb.UpdateHTTPWebGzipRequest + 1, // 5: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse + 3, // 6: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse + 5, // 7: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.UpdateHTTPWebResponse + 7, // 8: pb.HTTPWebService.updateHTTPWebGzip:output_type -> pb.UpdateHTTPWebGzipResponse + 5, // [5:9] is the sub-list for method output_type + 1, // [1:5] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -472,6 +582,30 @@ func file_service_http_web_proto_init() { return nil } } + file_service_http_web_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPWebGzipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_web_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPWebGzipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -479,7 +613,7 @@ func file_service_http_web_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_http_web_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, @@ -509,8 +643,10 @@ type HTTPWebServiceClient interface { CreateHTTPWeb(ctx context.Context, in *CreateHTTPWebRequest, opts ...grpc.CallOption) (*CreateHTTPWebResponse, error) // 查找Web配置 FindEnabledHTTPWeb(ctx context.Context, in *FindEnabledHTTPWebRequest, opts ...grpc.CallOption) (*FindEnabledHTTPWebResponse, error) - // 更新Web配置 + // 更改Web配置 UpdateHTTPWeb(ctx context.Context, in *UpdateHTTPWebRequest, opts ...grpc.CallOption) (*UpdateHTTPWebResponse, error) + // 更改Gzip配置 + UpdateHTTPWebGzip(ctx context.Context, in *UpdateHTTPWebGzipRequest, opts ...grpc.CallOption) (*UpdateHTTPWebGzipResponse, error) } type hTTPWebServiceClient struct { @@ -548,14 +684,25 @@ func (c *hTTPWebServiceClient) UpdateHTTPWeb(ctx context.Context, in *UpdateHTTP return out, nil } +func (c *hTTPWebServiceClient) UpdateHTTPWebGzip(ctx context.Context, in *UpdateHTTPWebGzipRequest, opts ...grpc.CallOption) (*UpdateHTTPWebGzipResponse, error) { + out := new(UpdateHTTPWebGzipResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPWebService/updateHTTPWebGzip", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // HTTPWebServiceServer is the server API for HTTPWebService service. type HTTPWebServiceServer interface { // 创建Web配置 CreateHTTPWeb(context.Context, *CreateHTTPWebRequest) (*CreateHTTPWebResponse, error) // 查找Web配置 FindEnabledHTTPWeb(context.Context, *FindEnabledHTTPWebRequest) (*FindEnabledHTTPWebResponse, error) - // 更新Web配置 + // 更改Web配置 UpdateHTTPWeb(context.Context, *UpdateHTTPWebRequest) (*UpdateHTTPWebResponse, error) + // 更改Gzip配置 + UpdateHTTPWebGzip(context.Context, *UpdateHTTPWebGzipRequest) (*UpdateHTTPWebGzipResponse, error) } // UnimplementedHTTPWebServiceServer can be embedded to have forward compatible implementations. @@ -571,6 +718,9 @@ func (*UnimplementedHTTPWebServiceServer) FindEnabledHTTPWeb(context.Context, *F func (*UnimplementedHTTPWebServiceServer) UpdateHTTPWeb(context.Context, *UpdateHTTPWebRequest) (*UpdateHTTPWebResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPWeb not implemented") } +func (*UnimplementedHTTPWebServiceServer) UpdateHTTPWebGzip(context.Context, *UpdateHTTPWebGzipRequest) (*UpdateHTTPWebGzipResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPWebGzip not implemented") +} func RegisterHTTPWebServiceServer(s *grpc.Server, srv HTTPWebServiceServer) { s.RegisterService(&_HTTPWebService_serviceDesc, srv) @@ -630,6 +780,24 @@ func _HTTPWebService_UpdateHTTPWeb_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _HTTPWebService_UpdateHTTPWebGzip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHTTPWebGzipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPWebServiceServer).UpdateHTTPWebGzip(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPWebService/UpdateHTTPWebGzip", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPWebServiceServer).UpdateHTTPWebGzip(ctx, req.(*UpdateHTTPWebGzipRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _HTTPWebService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.HTTPWebService", HandlerType: (*HTTPWebServiceServer)(nil), @@ -646,6 +814,10 @@ var _HTTPWebService_serviceDesc = grpc.ServiceDesc{ MethodName: "updateHTTPWeb", Handler: _HTTPWebService_UpdateHTTPWeb_Handler, }, + { + MethodName: "updateHTTPWebGzip", + Handler: _HTTPWebService_UpdateHTTPWebGzip_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_http_web.proto", diff --git a/pkg/rpc/pb/service_reverse_proxy.pb.go b/pkg/rpc/pb/service_reverse_proxy.pb.go index 45f7885..77edf4f 100644 --- a/pkg/rpc/pb/service_reverse_proxy.pb.go +++ b/pkg/rpc/pb/service_reverse_proxy.pb.go @@ -612,6 +612,100 @@ func (*UpdateReverseProxyBackupOriginsResponse) Descriptor() ([]byte, []int) { return file_service_reverse_proxy_proto_rawDescGZIP(), []int{11} } +// 修改是否启用 +type UpdateReverseProxyIsOnRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` +} + +func (x *UpdateReverseProxyIsOnRequest) Reset() { + *x = UpdateReverseProxyIsOnRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxyIsOnRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxyIsOnRequest) ProtoMessage() {} + +func (x *UpdateReverseProxyIsOnRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_proto_msgTypes[12] + 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 UpdateReverseProxyIsOnRequest.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxyIsOnRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateReverseProxyIsOnRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +func (x *UpdateReverseProxyIsOnRequest) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +type UpdateReverseProxyIsOnResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateReverseProxyIsOnResponse) Reset() { + *x = UpdateReverseProxyIsOnResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxyIsOnResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxyIsOnResponse) ProtoMessage() {} + +func (x *UpdateReverseProxyIsOnResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_proto_msgTypes[13] + 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 UpdateReverseProxyIsOnResponse.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxyIsOnResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{13} +} + var File_service_reverse_proxy_proto protoreflect.FileDescriptor var file_service_reverse_proxy_proto_rawDesc = []byte{ @@ -682,50 +776,64 @@ var file_service_reverse_proxy_proto_rawDesc = []byte{ 0x0c, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x29, 0x0a, 0x27, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x05, 0x0a, 0x13, 0x52, 0x65, - 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x53, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x0a, 0x1d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, + 0x73, 0x4f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x73, 0x4f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x93, 0x06, 0x0a, 0x13, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x53, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, - 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x2e, 0x70, 0x62, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x71, 0x0a, 0x1c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, - 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x71, 0x0a, 0x1c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x12, + 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x7a, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, + 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, + 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x49, 0x73, 0x4f, 0x6e, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, + 0x73, 0x4f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x49, 0x73, 0x4f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -741,7 +849,7 @@ func file_service_reverse_proxy_proto_rawDescGZIP() []byte { return file_service_reverse_proxy_proto_rawDescData } -var file_service_reverse_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_service_reverse_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_service_reverse_proxy_proto_goTypes = []interface{}{ (*CreateReverseProxyRequest)(nil), // 0: pb.CreateReverseProxyRequest (*CreateReverseProxyResponse)(nil), // 1: pb.CreateReverseProxyResponse @@ -755,24 +863,28 @@ var file_service_reverse_proxy_proto_goTypes = []interface{}{ (*UpdateReverseProxyPrimaryOriginsResponse)(nil), // 9: pb.UpdateReverseProxyPrimaryOriginsResponse (*UpdateReverseProxyBackupOriginsRequest)(nil), // 10: pb.UpdateReverseProxyBackupOriginsRequest (*UpdateReverseProxyBackupOriginsResponse)(nil), // 11: pb.UpdateReverseProxyBackupOriginsResponse - (*ReverseProxy)(nil), // 12: pb.ReverseProxy + (*UpdateReverseProxyIsOnRequest)(nil), // 12: pb.UpdateReverseProxyIsOnRequest + (*UpdateReverseProxyIsOnResponse)(nil), // 13: pb.UpdateReverseProxyIsOnResponse + (*ReverseProxy)(nil), // 14: pb.ReverseProxy } var file_service_reverse_proxy_proto_depIdxs = []int32{ - 12, // 0: pb.FindEnabledReverseProxyResponse.reverseProxy:type_name -> pb.ReverseProxy + 14, // 0: pb.FindEnabledReverseProxyResponse.reverseProxy:type_name -> pb.ReverseProxy 0, // 1: pb.ReverseProxyService.createReverseProxy:input_type -> pb.CreateReverseProxyRequest 2, // 2: pb.ReverseProxyService.findEnabledReverseProxy:input_type -> pb.FindEnabledReverseProxyRequest 4, // 3: pb.ReverseProxyService.findEnabledReverseProxyConfig:input_type -> pb.FindEnabledReverseProxyConfigRequest 6, // 4: pb.ReverseProxyService.updateReverseProxyScheduling:input_type -> pb.UpdateReverseProxySchedulingRequest 8, // 5: pb.ReverseProxyService.updateReverseProxyPrimaryOrigins:input_type -> pb.UpdateReverseProxyPrimaryOriginsRequest 10, // 6: pb.ReverseProxyService.updateReverseProxyBackupOrigins:input_type -> pb.UpdateReverseProxyBackupOriginsRequest - 1, // 7: pb.ReverseProxyService.createReverseProxy:output_type -> pb.CreateReverseProxyResponse - 3, // 8: pb.ReverseProxyService.findEnabledReverseProxy:output_type -> pb.FindEnabledReverseProxyResponse - 5, // 9: pb.ReverseProxyService.findEnabledReverseProxyConfig:output_type -> pb.FindEnabledReverseProxyConfigResponse - 7, // 10: pb.ReverseProxyService.updateReverseProxyScheduling:output_type -> pb.UpdateReverseProxySchedulingResponse - 9, // 11: pb.ReverseProxyService.updateReverseProxyPrimaryOrigins:output_type -> pb.UpdateReverseProxyPrimaryOriginsResponse - 11, // 12: pb.ReverseProxyService.updateReverseProxyBackupOrigins:output_type -> pb.UpdateReverseProxyBackupOriginsResponse - 7, // [7:13] is the sub-list for method output_type - 1, // [1:7] is the sub-list for method input_type + 12, // 7: pb.ReverseProxyService.updateReverseProxyIsOn:input_type -> pb.UpdateReverseProxyIsOnRequest + 1, // 8: pb.ReverseProxyService.createReverseProxy:output_type -> pb.CreateReverseProxyResponse + 3, // 9: pb.ReverseProxyService.findEnabledReverseProxy:output_type -> pb.FindEnabledReverseProxyResponse + 5, // 10: pb.ReverseProxyService.findEnabledReverseProxyConfig:output_type -> pb.FindEnabledReverseProxyConfigResponse + 7, // 11: pb.ReverseProxyService.updateReverseProxyScheduling:output_type -> pb.UpdateReverseProxySchedulingResponse + 9, // 12: pb.ReverseProxyService.updateReverseProxyPrimaryOrigins:output_type -> pb.UpdateReverseProxyPrimaryOriginsResponse + 11, // 13: pb.ReverseProxyService.updateReverseProxyBackupOrigins:output_type -> pb.UpdateReverseProxyBackupOriginsResponse + 13, // 14: pb.ReverseProxyService.updateReverseProxyIsOn:output_type -> pb.UpdateReverseProxyIsOnResponse + 8, // [8:15] is the sub-list for method output_type + 1, // [1:8] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -929,6 +1041,30 @@ func file_service_reverse_proxy_proto_init() { return nil } } + file_service_reverse_proxy_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxyIsOnRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxyIsOnResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -936,7 +1072,7 @@ func file_service_reverse_proxy_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_reverse_proxy_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, @@ -974,6 +1110,8 @@ type ReverseProxyServiceClient interface { UpdateReverseProxyPrimaryOrigins(ctx context.Context, in *UpdateReverseProxyPrimaryOriginsRequest, opts ...grpc.CallOption) (*UpdateReverseProxyPrimaryOriginsResponse, error) // 修改备用源站信息 UpdateReverseProxyBackupOrigins(ctx context.Context, in *UpdateReverseProxyBackupOriginsRequest, opts ...grpc.CallOption) (*UpdateReverseProxyBackupOriginsResponse, error) + // 修改是否启用 + UpdateReverseProxyIsOn(ctx context.Context, in *UpdateReverseProxyIsOnRequest, opts ...grpc.CallOption) (*UpdateReverseProxyIsOnResponse, error) } type reverseProxyServiceClient struct { @@ -1038,6 +1176,15 @@ func (c *reverseProxyServiceClient) UpdateReverseProxyBackupOrigins(ctx context. return out, nil } +func (c *reverseProxyServiceClient) UpdateReverseProxyIsOn(ctx context.Context, in *UpdateReverseProxyIsOnRequest, opts ...grpc.CallOption) (*UpdateReverseProxyIsOnResponse, error) { + out := new(UpdateReverseProxyIsOnResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/updateReverseProxyIsOn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ReverseProxyServiceServer is the server API for ReverseProxyService service. type ReverseProxyServiceServer interface { // 创建反向代理 @@ -1052,6 +1199,8 @@ type ReverseProxyServiceServer interface { UpdateReverseProxyPrimaryOrigins(context.Context, *UpdateReverseProxyPrimaryOriginsRequest) (*UpdateReverseProxyPrimaryOriginsResponse, error) // 修改备用源站信息 UpdateReverseProxyBackupOrigins(context.Context, *UpdateReverseProxyBackupOriginsRequest) (*UpdateReverseProxyBackupOriginsResponse, error) + // 修改是否启用 + UpdateReverseProxyIsOn(context.Context, *UpdateReverseProxyIsOnRequest) (*UpdateReverseProxyIsOnResponse, error) } // UnimplementedReverseProxyServiceServer can be embedded to have forward compatible implementations. @@ -1076,6 +1225,9 @@ func (*UnimplementedReverseProxyServiceServer) UpdateReverseProxyPrimaryOrigins( func (*UnimplementedReverseProxyServiceServer) UpdateReverseProxyBackupOrigins(context.Context, *UpdateReverseProxyBackupOriginsRequest) (*UpdateReverseProxyBackupOriginsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateReverseProxyBackupOrigins not implemented") } +func (*UnimplementedReverseProxyServiceServer) UpdateReverseProxyIsOn(context.Context, *UpdateReverseProxyIsOnRequest) (*UpdateReverseProxyIsOnResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReverseProxyIsOn not implemented") +} func RegisterReverseProxyServiceServer(s *grpc.Server, srv ReverseProxyServiceServer) { s.RegisterService(&_ReverseProxyService_serviceDesc, srv) @@ -1189,6 +1341,24 @@ func _ReverseProxyService_UpdateReverseProxyBackupOrigins_Handler(srv interface{ return interceptor(ctx, in, info, handler) } +func _ReverseProxyService_UpdateReverseProxyIsOn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReverseProxyIsOnRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyIsOn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/UpdateReverseProxyIsOn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyIsOn(ctx, req.(*UpdateReverseProxyIsOnRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _ReverseProxyService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.ReverseProxyService", HandlerType: (*ReverseProxyServiceServer)(nil), @@ -1217,6 +1387,10 @@ var _ReverseProxyService_serviceDesc = grpc.ServiceDesc{ MethodName: "updateReverseProxyBackupOrigins", Handler: _ReverseProxyService_UpdateReverseProxyBackupOrigins_Handler, }, + { + MethodName: "updateReverseProxyIsOn", + Handler: _ReverseProxyService_UpdateReverseProxyIsOn_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_reverse_proxy.proto", diff --git a/pkg/rpc/pb/service_server.pb.go b/pkg/rpc/pb/service_server.pb.go index 3d7f370..e0329d0 100644 --- a/pkg/rpc/pb/service_server.pb.go +++ b/pkg/rpc/pb/service_server.pb.go @@ -1667,7 +1667,7 @@ func (x *FindEnabledServerTypeResponse) GetType() string { } // 查找反向代理设置 -type FindServerReverseProxyRequest struct { +type FindServerReverseProxyConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1675,8 +1675,8 @@ type FindServerReverseProxyRequest struct { ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` } -func (x *FindServerReverseProxyRequest) Reset() { - *x = FindServerReverseProxyRequest{} +func (x *FindServerReverseProxyConfigRequest) Reset() { + *x = FindServerReverseProxyConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1684,13 +1684,13 @@ func (x *FindServerReverseProxyRequest) Reset() { } } -func (x *FindServerReverseProxyRequest) String() string { +func (x *FindServerReverseProxyConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FindServerReverseProxyRequest) ProtoMessage() {} +func (*FindServerReverseProxyConfigRequest) ProtoMessage() {} -func (x *FindServerReverseProxyRequest) ProtoReflect() protoreflect.Message { +func (x *FindServerReverseProxyConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1702,19 +1702,19 @@ func (x *FindServerReverseProxyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FindServerReverseProxyRequest.ProtoReflect.Descriptor instead. -func (*FindServerReverseProxyRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FindServerReverseProxyConfigRequest.ProtoReflect.Descriptor instead. +func (*FindServerReverseProxyConfigRequest) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{32} } -func (x *FindServerReverseProxyRequest) GetServerId() int64 { +func (x *FindServerReverseProxyConfigRequest) GetServerId() int64 { if x != nil { return x.ServerId } return 0 } -type FindServerReverseProxyResponse struct { +type FindServerReverseProxyConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1722,8 +1722,8 @@ type FindServerReverseProxyResponse struct { Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (x *FindServerReverseProxyResponse) Reset() { - *x = FindServerReverseProxyResponse{} +func (x *FindServerReverseProxyConfigResponse) Reset() { + *x = FindServerReverseProxyConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1731,13 +1731,13 @@ func (x *FindServerReverseProxyResponse) Reset() { } } -func (x *FindServerReverseProxyResponse) String() string { +func (x *FindServerReverseProxyConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FindServerReverseProxyResponse) ProtoMessage() {} +func (*FindServerReverseProxyConfigResponse) ProtoMessage() {} -func (x *FindServerReverseProxyResponse) ProtoReflect() protoreflect.Message { +func (x *FindServerReverseProxyConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1749,18 +1749,113 @@ func (x *FindServerReverseProxyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FindServerReverseProxyResponse.ProtoReflect.Descriptor instead. -func (*FindServerReverseProxyResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use FindServerReverseProxyConfigResponse.ProtoReflect.Descriptor instead. +func (*FindServerReverseProxyConfigResponse) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{33} } -func (x *FindServerReverseProxyResponse) GetConfig() []byte { +func (x *FindServerReverseProxyConfigResponse) GetConfig() []byte { if x != nil { return x.Config } return nil } +// 初始化Web设置 +type InitServerWebRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` +} + +func (x *InitServerWebRequest) Reset() { + *x = InitServerWebRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitServerWebRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitServerWebRequest) ProtoMessage() {} + +func (x *InitServerWebRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[34] + 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 InitServerWebRequest.ProtoReflect.Descriptor instead. +func (*InitServerWebRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{34} +} + +func (x *InitServerWebRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +type InitServerWebResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebId int64 `protobuf:"varint,1,opt,name=webId,proto3" json:"webId,omitempty"` +} + +func (x *InitServerWebResponse) Reset() { + *x = InitServerWebResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitServerWebResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitServerWebResponse) ProtoMessage() {} + +func (x *InitServerWebResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[35] + 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 InitServerWebResponse.ProtoReflect.Descriptor instead. +func (*InitServerWebResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{35} +} + +func (x *InitServerWebResponse) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + var File_service_server_proto protoreflect.FileDescriptor var file_service_server_proto_rawDesc = []byte{ @@ -1909,104 +2004,117 @@ var file_service_server_proto_rawDesc = []byte{ 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3b, 0x0a, 0x1d, 0x46, 0x69, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x41, 0x0a, 0x23, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x32, 0x8a, 0x0b, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3e, 0x0a, + 0x24, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x32, 0x0a, + 0x14, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, + 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, + 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, + 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, + 0x32, 0xe2, 0x0b, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, + 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1c, 0x2e, 0x70, 0x62, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, - 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, - 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x53, 0x12, 0x1c, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, - 0x54, 0x50, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, - 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x12, 0x1a, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, - 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x55, 0x6e, 0x69, 0x78, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x55, 0x44, 0x50, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x12, - 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, - 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x53, 0x12, 0x1c, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, + 0x50, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x53, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x12, 0x1a, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x55, 0x6e, 0x69, 0x78, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, + 0x44, 0x50, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x55, 0x44, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x12, 0x1a, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5f, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, - 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, - 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, - 0x16, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, + 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, + 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x1c, + 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x70, + 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x44, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, + 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, + 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2021,47 +2129,49 @@ func file_service_server_proto_rawDescGZIP() []byte { return file_service_server_proto_rawDescData } -var file_service_server_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_service_server_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_service_server_proto_goTypes = []interface{}{ - (*CreateServerRequest)(nil), // 0: pb.CreateServerRequest - (*CreateServerResponse)(nil), // 1: pb.CreateServerResponse - (*UpdateServerBasicRequest)(nil), // 2: pb.UpdateServerBasicRequest - (*UpdateServerBasicResponse)(nil), // 3: pb.UpdateServerBasicResponse - (*UpdateServerHTTPRequest)(nil), // 4: pb.UpdateServerHTTPRequest - (*UpdateServerHTTPResponse)(nil), // 5: pb.UpdateServerHTTPResponse - (*UpdateServerHTTPSRequest)(nil), // 6: pb.UpdateServerHTTPSRequest - (*UpdateServerHTTPSResponse)(nil), // 7: pb.UpdateServerHTTPSResponse - (*UpdateServerTCPRequest)(nil), // 8: pb.UpdateServerTCPRequest - (*UpdateServerTCPResponse)(nil), // 9: pb.UpdateServerTCPResponse - (*UpdateServerTLSRequest)(nil), // 10: pb.UpdateServerTLSRequest - (*UpdateServerTLSResponse)(nil), // 11: pb.UpdateServerTLSResponse - (*UpdateServerUnixRequest)(nil), // 12: pb.UpdateServerUnixRequest - (*UpdateServerUnixResponse)(nil), // 13: pb.UpdateServerUnixResponse - (*UpdateServerUDPRequest)(nil), // 14: pb.UpdateServerUDPRequest - (*UpdateServerUDPResponse)(nil), // 15: pb.UpdateServerUDPResponse - (*UpdateServerWebRequest)(nil), // 16: pb.UpdateServerWebRequest - (*UpdateServerWebResponse)(nil), // 17: pb.UpdateServerWebResponse - (*UpdateServerReverseProxyRequest)(nil), // 18: pb.UpdateServerReverseProxyRequest - (*UpdateServerReverseProxyResponse)(nil), // 19: pb.UpdateServerReverseProxyResponse - (*UpdateServerNamesRequest)(nil), // 20: pb.UpdateServerNamesRequest - (*UpdateServerNamesResponse)(nil), // 21: pb.UpdateServerNamesResponse - (*CountAllEnabledServersRequest)(nil), // 22: pb.CountAllEnabledServersRequest - (*CountAllEnabledServersResponse)(nil), // 23: pb.CountAllEnabledServersResponse - (*ListEnabledServersRequest)(nil), // 24: pb.ListEnabledServersRequest - (*ListEnabledServersResponse)(nil), // 25: pb.ListEnabledServersResponse - (*DisableServerRequest)(nil), // 26: pb.DisableServerRequest - (*DisableServerResponse)(nil), // 27: pb.DisableServerResponse - (*FindEnabledServerRequest)(nil), // 28: pb.FindEnabledServerRequest - (*FindEnabledServerResponse)(nil), // 29: pb.FindEnabledServerResponse - (*FindEnabledServerTypeRequest)(nil), // 30: pb.FindEnabledServerTypeRequest - (*FindEnabledServerTypeResponse)(nil), // 31: pb.FindEnabledServerTypeResponse - (*FindServerReverseProxyRequest)(nil), // 32: pb.FindServerReverseProxyRequest - (*FindServerReverseProxyResponse)(nil), // 33: pb.FindServerReverseProxyResponse - (*Server)(nil), // 34: pb.Server + (*CreateServerRequest)(nil), // 0: pb.CreateServerRequest + (*CreateServerResponse)(nil), // 1: pb.CreateServerResponse + (*UpdateServerBasicRequest)(nil), // 2: pb.UpdateServerBasicRequest + (*UpdateServerBasicResponse)(nil), // 3: pb.UpdateServerBasicResponse + (*UpdateServerHTTPRequest)(nil), // 4: pb.UpdateServerHTTPRequest + (*UpdateServerHTTPResponse)(nil), // 5: pb.UpdateServerHTTPResponse + (*UpdateServerHTTPSRequest)(nil), // 6: pb.UpdateServerHTTPSRequest + (*UpdateServerHTTPSResponse)(nil), // 7: pb.UpdateServerHTTPSResponse + (*UpdateServerTCPRequest)(nil), // 8: pb.UpdateServerTCPRequest + (*UpdateServerTCPResponse)(nil), // 9: pb.UpdateServerTCPResponse + (*UpdateServerTLSRequest)(nil), // 10: pb.UpdateServerTLSRequest + (*UpdateServerTLSResponse)(nil), // 11: pb.UpdateServerTLSResponse + (*UpdateServerUnixRequest)(nil), // 12: pb.UpdateServerUnixRequest + (*UpdateServerUnixResponse)(nil), // 13: pb.UpdateServerUnixResponse + (*UpdateServerUDPRequest)(nil), // 14: pb.UpdateServerUDPRequest + (*UpdateServerUDPResponse)(nil), // 15: pb.UpdateServerUDPResponse + (*UpdateServerWebRequest)(nil), // 16: pb.UpdateServerWebRequest + (*UpdateServerWebResponse)(nil), // 17: pb.UpdateServerWebResponse + (*UpdateServerReverseProxyRequest)(nil), // 18: pb.UpdateServerReverseProxyRequest + (*UpdateServerReverseProxyResponse)(nil), // 19: pb.UpdateServerReverseProxyResponse + (*UpdateServerNamesRequest)(nil), // 20: pb.UpdateServerNamesRequest + (*UpdateServerNamesResponse)(nil), // 21: pb.UpdateServerNamesResponse + (*CountAllEnabledServersRequest)(nil), // 22: pb.CountAllEnabledServersRequest + (*CountAllEnabledServersResponse)(nil), // 23: pb.CountAllEnabledServersResponse + (*ListEnabledServersRequest)(nil), // 24: pb.ListEnabledServersRequest + (*ListEnabledServersResponse)(nil), // 25: pb.ListEnabledServersResponse + (*DisableServerRequest)(nil), // 26: pb.DisableServerRequest + (*DisableServerResponse)(nil), // 27: pb.DisableServerResponse + (*FindEnabledServerRequest)(nil), // 28: pb.FindEnabledServerRequest + (*FindEnabledServerResponse)(nil), // 29: pb.FindEnabledServerResponse + (*FindEnabledServerTypeRequest)(nil), // 30: pb.FindEnabledServerTypeRequest + (*FindEnabledServerTypeResponse)(nil), // 31: pb.FindEnabledServerTypeResponse + (*FindServerReverseProxyConfigRequest)(nil), // 32: pb.FindServerReverseProxyConfigRequest + (*FindServerReverseProxyConfigResponse)(nil), // 33: pb.FindServerReverseProxyConfigResponse + (*InitServerWebRequest)(nil), // 34: pb.InitServerWebRequest + (*InitServerWebResponse)(nil), // 35: pb.InitServerWebResponse + (*Server)(nil), // 36: pb.Server } var file_service_server_proto_depIdxs = []int32{ - 34, // 0: pb.ListEnabledServersResponse.servers:type_name -> pb.Server - 34, // 1: pb.FindEnabledServerResponse.server:type_name -> pb.Server + 36, // 0: pb.ListEnabledServersResponse.servers:type_name -> pb.Server + 36, // 1: pb.FindEnabledServerResponse.server:type_name -> pb.Server 0, // 2: pb.ServerService.createServer:input_type -> pb.CreateServerRequest 2, // 3: pb.ServerService.updateServerBasic:input_type -> pb.UpdateServerBasicRequest 4, // 4: pb.ServerService.updateServerHTTP:input_type -> pb.UpdateServerHTTPRequest @@ -2078,26 +2188,28 @@ var file_service_server_proto_depIdxs = []int32{ 26, // 15: pb.ServerService.disableServer:input_type -> pb.DisableServerRequest 28, // 16: pb.ServerService.findEnabledServer:input_type -> pb.FindEnabledServerRequest 30, // 17: pb.ServerService.findEnabledServerType:input_type -> pb.FindEnabledServerTypeRequest - 32, // 18: pb.ServerService.findServerReverseProxy:input_type -> pb.FindServerReverseProxyRequest - 1, // 19: pb.ServerService.createServer:output_type -> pb.CreateServerResponse - 3, // 20: pb.ServerService.updateServerBasic:output_type -> pb.UpdateServerBasicResponse - 5, // 21: pb.ServerService.updateServerHTTP:output_type -> pb.UpdateServerHTTPResponse - 7, // 22: pb.ServerService.updateServerHTTPS:output_type -> pb.UpdateServerHTTPSResponse - 9, // 23: pb.ServerService.updateServerTCP:output_type -> pb.UpdateServerTCPResponse - 11, // 24: pb.ServerService.updateServerTLS:output_type -> pb.UpdateServerTLSResponse - 13, // 25: pb.ServerService.updateServerUnix:output_type -> pb.UpdateServerUnixResponse - 15, // 26: pb.ServerService.updateServerUDP:output_type -> pb.UpdateServerUDPResponse - 17, // 27: pb.ServerService.updateServerWeb:output_type -> pb.UpdateServerWebResponse - 19, // 28: pb.ServerService.updateServerReverseProxy:output_type -> pb.UpdateServerReverseProxyResponse - 21, // 29: pb.ServerService.updateServerNames:output_type -> pb.UpdateServerNamesResponse - 23, // 30: pb.ServerService.countAllEnabledServers:output_type -> pb.CountAllEnabledServersResponse - 25, // 31: pb.ServerService.listEnabledServers:output_type -> pb.ListEnabledServersResponse - 27, // 32: pb.ServerService.disableServer:output_type -> pb.DisableServerResponse - 29, // 33: pb.ServerService.findEnabledServer:output_type -> pb.FindEnabledServerResponse - 31, // 34: pb.ServerService.findEnabledServerType:output_type -> pb.FindEnabledServerTypeResponse - 33, // 35: pb.ServerService.findServerReverseProxy:output_type -> pb.FindServerReverseProxyResponse - 19, // [19:36] is the sub-list for method output_type - 2, // [2:19] is the sub-list for method input_type + 32, // 18: pb.ServerService.findServerReverseProxyConfig:input_type -> pb.FindServerReverseProxyConfigRequest + 34, // 19: pb.ServerService.initServerWeb:input_type -> pb.InitServerWebRequest + 1, // 20: pb.ServerService.createServer:output_type -> pb.CreateServerResponse + 3, // 21: pb.ServerService.updateServerBasic:output_type -> pb.UpdateServerBasicResponse + 5, // 22: pb.ServerService.updateServerHTTP:output_type -> pb.UpdateServerHTTPResponse + 7, // 23: pb.ServerService.updateServerHTTPS:output_type -> pb.UpdateServerHTTPSResponse + 9, // 24: pb.ServerService.updateServerTCP:output_type -> pb.UpdateServerTCPResponse + 11, // 25: pb.ServerService.updateServerTLS:output_type -> pb.UpdateServerTLSResponse + 13, // 26: pb.ServerService.updateServerUnix:output_type -> pb.UpdateServerUnixResponse + 15, // 27: pb.ServerService.updateServerUDP:output_type -> pb.UpdateServerUDPResponse + 17, // 28: pb.ServerService.updateServerWeb:output_type -> pb.UpdateServerWebResponse + 19, // 29: pb.ServerService.updateServerReverseProxy:output_type -> pb.UpdateServerReverseProxyResponse + 21, // 30: pb.ServerService.updateServerNames:output_type -> pb.UpdateServerNamesResponse + 23, // 31: pb.ServerService.countAllEnabledServers:output_type -> pb.CountAllEnabledServersResponse + 25, // 32: pb.ServerService.listEnabledServers:output_type -> pb.ListEnabledServersResponse + 27, // 33: pb.ServerService.disableServer:output_type -> pb.DisableServerResponse + 29, // 34: pb.ServerService.findEnabledServer:output_type -> pb.FindEnabledServerResponse + 31, // 35: pb.ServerService.findEnabledServerType:output_type -> pb.FindEnabledServerTypeResponse + 33, // 36: pb.ServerService.findServerReverseProxyConfig:output_type -> pb.FindServerReverseProxyConfigResponse + 35, // 37: pb.ServerService.initServerWeb:output_type -> pb.InitServerWebResponse + 20, // [20:38] is the sub-list for method output_type + 2, // [2:20] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -2495,7 +2607,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindServerReverseProxyRequest); i { + switch v := v.(*FindServerReverseProxyConfigRequest); i { case 0: return &v.state case 1: @@ -2507,7 +2619,31 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindServerReverseProxyResponse); i { + switch v := v.(*FindServerReverseProxyConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitServerWebRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitServerWebResponse); i { case 0: return &v.state case 1: @@ -2525,7 +2661,7 @@ func file_service_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_server_proto_rawDesc, NumEnums: 0, - NumMessages: 34, + NumMessages: 36, NumExtensions: 0, NumServices: 1, }, @@ -2584,7 +2720,9 @@ type ServerServiceClient interface { // 查找服务的服务类型 FindEnabledServerType(ctx context.Context, in *FindEnabledServerTypeRequest, opts ...grpc.CallOption) (*FindEnabledServerTypeResponse, error) // 查找反向代理设置 - FindServerReverseProxy(ctx context.Context, in *FindServerReverseProxyRequest, opts ...grpc.CallOption) (*FindServerReverseProxyResponse, error) + FindServerReverseProxyConfig(ctx context.Context, in *FindServerReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindServerReverseProxyConfigResponse, error) + // 初始化Web设置 + InitServerWeb(ctx context.Context, in *InitServerWebRequest, opts ...grpc.CallOption) (*InitServerWebResponse, error) } type serverServiceClient struct { @@ -2739,9 +2877,18 @@ func (c *serverServiceClient) FindEnabledServerType(ctx context.Context, in *Fin return out, nil } -func (c *serverServiceClient) FindServerReverseProxy(ctx context.Context, in *FindServerReverseProxyRequest, opts ...grpc.CallOption) (*FindServerReverseProxyResponse, error) { - out := new(FindServerReverseProxyResponse) - err := c.cc.Invoke(ctx, "/pb.ServerService/findServerReverseProxy", in, out, opts...) +func (c *serverServiceClient) FindServerReverseProxyConfig(ctx context.Context, in *FindServerReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindServerReverseProxyConfigResponse, error) { + out := new(FindServerReverseProxyConfigResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/findServerReverseProxyConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) InitServerWeb(ctx context.Context, in *InitServerWebRequest, opts ...grpc.CallOption) (*InitServerWebResponse, error) { + out := new(InitServerWebResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/initServerWeb", in, out, opts...) if err != nil { return nil, err } @@ -2783,7 +2930,9 @@ type ServerServiceServer interface { // 查找服务的服务类型 FindEnabledServerType(context.Context, *FindEnabledServerTypeRequest) (*FindEnabledServerTypeResponse, error) // 查找反向代理设置 - FindServerReverseProxy(context.Context, *FindServerReverseProxyRequest) (*FindServerReverseProxyResponse, error) + FindServerReverseProxyConfig(context.Context, *FindServerReverseProxyConfigRequest) (*FindServerReverseProxyConfigResponse, error) + // 初始化Web设置 + InitServerWeb(context.Context, *InitServerWebRequest) (*InitServerWebResponse, error) } // UnimplementedServerServiceServer can be embedded to have forward compatible implementations. @@ -2838,8 +2987,11 @@ func (*UnimplementedServerServiceServer) FindEnabledServer(context.Context, *Fin func (*UnimplementedServerServiceServer) FindEnabledServerType(context.Context, *FindEnabledServerTypeRequest) (*FindEnabledServerTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindEnabledServerType not implemented") } -func (*UnimplementedServerServiceServer) FindServerReverseProxy(context.Context, *FindServerReverseProxyRequest) (*FindServerReverseProxyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindServerReverseProxy not implemented") +func (*UnimplementedServerServiceServer) FindServerReverseProxyConfig(context.Context, *FindServerReverseProxyConfigRequest) (*FindServerReverseProxyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindServerReverseProxyConfig not implemented") +} +func (*UnimplementedServerServiceServer) InitServerWeb(context.Context, *InitServerWebRequest) (*InitServerWebResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitServerWeb not implemented") } func RegisterServerServiceServer(s *grpc.Server, srv ServerServiceServer) { @@ -3134,20 +3286,38 @@ func _ServerService_FindEnabledServerType_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } -func _ServerService_FindServerReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindServerReverseProxyRequest) +func _ServerService_FindServerReverseProxyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindServerReverseProxyConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServerServiceServer).FindServerReverseProxy(ctx, in) + return srv.(ServerServiceServer).FindServerReverseProxyConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.ServerService/FindServerReverseProxy", + FullMethod: "/pb.ServerService/FindServerReverseProxyConfig", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServerServiceServer).FindServerReverseProxy(ctx, req.(*FindServerReverseProxyRequest)) + return srv.(ServerServiceServer).FindServerReverseProxyConfig(ctx, req.(*FindServerReverseProxyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_InitServerWeb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InitServerWebRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).InitServerWeb(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/InitServerWeb", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).InitServerWeb(ctx, req.(*InitServerWebRequest)) } return interceptor(ctx, in, info, handler) } @@ -3221,8 +3391,12 @@ var _ServerService_serviceDesc = grpc.ServiceDesc{ Handler: _ServerService_FindEnabledServerType_Handler, }, { - MethodName: "findServerReverseProxy", - Handler: _ServerService_FindServerReverseProxy_Handler, + MethodName: "findServerReverseProxyConfig", + Handler: _ServerService_FindServerReverseProxyConfig_Handler, + }, + { + MethodName: "initServerWeb", + Handler: _ServerService_InitServerWeb_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/rpc/protos/model_http_gzip.proto b/pkg/rpc/protos/model_http_gzip.proto new file mode 100644 index 0000000..5a5d9cc --- /dev/null +++ b/pkg/rpc/protos/model_http_gzip.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "model_size_capacity.proto"; + +message HTTPGzip { + int64 id = 1; + bool isOn = 2; + int32 level = 3; + SizeCapacity minLength = 4; + SizeCapacity maxLength = 5; +} \ No newline at end of file diff --git a/pkg/rpc/protos/model_http_web.proto b/pkg/rpc/protos/model_http_web.proto index 8567f1b..dfc1319 100644 --- a/pkg/rpc/protos/model_http_web.proto +++ b/pkg/rpc/protos/model_http_web.proto @@ -5,5 +5,7 @@ package pb; message HTTPWeb { int64 id = 1; - string root = 2; + bool isOn = 2; + string root = 3; + int64 gzipId = 4; } \ No newline at end of file diff --git a/pkg/rpc/protos/model_size_capacity.proto b/pkg/rpc/protos/model_size_capacity.proto new file mode 100644 index 0000000..343ca25 --- /dev/null +++ b/pkg/rpc/protos/model_size_capacity.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message SizeCapacity { + int64 count = 1; + string unit = 2; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_http_gzip.proto b/pkg/rpc/protos/service_http_gzip.proto new file mode 100644 index 0000000..a57d05c --- /dev/null +++ b/pkg/rpc/protos/service_http_gzip.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "model_size_capacity.proto"; + +service HTTPGzipService { + // 创建Gzip配置 + rpc createHTTPGzip (CreateHTTPGzipRequest) returns (CreateHTTPGzipResponse); + + // 查找Gzip配置 + rpc findEnabledHTTPGzipConfig (FindEnabledGzipConfigRequest) returns (FindEnabledGzipConfigResponse); + + // 修改Gzip配置 + rpc updateHTTPGzip (UpdateHTTPGzipRequest) returns (UpdateHTTPGzipResponse); +} + +// 创建Gzip配置 +message CreateHTTPGzipRequest { + int32 level = 1; + SizeCapacity minLength = 2; + SizeCapacity maxLength = 3; +} + +message CreateHTTPGzipResponse { + int64 gzipId = 1; +} + +// 查找Gzip配置 +message FindEnabledGzipConfigRequest { + int64 gzipId = 1; +} + +message FindEnabledGzipConfigResponse { + bytes config = 1; +} + +// 修改Gzip配置 +message UpdateHTTPGzipRequest { + int64 gzipId = 1; + int32 level = 2; + SizeCapacity minLength = 3; + SizeCapacity maxLength = 4; +} + +message UpdateHTTPGzipResponse { + +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_http_web.proto b/pkg/rpc/protos/service_http_web.proto index 9c128ed..32c10d1 100644 --- a/pkg/rpc/protos/service_http_web.proto +++ b/pkg/rpc/protos/service_http_web.proto @@ -12,8 +12,11 @@ service HTTPWebService { // 查找Web配置 rpc findEnabledHTTPWeb (FindEnabledHTTPWebRequest) returns (FindEnabledHTTPWebResponse); - // 更新Web配置 + // 更改Web配置 rpc updateHTTPWeb (UpdateHTTPWebRequest) returns (UpdateHTTPWebResponse); + + // 更改Gzip配置 + rpc updateHTTPWebGzip (UpdateHTTPWebGzipRequest) returns (UpdateHTTPWebGzipResponse); } // 创建Web配置 @@ -34,7 +37,7 @@ message FindEnabledHTTPWebResponse { HTTPWeb web = 1; } -// 更新Web配置 +// 更改Web配置 message UpdateHTTPWebRequest { int64 webId = 1; string root = 2; @@ -42,4 +45,14 @@ message UpdateHTTPWebRequest { message UpdateHTTPWebResponse { +} + +// 更改Gzip配置 +message UpdateHTTPWebGzipRequest { + int64 webId = 1; + int64 gzipId = 2; +} + +message UpdateHTTPWebGzipResponse { + } \ No newline at end of file diff --git a/pkg/rpc/protos/service_reverse_proxy.proto b/pkg/rpc/protos/service_reverse_proxy.proto index 2316544..499a232 100644 --- a/pkg/rpc/protos/service_reverse_proxy.proto +++ b/pkg/rpc/protos/service_reverse_proxy.proto @@ -23,6 +23,9 @@ service ReverseProxyService { // 修改备用源站信息 rpc updateReverseProxyBackupOrigins (UpdateReverseProxyBackupOriginsRequest) returns (UpdateReverseProxyBackupOriginsResponse); + + // 修改是否启用 + rpc updateReverseProxyIsOn (UpdateReverseProxyIsOnRequest) returns (UpdateReverseProxyIsOnResponse); } // 创建反向代理 @@ -82,4 +85,14 @@ message UpdateReverseProxyBackupOriginsRequest { message UpdateReverseProxyBackupOriginsResponse { +} + +// 修改是否启用 +message UpdateReverseProxyIsOnRequest { + int64 reverseProxyId = 1; + bool isOn = 2; +} + +message UpdateReverseProxyIsOnResponse { + } \ No newline at end of file diff --git a/pkg/rpc/protos/service_server.proto b/pkg/rpc/protos/service_server.proto index 1a515b5..642f743 100644 --- a/pkg/rpc/protos/service_server.proto +++ b/pkg/rpc/protos/service_server.proto @@ -54,7 +54,10 @@ service ServerService { rpc findEnabledServerType (FindEnabledServerTypeRequest) returns (FindEnabledServerTypeResponse); // 查找反向代理设置 - rpc findServerReverseProxy (FindServerReverseProxyRequest) returns (FindServerReverseProxyResponse); + rpc findServerReverseProxyConfig (FindServerReverseProxyConfigRequest) returns (FindServerReverseProxyConfigResponse); + + // 初始化Web设置 + rpc initServerWeb (InitServerWebRequest) returns (InitServerWebResponse); } // 创建服务 @@ -226,10 +229,19 @@ message FindEnabledServerTypeResponse { } // 查找反向代理设置 -message FindServerReverseProxyRequest { +message FindServerReverseProxyConfigRequest { int64 serverId = 1; } -message FindServerReverseProxyResponse { +message FindServerReverseProxyConfigResponse { bytes config = 1; +} + +// 初始化Web设置 +message InitServerWebRequest { + int64 serverId = 1; +} + +message InitServerWebResponse { + int64 webId = 1; } \ No newline at end of file diff --git a/pkg/serverconfigs/health_check_config.go b/pkg/serverconfigs/health_check_config.go index f95b6db..39e20cd 100644 --- a/pkg/serverconfigs/health_check_config.go +++ b/pkg/serverconfigs/health_check_config.go @@ -7,5 +7,5 @@ type HealthCheckConfig struct { URL string `yaml:"url" json:"url"` // TODO Interval int `yaml:"interval" json:"interval"` // TODO StatusCodes []int `yaml:"statusCodes" json:"statusCodes"` // TODO - Timeout shared.TimeDuration `yaml:"timeout" json:"timeout"` // 超时时间 TODO + Timeout *shared.TimeDuration `yaml:"timeout" json:"timeout"` // 超时时间 TODO } diff --git a/pkg/serverconfigs/cache_policy.go b/pkg/serverconfigs/http_cache_policy.go similarity index 78% rename from pkg/serverconfigs/cache_policy.go rename to pkg/serverconfigs/http_cache_policy.go index ab0c5a7..194435d 100644 --- a/pkg/serverconfigs/cache_policy.go +++ b/pkg/serverconfigs/http_cache_policy.go @@ -15,16 +15,16 @@ import ( var DefaultSkippedResponseCacheControlValues = []string{"private", "no-cache", "no-store"} // 缓存策略配置 -type CachePolicy struct { +type HTTPCachePolicy struct { Id int `yaml:"id" json:"id"` IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启 TODO Name string `yaml:"name" json:"name"` // 名称 Key string `yaml:"key" json:"key"` // 每个缓存的Key规则,里面可以有变量 - Capacity shared.SizeCapacity `yaml:"capacity" json:"capacity"` // 最大内容容量 - Life shared.TimeDuration `yaml:"life" json:"life"` // 时间 + Capacity *shared.SizeCapacity `yaml:"capacity" json:"capacity"` // 最大内容容量 + Life *shared.TimeDuration `yaml:"life" json:"life"` // 时间 Status []int `yaml:"status" json:"status"` // 缓存的状态码列表 - MaxSize shared.SizeCapacity `yaml:"maxSize" json:"maxSize"` // 能够请求的最大尺寸 + MaxSize *shared.SizeCapacity `yaml:"maxSize" json:"maxSize"` // 能够请求的最大尺寸 SkipResponseCacheControlValues []string `yaml:"skipCacheControlValues" json:"skipCacheControlValues"` // 可以跳过的响应的Cache-Control值 SkipResponseSetCookie bool `yaml:"skipSetCookie" json:"skipSetCookie"` // 是否跳过响应的Set-Cookie Header @@ -43,15 +43,15 @@ type CachePolicy struct { } // 获取新对象 -func NewCachePolicy() *CachePolicy { - return &CachePolicy{ +func NewHTTPCachePolicy() *HTTPCachePolicy { + return &HTTPCachePolicy{ SkipResponseCacheControlValues: DefaultSkippedResponseCacheControlValues, SkipResponseSetCookie: true, } } // 从文件中读取缓存策略 -func NewCachePolicyFromFile(file string) *CachePolicy { +func NewCachePolicyFromFile(file string) *HTTPCachePolicy { if len(file) == 0 { return nil } @@ -64,7 +64,7 @@ func NewCachePolicyFromFile(file string) *CachePolicy { _ = reader.Close() }() - p := NewCachePolicy() + p := NewHTTPCachePolicy() err = reader.ReadYAML(p) if err != nil { logs.Error(err) @@ -75,7 +75,7 @@ func NewCachePolicyFromFile(file string) *CachePolicy { } // 校验 -func (this *CachePolicy) Validate() error { +func (this *HTTPCachePolicy) Validate() error { var err error this.maxSize = this.MaxSize.Bytes() this.life = this.Life.Duration() @@ -100,22 +100,22 @@ func (this *CachePolicy) Validate() error { } // 最大数据尺寸 -func (this *CachePolicy) MaxDataSize() int64 { +func (this *HTTPCachePolicy) MaxDataSize() int64 { return this.maxSize } // 容量 -func (this *CachePolicy) CapacitySize() int64 { +func (this *HTTPCachePolicy) CapacitySize() int64 { return this.capacity } // 生命周期 -func (this *CachePolicy) LifeDuration() time.Duration { +func (this *HTTPCachePolicy) LifeDuration() time.Duration { return this.life } // 保存 -func (this *CachePolicy) Save() error { +func (this *HTTPCachePolicy) Save() error { shared.Locker.Lock() defer shared.Locker.Unlock() @@ -132,18 +132,18 @@ func (this *CachePolicy) Save() error { } // 删除 -func (this *CachePolicy) Delete() error { +func (this *HTTPCachePolicy) Delete() error { filename := "cache.policy." + strconv.Itoa(this.Id) + ".conf" return files.NewFile(Tea.ConfigFile(filename)).Delete() } // 是否包含某个Cache-Control值 -func (this *CachePolicy) ContainsCacheControl(value string) bool { +func (this *HTTPCachePolicy) ContainsCacheControl(value string) bool { return lists.ContainsString(this.uppercaseSkipCacheControlValues, strings.ToUpper(value)) } // 检查是否匹配关键词 -func (this *CachePolicy) MatchKeyword(keyword string) (matched bool, name string, tags []string) { +func (this *HTTPCachePolicy) MatchKeyword(keyword string) (matched bool, name string, tags []string) { if configutils.MatchKeyword(this.Name, keyword) || configutils.MatchKeyword(this.Type, keyword) { matched = true name = this.Name diff --git a/pkg/serverconfigs/http_gzip_config.go b/pkg/serverconfigs/http_gzip_config.go new file mode 100644 index 0000000..a785a17 --- /dev/null +++ b/pkg/serverconfigs/http_gzip_config.go @@ -0,0 +1,79 @@ +package serverconfigs + +import ( + "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" + "regexp" + "strings" +) + +// 默认的文件类型 +var ( + DefaultGzipMimeTypes = []string{"text/html", "application/json"} +) + +// gzip配置 +type HTTPGzipConfig struct { + Id int64 `yaml:"id" json:"id"` // ID + IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用 + Level int8 `yaml:"level" json:"level"` // 1-9 + MinLength *shared.SizeCapacity `yaml:"minLength" json:"minLength"` // 最小压缩对象比如4m, 24k + MaxLength *shared.SizeCapacity `yaml:"minLength" json:"maxLength"` // 最大压缩对象 TODO 需要实现 + MimeTypes []string `yaml:"mimeTypes" json:"mimeTypes"` // 比如text/html, text/* // TODO 需要实现,可能需要用RequestConds替代 + + minLength int64 + mimeTypes []*MimeTypeRule +} + +// 校验 +func (this *HTTPGzipConfig) Init() error { + if this.MinLength != nil { + this.minLength = this.MinLength.Bytes() + } + + if len(this.MimeTypes) == 0 { + this.MimeTypes = DefaultGzipMimeTypes + } + + this.mimeTypes = []*MimeTypeRule{} + for _, mimeType := range this.MimeTypes { + if strings.Contains(mimeType, "*") { + mimeType = regexp.QuoteMeta(mimeType) + mimeType = strings.Replace(mimeType, "\\*", ".*", -1) + reg, err := regexp.Compile("^" + mimeType + "$") + if err != nil { + return err + } + this.mimeTypes = append(this.mimeTypes, &MimeTypeRule{ + Value: mimeType, + Regexp: reg, + }) + } else { + this.mimeTypes = append(this.mimeTypes, &MimeTypeRule{ + Value: mimeType, + Regexp: nil, + }) + } + } + return nil +} + +// 可压缩最小尺寸 +func (this *HTTPGzipConfig) MinBytes() int64 { + return this.minLength +} + +// 检查是否匹配Content-Type +func (this *HTTPGzipConfig) MatchContentType(contentType string) bool { + index := strings.Index(contentType, ";") + if index >= 0 { + contentType = contentType[:index] + } + for _, mimeType := range this.mimeTypes { + if mimeType.Regexp == nil && contentType == mimeType.Value { + return true + } else if mimeType.Regexp != nil && mimeType.Regexp.MatchString(contentType) { + return true + } + } + return false +} diff --git a/pkg/serverconfigs/http_gzip_config_test.go b/pkg/serverconfigs/http_gzip_config_test.go new file mode 100644 index 0000000..4b901cb --- /dev/null +++ b/pkg/serverconfigs/http_gzip_config_test.go @@ -0,0 +1,43 @@ +package serverconfigs + +import ( + "github.com/iwind/TeaGo/assert" + "testing" +) + +func TestGzipConfig_MatchContentType(t *testing.T) { + a := assert.NewAssertion(t) + + { + gzip := &HTTPGzipConfig{} + a.IsNil(gzip.Init()) + a.IsTrue(gzip.MatchContentType("text/html")) + } + + { + gzip := &HTTPGzipConfig{} + a.IsNil(gzip.Init()) + a.IsTrue(gzip.MatchContentType("text/html; charset=utf-8")) + } + + { + gzip := &HTTPGzipConfig{} + gzip.MimeTypes = []string{"text/*"} + a.IsNil(gzip.Init()) + a.IsTrue(gzip.MatchContentType("text/html; charset=utf-8")) + } + + { + gzip := &HTTPGzipConfig{} + gzip.MimeTypes = []string{"text/*"} + a.IsNil(gzip.Init()) + a.IsFalse(gzip.MatchContentType("application/json; charset=utf-8")) + } + + { + gzip := &HTTPGzipConfig{} + gzip.MimeTypes = []string{"text/*", "image/*"} + a.IsNil(gzip.Init()) + a.IsTrue(gzip.MatchContentType("image/jpeg; charset=utf-8")) + } +} diff --git a/pkg/serverconfigs/http_web_config.go b/pkg/serverconfigs/http_web_config.go new file mode 100644 index 0000000..2b4af5e --- /dev/null +++ b/pkg/serverconfigs/http_web_config.go @@ -0,0 +1,11 @@ +package serverconfigs + +type HTTPWebConfig struct { + Id int64 `yaml:"id" json:"id"` // ID + IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用 + Locations []*LocationConfig `yaml:"locations" json:"locations"` // 路径规则 TODO + Gzip *HTTPGzipConfig `yaml:"gzip" json:"gzip"` // Gzip配置 + + // 本地静态资源配置 + Root string `yaml:"root" json:"root"` // 资源根目录 TODO +} diff --git a/pkg/serverconfigs/mime_type_rule.go b/pkg/serverconfigs/mime_type_rule.go new file mode 100644 index 0000000..e99b4b5 --- /dev/null +++ b/pkg/serverconfigs/mime_type_rule.go @@ -0,0 +1,9 @@ +package serverconfigs + +import "regexp" + +// mime type +type MimeTypeRule struct { + Value string + Regexp *regexp.Regexp +} diff --git a/pkg/serverconfigs/origin_server_config.go b/pkg/serverconfigs/origin_server_config.go index 7a4f7da..2c45120 100644 --- a/pkg/serverconfigs/origin_server_config.go +++ b/pkg/serverconfigs/origin_server_config.go @@ -22,13 +22,13 @@ type OriginServerConfig struct { Description string `yaml:"description" json:"description"` // 描述 TODO Code string `yaml:"code" json:"code"` // 代号 TODO - Weight uint `yaml:"weight" json:"weight"` // 权重 TODO - ConnTimeout shared.TimeDuration `yaml:"failTimeout" json:"failTimeout"` // 连接失败超时 TODO - ReadTimeout shared.TimeDuration `yaml:"readTimeout" json:"readTimeout"` // 读取超时时间 TODO - IdleTimeout shared.TimeDuration `yaml:"idleTimeout" json:"idleTimeout"` // 空闲连接超时时间 TODO - MaxFails int `yaml:"maxFails" json:"maxFails"` // 最多失败次数 TODO - MaxConns int `yaml:"maxConns" json:"maxConns"` // 最大并发连接数 TODO - MaxIdleConns int `yaml:"idleConns" json:"idleConns"` // 最大空闲连接数 TODO + Weight uint `yaml:"weight" json:"weight"` // 权重 TODO + ConnTimeout *shared.TimeDuration `yaml:"failTimeout" json:"failTimeout"` // 连接失败超时 TODO + ReadTimeout *shared.TimeDuration `yaml:"readTimeout" json:"readTimeout"` // 读取超时时间 TODO + IdleTimeout *shared.TimeDuration `yaml:"idleTimeout" json:"idleTimeout"` // 空闲连接超时时间 TODO + MaxFails int `yaml:"maxFails" json:"maxFails"` // 最多失败次数 TODO + MaxConns int `yaml:"maxConns" json:"maxConns"` // 最大并发连接数 TODO + MaxIdleConns int `yaml:"idleConns" json:"idleConns"` // 最大空闲连接数 TODO RequestURI string `yaml:"requestURI" json:"requestURI"` // 转发后的请求URI TODO Host string `yaml:"host" json:"host"` // 自定义主机名 TODO diff --git a/pkg/serverconfigs/server_config.go b/pkg/serverconfigs/server_config.go index f1aba70..f41efb0 100644 --- a/pkg/serverconfigs/server_config.go +++ b/pkg/serverconfigs/server_config.go @@ -25,7 +25,7 @@ type ServerConfig struct { UDP *UDPProtocolConfig `yaml:"udp" json:"udp"` // UDP配置 // Web配置 - Web *WebConfig `yaml:"web" json:"web"` + Web *HTTPWebConfig `yaml:"web" json:"web"` // 反向代理配置 ReverseProxy *ReverseProxyConfig `yaml:"reverseProxy" json:"reverseProxy"` diff --git a/pkg/serverconfigs/shared/size_capacity.go b/pkg/serverconfigs/shared/size_capacity.go index be2bc02..eb42dd0 100644 --- a/pkg/serverconfigs/shared/size_capacity.go +++ b/pkg/serverconfigs/shared/size_capacity.go @@ -1,5 +1,7 @@ package shared +import "encoding/json" + type SizeCapacityUnit = string const ( @@ -28,3 +30,7 @@ func (this *SizeCapacity) Bytes() int64 { return this.Count } } + +func (this *SizeCapacity) AsJSON() ([]byte, error) { + return json.Marshal(this) +} diff --git a/pkg/serverconfigs/web_config.go b/pkg/serverconfigs/web_config.go deleted file mode 100644 index 5daec68..0000000 --- a/pkg/serverconfigs/web_config.go +++ /dev/null @@ -1,10 +0,0 @@ -package serverconfigs - -type WebConfig struct { - IsOn bool `yaml:"isOn" json:"isOn"` - - Locations []*LocationConfig `yaml:"locations" json:"locations"` // 路径规则 TODO - - // 本地静态资源配置 - Root string `yaml:"root" json:"root"` // 资源根目录 TODO -}