diff --git a/pkg/nodeconfigs/node_config.go b/pkg/nodeconfigs/node_config.go index fe7a56a..85464b6 100644 --- a/pkg/nodeconfigs/node_config.go +++ b/pkg/nodeconfigs/node_config.go @@ -78,6 +78,7 @@ func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerGroup { } func (this *NodeConfig) Init() error { + // servers for _, server := range this.Servers { err := server.Init() if err != nil { @@ -85,6 +86,14 @@ func (this *NodeConfig) Init() error { } } + // global config + if this.GlobalConfig != nil { + err := this.GlobalConfig.Init() + if err != nil { + return err + } + } + return nil } diff --git a/pkg/rpc/pb/service_http_cache_policy.pb.go b/pkg/rpc/pb/service_http_cache_policy.pb.go index 70d74f9..67f9d83 100644 --- a/pkg/rpc/pb/service_http_cache_policy.pb.go +++ b/pkg/rpc/pb/service_http_cache_policy.pb.go @@ -115,6 +115,601 @@ func (x *FindAllEnabledHTTPCachePoliciesResponse) GetCachePolicies() []*HTTPCach return nil } +// 创建缓存策略 +type CreateHTTPCachePolicyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsOn bool `protobuf:"varint,1,opt,name=isOn,proto3" json:"isOn,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + CapacityJSON []byte `protobuf:"bytes,4,opt,name=capacityJSON,proto3" json:"capacityJSON,omitempty"` + MaxKeys int64 `protobuf:"varint,5,opt,name=maxKeys,proto3" json:"maxKeys,omitempty"` + MaxSizeJSON []byte `protobuf:"bytes,6,opt,name=maxSizeJSON,proto3" json:"maxSizeJSON,omitempty"` + Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` + OptionsJSON []byte `protobuf:"bytes,8,opt,name=optionsJSON,proto3" json:"optionsJSON,omitempty"` +} + +func (x *CreateHTTPCachePolicyRequest) Reset() { + *x = CreateHTTPCachePolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHTTPCachePolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHTTPCachePolicyRequest) ProtoMessage() {} + +func (x *CreateHTTPCachePolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_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 CreateHTTPCachePolicyRequest.ProtoReflect.Descriptor instead. +func (*CreateHTTPCachePolicyRequest) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateHTTPCachePolicyRequest) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *CreateHTTPCachePolicyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateHTTPCachePolicyRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateHTTPCachePolicyRequest) GetCapacityJSON() []byte { + if x != nil { + return x.CapacityJSON + } + return nil +} + +func (x *CreateHTTPCachePolicyRequest) GetMaxKeys() int64 { + if x != nil { + return x.MaxKeys + } + return 0 +} + +func (x *CreateHTTPCachePolicyRequest) GetMaxSizeJSON() []byte { + if x != nil { + return x.MaxSizeJSON + } + return nil +} + +func (x *CreateHTTPCachePolicyRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *CreateHTTPCachePolicyRequest) GetOptionsJSON() []byte { + if x != nil { + return x.OptionsJSON + } + return nil +} + +type CreateHTTPCachePolicyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyId int64 `protobuf:"varint,1,opt,name=cachePolicyId,proto3" json:"cachePolicyId,omitempty"` +} + +func (x *CreateHTTPCachePolicyResponse) Reset() { + *x = CreateHTTPCachePolicyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHTTPCachePolicyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHTTPCachePolicyResponse) ProtoMessage() {} + +func (x *CreateHTTPCachePolicyResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_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 CreateHTTPCachePolicyResponse.ProtoReflect.Descriptor instead. +func (*CreateHTTPCachePolicyResponse) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateHTTPCachePolicyResponse) GetCachePolicyId() int64 { + if x != nil { + return x.CachePolicyId + } + return 0 +} + +// 修改缓存策略 +type UpdateHTTPCachePolicyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyId int64 `protobuf:"varint,1,opt,name=cachePolicyId,proto3" json:"cachePolicyId,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + CapacityJSON []byte `protobuf:"bytes,5,opt,name=capacityJSON,proto3" json:"capacityJSON,omitempty"` + MaxKeys int64 `protobuf:"varint,6,opt,name=maxKeys,proto3" json:"maxKeys,omitempty"` + MaxSizeJSON []byte `protobuf:"bytes,7,opt,name=maxSizeJSON,proto3" json:"maxSizeJSON,omitempty"` + Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"` + OptionsJSON []byte `protobuf:"bytes,9,opt,name=optionsJSON,proto3" json:"optionsJSON,omitempty"` +} + +func (x *UpdateHTTPCachePolicyRequest) Reset() { + *x = UpdateHTTPCachePolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPCachePolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPCachePolicyRequest) ProtoMessage() {} + +func (x *UpdateHTTPCachePolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_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 UpdateHTTPCachePolicyRequest.ProtoReflect.Descriptor instead. +func (*UpdateHTTPCachePolicyRequest) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateHTTPCachePolicyRequest) GetCachePolicyId() int64 { + if x != nil { + return x.CachePolicyId + } + return 0 +} + +func (x *UpdateHTTPCachePolicyRequest) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *UpdateHTTPCachePolicyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateHTTPCachePolicyRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdateHTTPCachePolicyRequest) GetCapacityJSON() []byte { + if x != nil { + return x.CapacityJSON + } + return nil +} + +func (x *UpdateHTTPCachePolicyRequest) GetMaxKeys() int64 { + if x != nil { + return x.MaxKeys + } + return 0 +} + +func (x *UpdateHTTPCachePolicyRequest) GetMaxSizeJSON() []byte { + if x != nil { + return x.MaxSizeJSON + } + return nil +} + +func (x *UpdateHTTPCachePolicyRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *UpdateHTTPCachePolicyRequest) GetOptionsJSON() []byte { + if x != nil { + return x.OptionsJSON + } + return nil +} + +// 删除缓存策略 +type DeleteHTTPCachePolicyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyId int64 `protobuf:"varint,1,opt,name=cachePolicyId,proto3" json:"cachePolicyId,omitempty"` +} + +func (x *DeleteHTTPCachePolicyRequest) Reset() { + *x = DeleteHTTPCachePolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHTTPCachePolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHTTPCachePolicyRequest) ProtoMessage() {} + +func (x *DeleteHTTPCachePolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_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 DeleteHTTPCachePolicyRequest.ProtoReflect.Descriptor instead. +func (*DeleteHTTPCachePolicyRequest) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteHTTPCachePolicyRequest) GetCachePolicyId() int64 { + if x != nil { + return x.CachePolicyId + } + return 0 +} + +// 计算缓存策略数量 +type CountAllEnabledHTTPCachePoliciesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CountAllEnabledHTTPCachePoliciesRequest) Reset() { + *x = CountAllEnabledHTTPCachePoliciesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledHTTPCachePoliciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledHTTPCachePoliciesRequest) ProtoMessage() {} + +func (x *CountAllEnabledHTTPCachePoliciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_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 CountAllEnabledHTTPCachePoliciesRequest.ProtoReflect.Descriptor instead. +func (*CountAllEnabledHTTPCachePoliciesRequest) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{6} +} + +type CountAllEnabledHTTPCachePoliciesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *CountAllEnabledHTTPCachePoliciesResponse) Reset() { + *x = CountAllEnabledHTTPCachePoliciesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledHTTPCachePoliciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledHTTPCachePoliciesResponse) ProtoMessage() {} + +func (x *CountAllEnabledHTTPCachePoliciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_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 CountAllEnabledHTTPCachePoliciesResponse.ProtoReflect.Descriptor instead. +func (*CountAllEnabledHTTPCachePoliciesResponse) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{7} +} + +func (x *CountAllEnabledHTTPCachePoliciesResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// 列出单页的缓存策略 +type ListEnabledHTTPCachePoliciesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ListEnabledHTTPCachePoliciesRequest) Reset() { + *x = ListEnabledHTTPCachePoliciesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledHTTPCachePoliciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledHTTPCachePoliciesRequest) ProtoMessage() {} + +func (x *ListEnabledHTTPCachePoliciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_proto_msgTypes[8] + 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 ListEnabledHTTPCachePoliciesRequest.ProtoReflect.Descriptor instead. +func (*ListEnabledHTTPCachePoliciesRequest) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{8} +} + +func (x *ListEnabledHTTPCachePoliciesRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListEnabledHTTPCachePoliciesRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ListEnabledHTTPCachePoliciesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePoliciesJSON []byte `protobuf:"bytes,1,opt,name=cachePoliciesJSON,proto3" json:"cachePoliciesJSON,omitempty"` +} + +func (x *ListEnabledHTTPCachePoliciesResponse) Reset() { + *x = ListEnabledHTTPCachePoliciesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledHTTPCachePoliciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledHTTPCachePoliciesResponse) ProtoMessage() {} + +func (x *ListEnabledHTTPCachePoliciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_proto_msgTypes[9] + 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 ListEnabledHTTPCachePoliciesResponse.ProtoReflect.Descriptor instead. +func (*ListEnabledHTTPCachePoliciesResponse) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{9} +} + +func (x *ListEnabledHTTPCachePoliciesResponse) GetCachePoliciesJSON() []byte { + if x != nil { + return x.CachePoliciesJSON + } + return nil +} + +// 查找单个缓存策略配置 +type FindEnabledHTTPCachePolicyConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyId int64 `protobuf:"varint,1,opt,name=cachePolicyId,proto3" json:"cachePolicyId,omitempty"` +} + +func (x *FindEnabledHTTPCachePolicyConfigRequest) Reset() { + *x = FindEnabledHTTPCachePolicyConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledHTTPCachePolicyConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledHTTPCachePolicyConfigRequest) ProtoMessage() {} + +func (x *FindEnabledHTTPCachePolicyConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_proto_msgTypes[10] + 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 FindEnabledHTTPCachePolicyConfigRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledHTTPCachePolicyConfigRequest) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{10} +} + +func (x *FindEnabledHTTPCachePolicyConfigRequest) GetCachePolicyId() int64 { + if x != nil { + return x.CachePolicyId + } + return 0 +} + +type FindEnabledHTTPCachePolicyConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyJSON []byte `protobuf:"bytes,1,opt,name=cachePolicyJSON,proto3" json:"cachePolicyJSON,omitempty"` +} + +func (x *FindEnabledHTTPCachePolicyConfigResponse) Reset() { + *x = FindEnabledHTTPCachePolicyConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_cache_policy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledHTTPCachePolicyConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledHTTPCachePolicyConfigResponse) ProtoMessage() {} + +func (x *FindEnabledHTTPCachePolicyConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_cache_policy_proto_msgTypes[11] + 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 FindEnabledHTTPCachePolicyConfigResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledHTTPCachePolicyConfigResponse) Descriptor() ([]byte, []int) { + return file_service_http_cache_policy_proto_rawDescGZIP(), []int{11} +} + +func (x *FindEnabledHTTPCachePolicyConfigResponse) GetCachePolicyJSON() []byte { + if x != nil { + return x.CachePolicyJSON + } + return nil +} + var File_service_http_cache_policy_proto protoreflect.FileDescriptor var file_service_http_cache_policy_proto_rawDesc = []byte{ @@ -122,26 +717,138 @@ var file_service_http_cache_policy_proto_rawDesc = []byte{ 0x61, 0x63, 0x68, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x26, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, - 0x0a, 0x27, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x26, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x64, 0x0a, 0x27, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, + 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0xfe, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x4a, + 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x63, + 0x69, 0x74, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x4b, 0x65, + 0x79, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4b, 0x65, 0x79, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x4a, 0x53, 0x4f, 0x4e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x4a, + 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x45, 0x0a, 0x1d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x22, 0xa4, 0x02, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 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, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x4a, 0x53, 0x4f, + 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, + 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x4b, 0x65, 0x79, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x4a, 0x53, 0x4f, + 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x44, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x29, 0x0a, + 0x27, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x63, 0x61, 0x63, - 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x32, 0x94, 0x01, 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x7a, 0x0a, 0x1f, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, - 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x28, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x23, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x54, 0x0a, + 0x24, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x11, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x4a, + 0x53, 0x4f, 0x4e, 0x22, 0x4f, 0x0a, 0x27, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, + 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x28, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, + 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0x85, 0x06, 0x0a, 0x16, 0x48, + 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x1f, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, + 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, + 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4f, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x4f, 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x50, 0x43, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x7d, 0x0a, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x71, 0x0a, 0x1c, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, + 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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 ( @@ -156,21 +863,45 @@ func file_service_http_cache_policy_proto_rawDescGZIP() []byte { return file_service_http_cache_policy_proto_rawDescData } -var file_service_http_cache_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_service_http_cache_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_service_http_cache_policy_proto_goTypes = []interface{}{ - (*FindAllEnabledHTTPCachePoliciesRequest)(nil), // 0: pb.FindAllEnabledHTTPCachePoliciesRequest - (*FindAllEnabledHTTPCachePoliciesResponse)(nil), // 1: pb.FindAllEnabledHTTPCachePoliciesResponse - (*HTTPCachePolicy)(nil), // 2: pb.HTTPCachePolicy + (*FindAllEnabledHTTPCachePoliciesRequest)(nil), // 0: pb.FindAllEnabledHTTPCachePoliciesRequest + (*FindAllEnabledHTTPCachePoliciesResponse)(nil), // 1: pb.FindAllEnabledHTTPCachePoliciesResponse + (*CreateHTTPCachePolicyRequest)(nil), // 2: pb.CreateHTTPCachePolicyRequest + (*CreateHTTPCachePolicyResponse)(nil), // 3: pb.CreateHTTPCachePolicyResponse + (*UpdateHTTPCachePolicyRequest)(nil), // 4: pb.UpdateHTTPCachePolicyRequest + (*DeleteHTTPCachePolicyRequest)(nil), // 5: pb.DeleteHTTPCachePolicyRequest + (*CountAllEnabledHTTPCachePoliciesRequest)(nil), // 6: pb.CountAllEnabledHTTPCachePoliciesRequest + (*CountAllEnabledHTTPCachePoliciesResponse)(nil), // 7: pb.CountAllEnabledHTTPCachePoliciesResponse + (*ListEnabledHTTPCachePoliciesRequest)(nil), // 8: pb.ListEnabledHTTPCachePoliciesRequest + (*ListEnabledHTTPCachePoliciesResponse)(nil), // 9: pb.ListEnabledHTTPCachePoliciesResponse + (*FindEnabledHTTPCachePolicyConfigRequest)(nil), // 10: pb.FindEnabledHTTPCachePolicyConfigRequest + (*FindEnabledHTTPCachePolicyConfigResponse)(nil), // 11: pb.FindEnabledHTTPCachePolicyConfigResponse + (*HTTPCachePolicy)(nil), // 12: pb.HTTPCachePolicy + (*RPCUpdateSuccess)(nil), // 13: pb.RPCUpdateSuccess + (*RPCDeleteSuccess)(nil), // 14: pb.RPCDeleteSuccess } var file_service_http_cache_policy_proto_depIdxs = []int32{ - 2, // 0: pb.FindAllEnabledHTTPCachePoliciesResponse.cachePolicies:type_name -> pb.HTTPCachePolicy - 0, // 1: pb.HTTPCachePolicyService.findAllEnabledHTTPCachePolicies:input_type -> pb.FindAllEnabledHTTPCachePoliciesRequest - 1, // 2: pb.HTTPCachePolicyService.findAllEnabledHTTPCachePolicies:output_type -> pb.FindAllEnabledHTTPCachePoliciesResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] 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 + 12, // 0: pb.FindAllEnabledHTTPCachePoliciesResponse.cachePolicies:type_name -> pb.HTTPCachePolicy + 0, // 1: pb.HTTPCachePolicyService.findAllEnabledHTTPCachePolicies:input_type -> pb.FindAllEnabledHTTPCachePoliciesRequest + 2, // 2: pb.HTTPCachePolicyService.createHTTPCachePolicy:input_type -> pb.CreateHTTPCachePolicyRequest + 4, // 3: pb.HTTPCachePolicyService.updateHTTPCachePolicy:input_type -> pb.UpdateHTTPCachePolicyRequest + 5, // 4: pb.HTTPCachePolicyService.deleteHTTPCachePolicy:input_type -> pb.DeleteHTTPCachePolicyRequest + 6, // 5: pb.HTTPCachePolicyService.countAllEnabledHTTPCachePolicies:input_type -> pb.CountAllEnabledHTTPCachePoliciesRequest + 8, // 6: pb.HTTPCachePolicyService.listEnabledHTTPCachePolicies:input_type -> pb.ListEnabledHTTPCachePoliciesRequest + 10, // 7: pb.HTTPCachePolicyService.findEnabledHTTPCachePolicyConfig:input_type -> pb.FindEnabledHTTPCachePolicyConfigRequest + 1, // 8: pb.HTTPCachePolicyService.findAllEnabledHTTPCachePolicies:output_type -> pb.FindAllEnabledHTTPCachePoliciesResponse + 3, // 9: pb.HTTPCachePolicyService.createHTTPCachePolicy:output_type -> pb.CreateHTTPCachePolicyResponse + 13, // 10: pb.HTTPCachePolicyService.updateHTTPCachePolicy:output_type -> pb.RPCUpdateSuccess + 14, // 11: pb.HTTPCachePolicyService.deleteHTTPCachePolicy:output_type -> pb.RPCDeleteSuccess + 7, // 12: pb.HTTPCachePolicyService.countAllEnabledHTTPCachePolicies:output_type -> pb.CountAllEnabledHTTPCachePoliciesResponse + 9, // 13: pb.HTTPCachePolicyService.listEnabledHTTPCachePolicies:output_type -> pb.ListEnabledHTTPCachePoliciesResponse + 11, // 14: pb.HTTPCachePolicyService.findEnabledHTTPCachePolicyConfig:output_type -> pb.FindEnabledHTTPCachePolicyConfigResponse + 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 } func init() { file_service_http_cache_policy_proto_init() } @@ -179,6 +910,7 @@ func file_service_http_cache_policy_proto_init() { return } file_model_http_cache_policy_proto_init() + file_rpc_messages_proto_init() if !protoimpl.UnsafeEnabled { file_service_http_cache_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindAllEnabledHTTPCachePoliciesRequest); i { @@ -204,6 +936,126 @@ func file_service_http_cache_policy_proto_init() { return nil } } + file_service_http_cache_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHTTPCachePolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHTTPCachePolicyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPCachePolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHTTPCachePolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledHTTPCachePoliciesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledHTTPCachePoliciesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledHTTPCachePoliciesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledHTTPCachePoliciesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledHTTPCachePolicyConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_cache_policy_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledHTTPCachePolicyConfigResponse); 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{ @@ -211,7 +1063,7 @@ func file_service_http_cache_policy_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_http_cache_policy_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, @@ -239,6 +1091,18 @@ const _ = grpc.SupportPackageIsVersion6 type HTTPCachePolicyServiceClient interface { // 获取所有可用策略 FindAllEnabledHTTPCachePolicies(ctx context.Context, in *FindAllEnabledHTTPCachePoliciesRequest, opts ...grpc.CallOption) (*FindAllEnabledHTTPCachePoliciesResponse, error) + // 创建缓存策略 + CreateHTTPCachePolicy(ctx context.Context, in *CreateHTTPCachePolicyRequest, opts ...grpc.CallOption) (*CreateHTTPCachePolicyResponse, error) + // 修改缓存策略 + UpdateHTTPCachePolicy(ctx context.Context, in *UpdateHTTPCachePolicyRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) + // 删除缓存策略 + DeleteHTTPCachePolicy(ctx context.Context, in *DeleteHTTPCachePolicyRequest, opts ...grpc.CallOption) (*RPCDeleteSuccess, error) + // 计算缓存策略数量 + CountAllEnabledHTTPCachePolicies(ctx context.Context, in *CountAllEnabledHTTPCachePoliciesRequest, opts ...grpc.CallOption) (*CountAllEnabledHTTPCachePoliciesResponse, error) + // 列出单页的缓存策略 + ListEnabledHTTPCachePolicies(ctx context.Context, in *ListEnabledHTTPCachePoliciesRequest, opts ...grpc.CallOption) (*ListEnabledHTTPCachePoliciesResponse, error) + // 查找单个缓存策略配置 + FindEnabledHTTPCachePolicyConfig(ctx context.Context, in *FindEnabledHTTPCachePolicyConfigRequest, opts ...grpc.CallOption) (*FindEnabledHTTPCachePolicyConfigResponse, error) } type hTTPCachePolicyServiceClient struct { @@ -258,10 +1122,76 @@ func (c *hTTPCachePolicyServiceClient) FindAllEnabledHTTPCachePolicies(ctx conte return out, nil } +func (c *hTTPCachePolicyServiceClient) CreateHTTPCachePolicy(ctx context.Context, in *CreateHTTPCachePolicyRequest, opts ...grpc.CallOption) (*CreateHTTPCachePolicyResponse, error) { + out := new(CreateHTTPCachePolicyResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPCachePolicyService/createHTTPCachePolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPCachePolicyServiceClient) UpdateHTTPCachePolicy(ctx context.Context, in *UpdateHTTPCachePolicyRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) { + out := new(RPCUpdateSuccess) + err := c.cc.Invoke(ctx, "/pb.HTTPCachePolicyService/updateHTTPCachePolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPCachePolicyServiceClient) DeleteHTTPCachePolicy(ctx context.Context, in *DeleteHTTPCachePolicyRequest, opts ...grpc.CallOption) (*RPCDeleteSuccess, error) { + out := new(RPCDeleteSuccess) + err := c.cc.Invoke(ctx, "/pb.HTTPCachePolicyService/deleteHTTPCachePolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPCachePolicyServiceClient) CountAllEnabledHTTPCachePolicies(ctx context.Context, in *CountAllEnabledHTTPCachePoliciesRequest, opts ...grpc.CallOption) (*CountAllEnabledHTTPCachePoliciesResponse, error) { + out := new(CountAllEnabledHTTPCachePoliciesResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPCachePolicyService/countAllEnabledHTTPCachePolicies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPCachePolicyServiceClient) ListEnabledHTTPCachePolicies(ctx context.Context, in *ListEnabledHTTPCachePoliciesRequest, opts ...grpc.CallOption) (*ListEnabledHTTPCachePoliciesResponse, error) { + out := new(ListEnabledHTTPCachePoliciesResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPCachePolicyService/listEnabledHTTPCachePolicies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPCachePolicyServiceClient) FindEnabledHTTPCachePolicyConfig(ctx context.Context, in *FindEnabledHTTPCachePolicyConfigRequest, opts ...grpc.CallOption) (*FindEnabledHTTPCachePolicyConfigResponse, error) { + out := new(FindEnabledHTTPCachePolicyConfigResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPCachePolicyService/findEnabledHTTPCachePolicyConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // HTTPCachePolicyServiceServer is the server API for HTTPCachePolicyService service. type HTTPCachePolicyServiceServer interface { // 获取所有可用策略 FindAllEnabledHTTPCachePolicies(context.Context, *FindAllEnabledHTTPCachePoliciesRequest) (*FindAllEnabledHTTPCachePoliciesResponse, error) + // 创建缓存策略 + CreateHTTPCachePolicy(context.Context, *CreateHTTPCachePolicyRequest) (*CreateHTTPCachePolicyResponse, error) + // 修改缓存策略 + UpdateHTTPCachePolicy(context.Context, *UpdateHTTPCachePolicyRequest) (*RPCUpdateSuccess, error) + // 删除缓存策略 + DeleteHTTPCachePolicy(context.Context, *DeleteHTTPCachePolicyRequest) (*RPCDeleteSuccess, error) + // 计算缓存策略数量 + CountAllEnabledHTTPCachePolicies(context.Context, *CountAllEnabledHTTPCachePoliciesRequest) (*CountAllEnabledHTTPCachePoliciesResponse, error) + // 列出单页的缓存策略 + ListEnabledHTTPCachePolicies(context.Context, *ListEnabledHTTPCachePoliciesRequest) (*ListEnabledHTTPCachePoliciesResponse, error) + // 查找单个缓存策略配置 + FindEnabledHTTPCachePolicyConfig(context.Context, *FindEnabledHTTPCachePolicyConfigRequest) (*FindEnabledHTTPCachePolicyConfigResponse, error) } // UnimplementedHTTPCachePolicyServiceServer can be embedded to have forward compatible implementations. @@ -271,6 +1201,24 @@ type UnimplementedHTTPCachePolicyServiceServer struct { func (*UnimplementedHTTPCachePolicyServiceServer) FindAllEnabledHTTPCachePolicies(context.Context, *FindAllEnabledHTTPCachePoliciesRequest) (*FindAllEnabledHTTPCachePoliciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledHTTPCachePolicies not implemented") } +func (*UnimplementedHTTPCachePolicyServiceServer) CreateHTTPCachePolicy(context.Context, *CreateHTTPCachePolicyRequest) (*CreateHTTPCachePolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPCachePolicy not implemented") +} +func (*UnimplementedHTTPCachePolicyServiceServer) UpdateHTTPCachePolicy(context.Context, *UpdateHTTPCachePolicyRequest) (*RPCUpdateSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPCachePolicy not implemented") +} +func (*UnimplementedHTTPCachePolicyServiceServer) DeleteHTTPCachePolicy(context.Context, *DeleteHTTPCachePolicyRequest) (*RPCDeleteSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteHTTPCachePolicy not implemented") +} +func (*UnimplementedHTTPCachePolicyServiceServer) CountAllEnabledHTTPCachePolicies(context.Context, *CountAllEnabledHTTPCachePoliciesRequest) (*CountAllEnabledHTTPCachePoliciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledHTTPCachePolicies not implemented") +} +func (*UnimplementedHTTPCachePolicyServiceServer) ListEnabledHTTPCachePolicies(context.Context, *ListEnabledHTTPCachePoliciesRequest) (*ListEnabledHTTPCachePoliciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEnabledHTTPCachePolicies not implemented") +} +func (*UnimplementedHTTPCachePolicyServiceServer) FindEnabledHTTPCachePolicyConfig(context.Context, *FindEnabledHTTPCachePolicyConfigRequest) (*FindEnabledHTTPCachePolicyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledHTTPCachePolicyConfig not implemented") +} func RegisterHTTPCachePolicyServiceServer(s *grpc.Server, srv HTTPCachePolicyServiceServer) { s.RegisterService(&_HTTPCachePolicyService_serviceDesc, srv) @@ -294,6 +1242,114 @@ func _HTTPCachePolicyService_FindAllEnabledHTTPCachePolicies_Handler(srv interfa return interceptor(ctx, in, info, handler) } +func _HTTPCachePolicyService_CreateHTTPCachePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateHTTPCachePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPCachePolicyServiceServer).CreateHTTPCachePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPCachePolicyService/CreateHTTPCachePolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPCachePolicyServiceServer).CreateHTTPCachePolicy(ctx, req.(*CreateHTTPCachePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPCachePolicyService_UpdateHTTPCachePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHTTPCachePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPCachePolicyServiceServer).UpdateHTTPCachePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPCachePolicyService/UpdateHTTPCachePolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPCachePolicyServiceServer).UpdateHTTPCachePolicy(ctx, req.(*UpdateHTTPCachePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPCachePolicyService_DeleteHTTPCachePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteHTTPCachePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPCachePolicyServiceServer).DeleteHTTPCachePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPCachePolicyService/DeleteHTTPCachePolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPCachePolicyServiceServer).DeleteHTTPCachePolicy(ctx, req.(*DeleteHTTPCachePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPCachePolicyService_CountAllEnabledHTTPCachePolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllEnabledHTTPCachePoliciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPCachePolicyServiceServer).CountAllEnabledHTTPCachePolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPCachePolicyService/CountAllEnabledHTTPCachePolicies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPCachePolicyServiceServer).CountAllEnabledHTTPCachePolicies(ctx, req.(*CountAllEnabledHTTPCachePoliciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPCachePolicyService_ListEnabledHTTPCachePolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEnabledHTTPCachePoliciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPCachePolicyServiceServer).ListEnabledHTTPCachePolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPCachePolicyService/ListEnabledHTTPCachePolicies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPCachePolicyServiceServer).ListEnabledHTTPCachePolicies(ctx, req.(*ListEnabledHTTPCachePoliciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPCachePolicyService_FindEnabledHTTPCachePolicyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledHTTPCachePolicyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPCachePolicyServiceServer).FindEnabledHTTPCachePolicyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPCachePolicyService/FindEnabledHTTPCachePolicyConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPCachePolicyServiceServer).FindEnabledHTTPCachePolicyConfig(ctx, req.(*FindEnabledHTTPCachePolicyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _HTTPCachePolicyService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.HTTPCachePolicyService", HandlerType: (*HTTPCachePolicyServiceServer)(nil), @@ -302,6 +1358,30 @@ var _HTTPCachePolicyService_serviceDesc = grpc.ServiceDesc{ MethodName: "findAllEnabledHTTPCachePolicies", Handler: _HTTPCachePolicyService_FindAllEnabledHTTPCachePolicies_Handler, }, + { + MethodName: "createHTTPCachePolicy", + Handler: _HTTPCachePolicyService_CreateHTTPCachePolicy_Handler, + }, + { + MethodName: "updateHTTPCachePolicy", + Handler: _HTTPCachePolicyService_UpdateHTTPCachePolicy_Handler, + }, + { + MethodName: "deleteHTTPCachePolicy", + Handler: _HTTPCachePolicyService_DeleteHTTPCachePolicy_Handler, + }, + { + MethodName: "countAllEnabledHTTPCachePolicies", + Handler: _HTTPCachePolicyService_CountAllEnabledHTTPCachePolicies_Handler, + }, + { + MethodName: "listEnabledHTTPCachePolicies", + Handler: _HTTPCachePolicyService_ListEnabledHTTPCachePolicies_Handler, + }, + { + MethodName: "findEnabledHTTPCachePolicyConfig", + Handler: _HTTPCachePolicyService_FindEnabledHTTPCachePolicyConfig_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_http_cache_policy.proto", diff --git a/pkg/rpc/pb/service_server.pb.go b/pkg/rpc/pb/service_server.pb.go index fee33d4..b70bab9 100644 --- a/pkg/rpc/pb/service_server.pb.go +++ b/pkg/rpc/pb/service_server.pb.go @@ -1493,7 +1493,7 @@ func (x *FindAndInitServerWebConfigResponse) GetWebJSON() []byte { } // 计算使用某个SSL证书的服务数量 -type CountServersWithSSLCertIdRequest struct { +type CountAllEnabledServersWithSSLCertIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1501,8 +1501,8 @@ type CountServersWithSSLCertIdRequest struct { CertId int64 `protobuf:"varint,1,opt,name=certId,proto3" json:"certId,omitempty"` } -func (x *CountServersWithSSLCertIdRequest) Reset() { - *x = CountServersWithSSLCertIdRequest{} +func (x *CountAllEnabledServersWithSSLCertIdRequest) Reset() { + *x = CountAllEnabledServersWithSSLCertIdRequest{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1510,13 +1510,13 @@ func (x *CountServersWithSSLCertIdRequest) Reset() { } } -func (x *CountServersWithSSLCertIdRequest) String() string { +func (x *CountAllEnabledServersWithSSLCertIdRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CountServersWithSSLCertIdRequest) ProtoMessage() {} +func (*CountAllEnabledServersWithSSLCertIdRequest) ProtoMessage() {} -func (x *CountServersWithSSLCertIdRequest) ProtoReflect() protoreflect.Message { +func (x *CountAllEnabledServersWithSSLCertIdRequest) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1528,19 +1528,19 @@ func (x *CountServersWithSSLCertIdRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CountServersWithSSLCertIdRequest.ProtoReflect.Descriptor instead. -func (*CountServersWithSSLCertIdRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CountAllEnabledServersWithSSLCertIdRequest.ProtoReflect.Descriptor instead. +func (*CountAllEnabledServersWithSSLCertIdRequest) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{26} } -func (x *CountServersWithSSLCertIdRequest) GetCertId() int64 { +func (x *CountAllEnabledServersWithSSLCertIdRequest) GetCertId() int64 { if x != nil { return x.CertId } return 0 } -type CountServersWithSSLCertIdResponse struct { +type CountAllEnabledServersWithSSLCertIdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1548,8 +1548,8 @@ type CountServersWithSSLCertIdResponse struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` } -func (x *CountServersWithSSLCertIdResponse) Reset() { - *x = CountServersWithSSLCertIdResponse{} +func (x *CountAllEnabledServersWithSSLCertIdResponse) Reset() { + *x = CountAllEnabledServersWithSSLCertIdResponse{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1557,13 +1557,13 @@ func (x *CountServersWithSSLCertIdResponse) Reset() { } } -func (x *CountServersWithSSLCertIdResponse) String() string { +func (x *CountAllEnabledServersWithSSLCertIdResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CountServersWithSSLCertIdResponse) ProtoMessage() {} +func (*CountAllEnabledServersWithSSLCertIdResponse) ProtoMessage() {} -func (x *CountServersWithSSLCertIdResponse) ProtoReflect() protoreflect.Message { +func (x *CountAllEnabledServersWithSSLCertIdResponse) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1575,12 +1575,12 @@ func (x *CountServersWithSSLCertIdResponse) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use CountServersWithSSLCertIdResponse.ProtoReflect.Descriptor instead. -func (*CountServersWithSSLCertIdResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CountAllEnabledServersWithSSLCertIdResponse.ProtoReflect.Descriptor instead. +func (*CountAllEnabledServersWithSSLCertIdResponse) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{27} } -func (x *CountServersWithSSLCertIdResponse) GetCount() int64 { +func (x *CountAllEnabledServersWithSSLCertIdResponse) GetCount() int64 { if x != nil { return x.Count } @@ -1588,7 +1588,7 @@ func (x *CountServersWithSSLCertIdResponse) GetCount() int64 { } // 查找使用某个SSL证书的所有服务 -type FindAllServersWithSSLCertIdRequest struct { +type FindAllEnabledServersWithSSLCertIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1596,8 +1596,8 @@ type FindAllServersWithSSLCertIdRequest struct { CertId int64 `protobuf:"varint,1,opt,name=certId,proto3" json:"certId,omitempty"` } -func (x *FindAllServersWithSSLCertIdRequest) Reset() { - *x = FindAllServersWithSSLCertIdRequest{} +func (x *FindAllEnabledServersWithSSLCertIdRequest) Reset() { + *x = FindAllEnabledServersWithSSLCertIdRequest{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1605,13 +1605,13 @@ func (x *FindAllServersWithSSLCertIdRequest) Reset() { } } -func (x *FindAllServersWithSSLCertIdRequest) String() string { +func (x *FindAllEnabledServersWithSSLCertIdRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FindAllServersWithSSLCertIdRequest) ProtoMessage() {} +func (*FindAllEnabledServersWithSSLCertIdRequest) ProtoMessage() {} -func (x *FindAllServersWithSSLCertIdRequest) ProtoReflect() protoreflect.Message { +func (x *FindAllEnabledServersWithSSLCertIdRequest) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1623,19 +1623,19 @@ func (x *FindAllServersWithSSLCertIdRequest) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use FindAllServersWithSSLCertIdRequest.ProtoReflect.Descriptor instead. -func (*FindAllServersWithSSLCertIdRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FindAllEnabledServersWithSSLCertIdRequest.ProtoReflect.Descriptor instead. +func (*FindAllEnabledServersWithSSLCertIdRequest) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{28} } -func (x *FindAllServersWithSSLCertIdRequest) GetCertId() int64 { +func (x *FindAllEnabledServersWithSSLCertIdRequest) GetCertId() int64 { if x != nil { return x.CertId } return 0 } -type FindAllServersWithSSLCertIdResponse struct { +type FindAllEnabledServersWithSSLCertIdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1643,8 +1643,8 @@ type FindAllServersWithSSLCertIdResponse struct { Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` } -func (x *FindAllServersWithSSLCertIdResponse) Reset() { - *x = FindAllServersWithSSLCertIdResponse{} +func (x *FindAllEnabledServersWithSSLCertIdResponse) Reset() { + *x = FindAllEnabledServersWithSSLCertIdResponse{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1652,13 +1652,13 @@ func (x *FindAllServersWithSSLCertIdResponse) Reset() { } } -func (x *FindAllServersWithSSLCertIdResponse) String() string { +func (x *FindAllEnabledServersWithSSLCertIdResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FindAllServersWithSSLCertIdResponse) ProtoMessage() {} +func (*FindAllEnabledServersWithSSLCertIdResponse) ProtoMessage() {} -func (x *FindAllServersWithSSLCertIdResponse) ProtoReflect() protoreflect.Message { +func (x *FindAllEnabledServersWithSSLCertIdResponse) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1670,12 +1670,202 @@ func (x *FindAllServersWithSSLCertIdResponse) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FindAllServersWithSSLCertIdResponse.ProtoReflect.Descriptor instead. -func (*FindAllServersWithSSLCertIdResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use FindAllEnabledServersWithSSLCertIdResponse.ProtoReflect.Descriptor instead. +func (*FindAllEnabledServersWithSSLCertIdResponse) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{29} } -func (x *FindAllServersWithSSLCertIdResponse) GetServers() []*Server { +func (x *FindAllEnabledServersWithSSLCertIdResponse) GetServers() []*Server { + if x != nil { + return x.Servers + } + return nil +} + +// 计算使用某个缓存策略的服务数量 +type CountAllEnabledServersWithCachePolicyIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyId int64 `protobuf:"varint,1,opt,name=cachePolicyId,proto3" json:"cachePolicyId,omitempty"` +} + +func (x *CountAllEnabledServersWithCachePolicyIdRequest) Reset() { + *x = CountAllEnabledServersWithCachePolicyIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledServersWithCachePolicyIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledServersWithCachePolicyIdRequest) ProtoMessage() {} + +func (x *CountAllEnabledServersWithCachePolicyIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[30] + 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 CountAllEnabledServersWithCachePolicyIdRequest.ProtoReflect.Descriptor instead. +func (*CountAllEnabledServersWithCachePolicyIdRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{30} +} + +func (x *CountAllEnabledServersWithCachePolicyIdRequest) GetCachePolicyId() int64 { + if x != nil { + return x.CachePolicyId + } + return 0 +} + +type CountAllEnabledServersWithCachePolicyIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *CountAllEnabledServersWithCachePolicyIdResponse) Reset() { + *x = CountAllEnabledServersWithCachePolicyIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledServersWithCachePolicyIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledServersWithCachePolicyIdResponse) ProtoMessage() {} + +func (x *CountAllEnabledServersWithCachePolicyIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[31] + 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 CountAllEnabledServersWithCachePolicyIdResponse.ProtoReflect.Descriptor instead. +func (*CountAllEnabledServersWithCachePolicyIdResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{31} +} + +func (x *CountAllEnabledServersWithCachePolicyIdResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// 查找使用某个缓存策略的所有服务 +type FindAllEnabledServersWithCachePolicyIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CachePolicyId int64 `protobuf:"varint,1,opt,name=cachePolicyId,proto3" json:"cachePolicyId,omitempty"` +} + +func (x *FindAllEnabledServersWithCachePolicyIdRequest) Reset() { + *x = FindAllEnabledServersWithCachePolicyIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledServersWithCachePolicyIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledServersWithCachePolicyIdRequest) ProtoMessage() {} + +func (x *FindAllEnabledServersWithCachePolicyIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[32] + 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 FindAllEnabledServersWithCachePolicyIdRequest.ProtoReflect.Descriptor instead. +func (*FindAllEnabledServersWithCachePolicyIdRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{32} +} + +func (x *FindAllEnabledServersWithCachePolicyIdRequest) GetCachePolicyId() int64 { + if x != nil { + return x.CachePolicyId + } + return 0 +} + +type FindAllEnabledServersWithCachePolicyIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` +} + +func (x *FindAllEnabledServersWithCachePolicyIdResponse) Reset() { + *x = FindAllEnabledServersWithCachePolicyIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledServersWithCachePolicyIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledServersWithCachePolicyIdResponse) ProtoMessage() {} + +func (x *FindAllEnabledServersWithCachePolicyIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[33] + 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 FindAllEnabledServersWithCachePolicyIdResponse.ProtoReflect.Descriptor instead. +func (*FindAllEnabledServersWithCachePolicyIdResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{33} +} + +func (x *FindAllEnabledServersWithCachePolicyIdResponse) GetServers() []*Server { if x != nil { return x.Servers } @@ -1837,130 +2027,175 @@ var file_service_server_proto_rawDesc = []byte{ 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x65, 0x62, - 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x3a, 0x0a, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x65, 0x72, 0x74, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x65, 0x72, 0x74, 0x49, 0x64, - 0x22, 0x39, 0x0a, 0x21, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3c, 0x0a, 0x22, 0x46, - 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, - 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x63, 0x65, 0x72, 0x74, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x23, 0x46, 0x69, 0x6e, - 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, - 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x32, 0xa2, 0x0d, 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, 0x47, 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, 0x14, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x45, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 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, 0x14, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, - 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x45, - 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, - 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x55, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 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, 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, 0x86, 0x01, 0x0a, 0x23, - 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 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, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, - 0x49, 0x6e, 0x69, 0x74, 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, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, - 0x49, 0x6e, 0x69, 0x74, 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, 0x6b, 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, - 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, - 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x68, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x24, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, - 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1b, 0x66, - 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, - 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, + 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x44, 0x0a, 0x2a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x53, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x63, 0x65, 0x72, 0x74, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x2b, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x43, 0x0a, 0x29, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, + 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x65, + 0x72, 0x74, 0x49, 0x64, 0x22, 0x52, 0x0a, 0x2a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, + 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, 0x56, 0x0a, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x22, 0x47, 0x0a, 0x2f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x2d, 0x46, 0x69, 0x6e, + 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x22, 0x56, 0x0a, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x32, 0xfe, 0x0f, 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, 0x47, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x45, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x45, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 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, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x55, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 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, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 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, + 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, 0x86, 0x01, + 0x0a, 0x23, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 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, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, + 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 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, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, + 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 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, 0x6b, 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6e, + 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, + 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2e, 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, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, + 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 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, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, + 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, + 0x22, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, - 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x49, 0x64, 0x12, 0x2d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, + 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x27, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, + 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x32, + 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, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 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, 0x57, 0x69, + 0x74, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x26, 0x66, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x49, 0x64, 0x12, 0x31, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, + 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, + 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, + 0x64, 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 ( @@ -1975,90 +2210,99 @@ func file_service_server_proto_rawDescGZIP() []byte { return file_service_server_proto_rawDescData } -var file_service_server_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_service_server_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_service_server_proto_goTypes = []interface{}{ - (*CreateServerRequest)(nil), // 0: pb.CreateServerRequest - (*CreateServerResponse)(nil), // 1: pb.CreateServerResponse - (*UpdateServerBasicRequest)(nil), // 2: pb.UpdateServerBasicRequest - (*UpdateServerHTTPRequest)(nil), // 3: pb.UpdateServerHTTPRequest - (*UpdateServerHTTPSRequest)(nil), // 4: pb.UpdateServerHTTPSRequest - (*UpdateServerTCPRequest)(nil), // 5: pb.UpdateServerTCPRequest - (*UpdateServerTLSRequest)(nil), // 6: pb.UpdateServerTLSRequest - (*UpdateServerUnixRequest)(nil), // 7: pb.UpdateServerUnixRequest - (*UpdateServerUDPRequest)(nil), // 8: pb.UpdateServerUDPRequest - (*UpdateServerWebRequest)(nil), // 9: pb.UpdateServerWebRequest - (*UpdateServerReverseProxyRequest)(nil), // 10: pb.UpdateServerReverseProxyRequest - (*UpdateServerNamesRequest)(nil), // 11: pb.UpdateServerNamesRequest - (*CountAllEnabledServersRequest)(nil), // 12: pb.CountAllEnabledServersRequest - (*CountAllEnabledServersResponse)(nil), // 13: pb.CountAllEnabledServersResponse - (*ListEnabledServersRequest)(nil), // 14: pb.ListEnabledServersRequest - (*ListEnabledServersResponse)(nil), // 15: pb.ListEnabledServersResponse - (*DisableServerRequest)(nil), // 16: pb.DisableServerRequest - (*DisableServerResponse)(nil), // 17: pb.DisableServerResponse - (*FindEnabledServerRequest)(nil), // 18: pb.FindEnabledServerRequest - (*FindEnabledServerResponse)(nil), // 19: pb.FindEnabledServerResponse - (*FindEnabledServerTypeRequest)(nil), // 20: pb.FindEnabledServerTypeRequest - (*FindEnabledServerTypeResponse)(nil), // 21: pb.FindEnabledServerTypeResponse - (*FindAndInitServerReverseProxyConfigRequest)(nil), // 22: pb.FindAndInitServerReverseProxyConfigRequest - (*FindAndInitServerReverseProxyConfigResponse)(nil), // 23: pb.FindAndInitServerReverseProxyConfigResponse - (*FindAndInitServerWebConfigRequest)(nil), // 24: pb.FindAndInitServerWebConfigRequest - (*FindAndInitServerWebConfigResponse)(nil), // 25: pb.FindAndInitServerWebConfigResponse - (*CountServersWithSSLCertIdRequest)(nil), // 26: pb.CountServersWithSSLCertIdRequest - (*CountServersWithSSLCertIdResponse)(nil), // 27: pb.CountServersWithSSLCertIdResponse - (*FindAllServersWithSSLCertIdRequest)(nil), // 28: pb.FindAllServersWithSSLCertIdRequest - (*FindAllServersWithSSLCertIdResponse)(nil), // 29: pb.FindAllServersWithSSLCertIdResponse - (*Server)(nil), // 30: pb.Server - (*RPCUpdateSuccess)(nil), // 31: pb.RPCUpdateSuccess + (*CreateServerRequest)(nil), // 0: pb.CreateServerRequest + (*CreateServerResponse)(nil), // 1: pb.CreateServerResponse + (*UpdateServerBasicRequest)(nil), // 2: pb.UpdateServerBasicRequest + (*UpdateServerHTTPRequest)(nil), // 3: pb.UpdateServerHTTPRequest + (*UpdateServerHTTPSRequest)(nil), // 4: pb.UpdateServerHTTPSRequest + (*UpdateServerTCPRequest)(nil), // 5: pb.UpdateServerTCPRequest + (*UpdateServerTLSRequest)(nil), // 6: pb.UpdateServerTLSRequest + (*UpdateServerUnixRequest)(nil), // 7: pb.UpdateServerUnixRequest + (*UpdateServerUDPRequest)(nil), // 8: pb.UpdateServerUDPRequest + (*UpdateServerWebRequest)(nil), // 9: pb.UpdateServerWebRequest + (*UpdateServerReverseProxyRequest)(nil), // 10: pb.UpdateServerReverseProxyRequest + (*UpdateServerNamesRequest)(nil), // 11: pb.UpdateServerNamesRequest + (*CountAllEnabledServersRequest)(nil), // 12: pb.CountAllEnabledServersRequest + (*CountAllEnabledServersResponse)(nil), // 13: pb.CountAllEnabledServersResponse + (*ListEnabledServersRequest)(nil), // 14: pb.ListEnabledServersRequest + (*ListEnabledServersResponse)(nil), // 15: pb.ListEnabledServersResponse + (*DisableServerRequest)(nil), // 16: pb.DisableServerRequest + (*DisableServerResponse)(nil), // 17: pb.DisableServerResponse + (*FindEnabledServerRequest)(nil), // 18: pb.FindEnabledServerRequest + (*FindEnabledServerResponse)(nil), // 19: pb.FindEnabledServerResponse + (*FindEnabledServerTypeRequest)(nil), // 20: pb.FindEnabledServerTypeRequest + (*FindEnabledServerTypeResponse)(nil), // 21: pb.FindEnabledServerTypeResponse + (*FindAndInitServerReverseProxyConfigRequest)(nil), // 22: pb.FindAndInitServerReverseProxyConfigRequest + (*FindAndInitServerReverseProxyConfigResponse)(nil), // 23: pb.FindAndInitServerReverseProxyConfigResponse + (*FindAndInitServerWebConfigRequest)(nil), // 24: pb.FindAndInitServerWebConfigRequest + (*FindAndInitServerWebConfigResponse)(nil), // 25: pb.FindAndInitServerWebConfigResponse + (*CountAllEnabledServersWithSSLCertIdRequest)(nil), // 26: pb.CountAllEnabledServersWithSSLCertIdRequest + (*CountAllEnabledServersWithSSLCertIdResponse)(nil), // 27: pb.CountAllEnabledServersWithSSLCertIdResponse + (*FindAllEnabledServersWithSSLCertIdRequest)(nil), // 28: pb.FindAllEnabledServersWithSSLCertIdRequest + (*FindAllEnabledServersWithSSLCertIdResponse)(nil), // 29: pb.FindAllEnabledServersWithSSLCertIdResponse + (*CountAllEnabledServersWithCachePolicyIdRequest)(nil), // 30: pb.CountAllEnabledServersWithCachePolicyIdRequest + (*CountAllEnabledServersWithCachePolicyIdResponse)(nil), // 31: pb.CountAllEnabledServersWithCachePolicyIdResponse + (*FindAllEnabledServersWithCachePolicyIdRequest)(nil), // 32: pb.FindAllEnabledServersWithCachePolicyIdRequest + (*FindAllEnabledServersWithCachePolicyIdResponse)(nil), // 33: pb.FindAllEnabledServersWithCachePolicyIdResponse + (*Server)(nil), // 34: pb.Server + (*RPCUpdateSuccess)(nil), // 35: pb.RPCUpdateSuccess } var file_service_server_proto_depIdxs = []int32{ - 30, // 0: pb.ListEnabledServersResponse.servers:type_name -> pb.Server - 30, // 1: pb.FindEnabledServerResponse.server:type_name -> pb.Server - 30, // 2: pb.FindAllServersWithSSLCertIdResponse.servers:type_name -> pb.Server - 0, // 3: pb.ServerService.createServer:input_type -> pb.CreateServerRequest - 2, // 4: pb.ServerService.updateServerBasic:input_type -> pb.UpdateServerBasicRequest - 3, // 5: pb.ServerService.updateServerHTTP:input_type -> pb.UpdateServerHTTPRequest - 4, // 6: pb.ServerService.updateServerHTTPS:input_type -> pb.UpdateServerHTTPSRequest - 5, // 7: pb.ServerService.updateServerTCP:input_type -> pb.UpdateServerTCPRequest - 6, // 8: pb.ServerService.updateServerTLS:input_type -> pb.UpdateServerTLSRequest - 7, // 9: pb.ServerService.updateServerUnix:input_type -> pb.UpdateServerUnixRequest - 8, // 10: pb.ServerService.updateServerUDP:input_type -> pb.UpdateServerUDPRequest - 9, // 11: pb.ServerService.updateServerWeb:input_type -> pb.UpdateServerWebRequest - 10, // 12: pb.ServerService.updateServerReverseProxy:input_type -> pb.UpdateServerReverseProxyRequest - 11, // 13: pb.ServerService.updateServerNames:input_type -> pb.UpdateServerNamesRequest - 12, // 14: pb.ServerService.countAllEnabledServers:input_type -> pb.CountAllEnabledServersRequest - 14, // 15: pb.ServerService.listEnabledServers:input_type -> pb.ListEnabledServersRequest - 16, // 16: pb.ServerService.disableServer:input_type -> pb.DisableServerRequest - 18, // 17: pb.ServerService.findEnabledServer:input_type -> pb.FindEnabledServerRequest - 20, // 18: pb.ServerService.findEnabledServerType:input_type -> pb.FindEnabledServerTypeRequest - 22, // 19: pb.ServerService.findAndInitServerReverseProxyConfig:input_type -> pb.FindAndInitServerReverseProxyConfigRequest - 24, // 20: pb.ServerService.findAndInitServerWebConfig:input_type -> pb.FindAndInitServerWebConfigRequest - 26, // 21: pb.ServerService.countServersWithSSLCertId:input_type -> pb.CountServersWithSSLCertIdRequest - 28, // 22: pb.ServerService.findAllServersWithSSLCertId:input_type -> pb.FindAllServersWithSSLCertIdRequest - 1, // 23: pb.ServerService.createServer:output_type -> pb.CreateServerResponse - 31, // 24: pb.ServerService.updateServerBasic:output_type -> pb.RPCUpdateSuccess - 31, // 25: pb.ServerService.updateServerHTTP:output_type -> pb.RPCUpdateSuccess - 31, // 26: pb.ServerService.updateServerHTTPS:output_type -> pb.RPCUpdateSuccess - 31, // 27: pb.ServerService.updateServerTCP:output_type -> pb.RPCUpdateSuccess - 31, // 28: pb.ServerService.updateServerTLS:output_type -> pb.RPCUpdateSuccess - 31, // 29: pb.ServerService.updateServerUnix:output_type -> pb.RPCUpdateSuccess - 31, // 30: pb.ServerService.updateServerUDP:output_type -> pb.RPCUpdateSuccess - 31, // 31: pb.ServerService.updateServerWeb:output_type -> pb.RPCUpdateSuccess - 31, // 32: pb.ServerService.updateServerReverseProxy:output_type -> pb.RPCUpdateSuccess - 31, // 33: pb.ServerService.updateServerNames:output_type -> pb.RPCUpdateSuccess - 13, // 34: pb.ServerService.countAllEnabledServers:output_type -> pb.CountAllEnabledServersResponse - 15, // 35: pb.ServerService.listEnabledServers:output_type -> pb.ListEnabledServersResponse - 17, // 36: pb.ServerService.disableServer:output_type -> pb.DisableServerResponse - 19, // 37: pb.ServerService.findEnabledServer:output_type -> pb.FindEnabledServerResponse - 21, // 38: pb.ServerService.findEnabledServerType:output_type -> pb.FindEnabledServerTypeResponse - 23, // 39: pb.ServerService.findAndInitServerReverseProxyConfig:output_type -> pb.FindAndInitServerReverseProxyConfigResponse - 25, // 40: pb.ServerService.findAndInitServerWebConfig:output_type -> pb.FindAndInitServerWebConfigResponse - 27, // 41: pb.ServerService.countServersWithSSLCertId:output_type -> pb.CountServersWithSSLCertIdResponse - 29, // 42: pb.ServerService.findAllServersWithSSLCertId:output_type -> pb.FindAllServersWithSSLCertIdResponse - 23, // [23:43] is the sub-list for method output_type - 3, // [3:23] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 34, // 0: pb.ListEnabledServersResponse.servers:type_name -> pb.Server + 34, // 1: pb.FindEnabledServerResponse.server:type_name -> pb.Server + 34, // 2: pb.FindAllEnabledServersWithSSLCertIdResponse.servers:type_name -> pb.Server + 34, // 3: pb.FindAllEnabledServersWithCachePolicyIdResponse.servers:type_name -> pb.Server + 0, // 4: pb.ServerService.createServer:input_type -> pb.CreateServerRequest + 2, // 5: pb.ServerService.updateServerBasic:input_type -> pb.UpdateServerBasicRequest + 3, // 6: pb.ServerService.updateServerHTTP:input_type -> pb.UpdateServerHTTPRequest + 4, // 7: pb.ServerService.updateServerHTTPS:input_type -> pb.UpdateServerHTTPSRequest + 5, // 8: pb.ServerService.updateServerTCP:input_type -> pb.UpdateServerTCPRequest + 6, // 9: pb.ServerService.updateServerTLS:input_type -> pb.UpdateServerTLSRequest + 7, // 10: pb.ServerService.updateServerUnix:input_type -> pb.UpdateServerUnixRequest + 8, // 11: pb.ServerService.updateServerUDP:input_type -> pb.UpdateServerUDPRequest + 9, // 12: pb.ServerService.updateServerWeb:input_type -> pb.UpdateServerWebRequest + 10, // 13: pb.ServerService.updateServerReverseProxy:input_type -> pb.UpdateServerReverseProxyRequest + 11, // 14: pb.ServerService.updateServerNames:input_type -> pb.UpdateServerNamesRequest + 12, // 15: pb.ServerService.countAllEnabledServers:input_type -> pb.CountAllEnabledServersRequest + 14, // 16: pb.ServerService.listEnabledServers:input_type -> pb.ListEnabledServersRequest + 16, // 17: pb.ServerService.disableServer:input_type -> pb.DisableServerRequest + 18, // 18: pb.ServerService.findEnabledServer:input_type -> pb.FindEnabledServerRequest + 20, // 19: pb.ServerService.findEnabledServerType:input_type -> pb.FindEnabledServerTypeRequest + 22, // 20: pb.ServerService.findAndInitServerReverseProxyConfig:input_type -> pb.FindAndInitServerReverseProxyConfigRequest + 24, // 21: pb.ServerService.findAndInitServerWebConfig:input_type -> pb.FindAndInitServerWebConfigRequest + 26, // 22: pb.ServerService.countAllEnabledServersWithSSLCertId:input_type -> pb.CountAllEnabledServersWithSSLCertIdRequest + 28, // 23: pb.ServerService.findAllEnabledServersWithSSLCertId:input_type -> pb.FindAllEnabledServersWithSSLCertIdRequest + 30, // 24: pb.ServerService.countAllEnabledServersWithCachePolicyId:input_type -> pb.CountAllEnabledServersWithCachePolicyIdRequest + 32, // 25: pb.ServerService.findAllEnabledServersWithCachePolicyId:input_type -> pb.FindAllEnabledServersWithCachePolicyIdRequest + 1, // 26: pb.ServerService.createServer:output_type -> pb.CreateServerResponse + 35, // 27: pb.ServerService.updateServerBasic:output_type -> pb.RPCUpdateSuccess + 35, // 28: pb.ServerService.updateServerHTTP:output_type -> pb.RPCUpdateSuccess + 35, // 29: pb.ServerService.updateServerHTTPS:output_type -> pb.RPCUpdateSuccess + 35, // 30: pb.ServerService.updateServerTCP:output_type -> pb.RPCUpdateSuccess + 35, // 31: pb.ServerService.updateServerTLS:output_type -> pb.RPCUpdateSuccess + 35, // 32: pb.ServerService.updateServerUnix:output_type -> pb.RPCUpdateSuccess + 35, // 33: pb.ServerService.updateServerUDP:output_type -> pb.RPCUpdateSuccess + 35, // 34: pb.ServerService.updateServerWeb:output_type -> pb.RPCUpdateSuccess + 35, // 35: pb.ServerService.updateServerReverseProxy:output_type -> pb.RPCUpdateSuccess + 35, // 36: pb.ServerService.updateServerNames:output_type -> pb.RPCUpdateSuccess + 13, // 37: pb.ServerService.countAllEnabledServers:output_type -> pb.CountAllEnabledServersResponse + 15, // 38: pb.ServerService.listEnabledServers:output_type -> pb.ListEnabledServersResponse + 17, // 39: pb.ServerService.disableServer:output_type -> pb.DisableServerResponse + 19, // 40: pb.ServerService.findEnabledServer:output_type -> pb.FindEnabledServerResponse + 21, // 41: pb.ServerService.findEnabledServerType:output_type -> pb.FindEnabledServerTypeResponse + 23, // 42: pb.ServerService.findAndInitServerReverseProxyConfig:output_type -> pb.FindAndInitServerReverseProxyConfigResponse + 25, // 43: pb.ServerService.findAndInitServerWebConfig:output_type -> pb.FindAndInitServerWebConfigResponse + 27, // 44: pb.ServerService.countAllEnabledServersWithSSLCertId:output_type -> pb.CountAllEnabledServersWithSSLCertIdResponse + 29, // 45: pb.ServerService.findAllEnabledServersWithSSLCertId:output_type -> pb.FindAllEnabledServersWithSSLCertIdResponse + 31, // 46: pb.ServerService.countAllEnabledServersWithCachePolicyId:output_type -> pb.CountAllEnabledServersWithCachePolicyIdResponse + 33, // 47: pb.ServerService.findAllEnabledServersWithCachePolicyId:output_type -> pb.FindAllEnabledServersWithCachePolicyIdResponse + 26, // [26:48] is the sub-list for method output_type + 4, // [4:26] 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_server_proto_init() } @@ -2382,7 +2626,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountServersWithSSLCertIdRequest); i { + switch v := v.(*CountAllEnabledServersWithSSLCertIdRequest); i { case 0: return &v.state case 1: @@ -2394,7 +2638,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountServersWithSSLCertIdResponse); i { + switch v := v.(*CountAllEnabledServersWithSSLCertIdResponse); i { case 0: return &v.state case 1: @@ -2406,7 +2650,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllServersWithSSLCertIdRequest); i { + switch v := v.(*FindAllEnabledServersWithSSLCertIdRequest); i { case 0: return &v.state case 1: @@ -2418,7 +2662,55 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAllServersWithSSLCertIdResponse); i { + switch v := v.(*FindAllEnabledServersWithSSLCertIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledServersWithCachePolicyIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledServersWithCachePolicyIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledServersWithCachePolicyIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledServersWithCachePolicyIdResponse); i { case 0: return &v.state case 1: @@ -2436,7 +2728,7 @@ func file_service_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_server_proto_rawDesc, NumEnums: 0, - NumMessages: 30, + NumMessages: 34, NumExtensions: 0, NumServices: 1, }, @@ -2499,9 +2791,13 @@ type ServerServiceClient interface { // 初始化Web设置 FindAndInitServerWebConfig(ctx context.Context, in *FindAndInitServerWebConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerWebConfigResponse, error) // 计算使用某个SSL证书的服务数量 - CountServersWithSSLCertId(ctx context.Context, in *CountServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*CountServersWithSSLCertIdResponse, error) + CountAllEnabledServersWithSSLCertId(ctx context.Context, in *CountAllEnabledServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*CountAllEnabledServersWithSSLCertIdResponse, error) // 查找使用某个SSL证书的所有服务 - FindAllServersWithSSLCertId(ctx context.Context, in *FindAllServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*FindAllServersWithSSLCertIdResponse, error) + FindAllEnabledServersWithSSLCertId(ctx context.Context, in *FindAllEnabledServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*FindAllEnabledServersWithSSLCertIdResponse, error) + // 计算使用某个缓存策略的服务数量 + CountAllEnabledServersWithCachePolicyId(ctx context.Context, in *CountAllEnabledServersWithCachePolicyIdRequest, opts ...grpc.CallOption) (*CountAllEnabledServersWithCachePolicyIdResponse, error) + // 查找使用某个缓存策略的所有服务 + FindAllEnabledServersWithCachePolicyId(ctx context.Context, in *FindAllEnabledServersWithCachePolicyIdRequest, opts ...grpc.CallOption) (*FindAllEnabledServersWithCachePolicyIdResponse, error) } type serverServiceClient struct { @@ -2674,18 +2970,36 @@ func (c *serverServiceClient) FindAndInitServerWebConfig(ctx context.Context, in return out, nil } -func (c *serverServiceClient) CountServersWithSSLCertId(ctx context.Context, in *CountServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*CountServersWithSSLCertIdResponse, error) { - out := new(CountServersWithSSLCertIdResponse) - err := c.cc.Invoke(ctx, "/pb.ServerService/countServersWithSSLCertId", in, out, opts...) +func (c *serverServiceClient) CountAllEnabledServersWithSSLCertId(ctx context.Context, in *CountAllEnabledServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*CountAllEnabledServersWithSSLCertIdResponse, error) { + out := new(CountAllEnabledServersWithSSLCertIdResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/countAllEnabledServersWithSSLCertId", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *serverServiceClient) FindAllServersWithSSLCertId(ctx context.Context, in *FindAllServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*FindAllServersWithSSLCertIdResponse, error) { - out := new(FindAllServersWithSSLCertIdResponse) - err := c.cc.Invoke(ctx, "/pb.ServerService/findAllServersWithSSLCertId", in, out, opts...) +func (c *serverServiceClient) FindAllEnabledServersWithSSLCertId(ctx context.Context, in *FindAllEnabledServersWithSSLCertIdRequest, opts ...grpc.CallOption) (*FindAllEnabledServersWithSSLCertIdResponse, error) { + out := new(FindAllEnabledServersWithSSLCertIdResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/findAllEnabledServersWithSSLCertId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) CountAllEnabledServersWithCachePolicyId(ctx context.Context, in *CountAllEnabledServersWithCachePolicyIdRequest, opts ...grpc.CallOption) (*CountAllEnabledServersWithCachePolicyIdResponse, error) { + out := new(CountAllEnabledServersWithCachePolicyIdResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/countAllEnabledServersWithCachePolicyId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) FindAllEnabledServersWithCachePolicyId(ctx context.Context, in *FindAllEnabledServersWithCachePolicyIdRequest, opts ...grpc.CallOption) (*FindAllEnabledServersWithCachePolicyIdResponse, error) { + out := new(FindAllEnabledServersWithCachePolicyIdResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/findAllEnabledServersWithCachePolicyId", in, out, opts...) if err != nil { return nil, err } @@ -2731,9 +3045,13 @@ type ServerServiceServer interface { // 初始化Web设置 FindAndInitServerWebConfig(context.Context, *FindAndInitServerWebConfigRequest) (*FindAndInitServerWebConfigResponse, error) // 计算使用某个SSL证书的服务数量 - CountServersWithSSLCertId(context.Context, *CountServersWithSSLCertIdRequest) (*CountServersWithSSLCertIdResponse, error) + CountAllEnabledServersWithSSLCertId(context.Context, *CountAllEnabledServersWithSSLCertIdRequest) (*CountAllEnabledServersWithSSLCertIdResponse, error) // 查找使用某个SSL证书的所有服务 - FindAllServersWithSSLCertId(context.Context, *FindAllServersWithSSLCertIdRequest) (*FindAllServersWithSSLCertIdResponse, error) + FindAllEnabledServersWithSSLCertId(context.Context, *FindAllEnabledServersWithSSLCertIdRequest) (*FindAllEnabledServersWithSSLCertIdResponse, error) + // 计算使用某个缓存策略的服务数量 + CountAllEnabledServersWithCachePolicyId(context.Context, *CountAllEnabledServersWithCachePolicyIdRequest) (*CountAllEnabledServersWithCachePolicyIdResponse, error) + // 查找使用某个缓存策略的所有服务 + FindAllEnabledServersWithCachePolicyId(context.Context, *FindAllEnabledServersWithCachePolicyIdRequest) (*FindAllEnabledServersWithCachePolicyIdResponse, error) } // UnimplementedServerServiceServer can be embedded to have forward compatible implementations. @@ -2794,11 +3112,17 @@ func (*UnimplementedServerServiceServer) FindAndInitServerReverseProxyConfig(con func (*UnimplementedServerServiceServer) FindAndInitServerWebConfig(context.Context, *FindAndInitServerWebConfigRequest) (*FindAndInitServerWebConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAndInitServerWebConfig not implemented") } -func (*UnimplementedServerServiceServer) CountServersWithSSLCertId(context.Context, *CountServersWithSSLCertIdRequest) (*CountServersWithSSLCertIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CountServersWithSSLCertId not implemented") +func (*UnimplementedServerServiceServer) CountAllEnabledServersWithSSLCertId(context.Context, *CountAllEnabledServersWithSSLCertIdRequest) (*CountAllEnabledServersWithSSLCertIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledServersWithSSLCertId not implemented") } -func (*UnimplementedServerServiceServer) FindAllServersWithSSLCertId(context.Context, *FindAllServersWithSSLCertIdRequest) (*FindAllServersWithSSLCertIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindAllServersWithSSLCertId not implemented") +func (*UnimplementedServerServiceServer) FindAllEnabledServersWithSSLCertId(context.Context, *FindAllEnabledServersWithSSLCertIdRequest) (*FindAllEnabledServersWithSSLCertIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledServersWithSSLCertId not implemented") +} +func (*UnimplementedServerServiceServer) CountAllEnabledServersWithCachePolicyId(context.Context, *CountAllEnabledServersWithCachePolicyIdRequest) (*CountAllEnabledServersWithCachePolicyIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledServersWithCachePolicyId not implemented") +} +func (*UnimplementedServerServiceServer) FindAllEnabledServersWithCachePolicyId(context.Context, *FindAllEnabledServersWithCachePolicyIdRequest) (*FindAllEnabledServersWithCachePolicyIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledServersWithCachePolicyId not implemented") } func RegisterServerServiceServer(s *grpc.Server, srv ServerServiceServer) { @@ -3129,38 +3453,74 @@ func _ServerService_FindAndInitServerWebConfig_Handler(srv interface{}, ctx cont return interceptor(ctx, in, info, handler) } -func _ServerService_CountServersWithSSLCertId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CountServersWithSSLCertIdRequest) +func _ServerService_CountAllEnabledServersWithSSLCertId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllEnabledServersWithSSLCertIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServerServiceServer).CountServersWithSSLCertId(ctx, in) + return srv.(ServerServiceServer).CountAllEnabledServersWithSSLCertId(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.ServerService/CountServersWithSSLCertId", + FullMethod: "/pb.ServerService/CountAllEnabledServersWithSSLCertId", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServerServiceServer).CountServersWithSSLCertId(ctx, req.(*CountServersWithSSLCertIdRequest)) + return srv.(ServerServiceServer).CountAllEnabledServersWithSSLCertId(ctx, req.(*CountAllEnabledServersWithSSLCertIdRequest)) } return interceptor(ctx, in, info, handler) } -func _ServerService_FindAllServersWithSSLCertId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindAllServersWithSSLCertIdRequest) +func _ServerService_FindAllEnabledServersWithSSLCertId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllEnabledServersWithSSLCertIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServerServiceServer).FindAllServersWithSSLCertId(ctx, in) + return srv.(ServerServiceServer).FindAllEnabledServersWithSSLCertId(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.ServerService/FindAllServersWithSSLCertId", + FullMethod: "/pb.ServerService/FindAllEnabledServersWithSSLCertId", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServerServiceServer).FindAllServersWithSSLCertId(ctx, req.(*FindAllServersWithSSLCertIdRequest)) + return srv.(ServerServiceServer).FindAllEnabledServersWithSSLCertId(ctx, req.(*FindAllEnabledServersWithSSLCertIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_CountAllEnabledServersWithCachePolicyId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllEnabledServersWithCachePolicyIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).CountAllEnabledServersWithCachePolicyId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/CountAllEnabledServersWithCachePolicyId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).CountAllEnabledServersWithCachePolicyId(ctx, req.(*CountAllEnabledServersWithCachePolicyIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_FindAllEnabledServersWithCachePolicyId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllEnabledServersWithCachePolicyIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).FindAllEnabledServersWithCachePolicyId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/FindAllEnabledServersWithCachePolicyId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).FindAllEnabledServersWithCachePolicyId(ctx, req.(*FindAllEnabledServersWithCachePolicyIdRequest)) } return interceptor(ctx, in, info, handler) } @@ -3242,12 +3602,20 @@ var _ServerService_serviceDesc = grpc.ServiceDesc{ Handler: _ServerService_FindAndInitServerWebConfig_Handler, }, { - MethodName: "countServersWithSSLCertId", - Handler: _ServerService_CountServersWithSSLCertId_Handler, + MethodName: "countAllEnabledServersWithSSLCertId", + Handler: _ServerService_CountAllEnabledServersWithSSLCertId_Handler, }, { - MethodName: "findAllServersWithSSLCertId", - Handler: _ServerService_FindAllServersWithSSLCertId_Handler, + MethodName: "findAllEnabledServersWithSSLCertId", + Handler: _ServerService_FindAllEnabledServersWithSSLCertId_Handler, + }, + { + MethodName: "countAllEnabledServersWithCachePolicyId", + Handler: _ServerService_CountAllEnabledServersWithCachePolicyId_Handler, + }, + { + MethodName: "findAllEnabledServersWithCachePolicyId", + Handler: _ServerService_FindAllEnabledServersWithCachePolicyId_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/rpc/pb/service_sys_setting.pb.go b/pkg/rpc/pb/service_sys_setting.pb.go new file mode 100644 index 0000000..fb53d5c --- /dev/null +++ b/pkg/rpc/pb/service_sys_setting.pb.go @@ -0,0 +1,427 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_sys_setting.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 + +// 更改配置 +type UpdateSysSettingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + ValueJSON []byte `protobuf:"bytes,2,opt,name=valueJSON,proto3" json:"valueJSON,omitempty"` +} + +func (x *UpdateSysSettingRequest) Reset() { + *x = UpdateSysSettingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sys_setting_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSysSettingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSysSettingRequest) ProtoMessage() {} + +func (x *UpdateSysSettingRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_sys_setting_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 UpdateSysSettingRequest.ProtoReflect.Descriptor instead. +func (*UpdateSysSettingRequest) Descriptor() ([]byte, []int) { + return file_service_sys_setting_proto_rawDescGZIP(), []int{0} +} + +func (x *UpdateSysSettingRequest) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *UpdateSysSettingRequest) GetValueJSON() []byte { + if x != nil { + return x.ValueJSON + } + return nil +} + +// 读取配置 +type ReadSysSettingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *ReadSysSettingRequest) Reset() { + *x = ReadSysSettingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sys_setting_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadSysSettingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadSysSettingRequest) ProtoMessage() {} + +func (x *ReadSysSettingRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_sys_setting_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 ReadSysSettingRequest.ProtoReflect.Descriptor instead. +func (*ReadSysSettingRequest) Descriptor() ([]byte, []int) { + return file_service_sys_setting_proto_rawDescGZIP(), []int{1} +} + +func (x *ReadSysSettingRequest) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +type ReadSysSettingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValueJSON []byte `protobuf:"bytes,1,opt,name=valueJSON,proto3" json:"valueJSON,omitempty"` +} + +func (x *ReadSysSettingResponse) Reset() { + *x = ReadSysSettingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sys_setting_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadSysSettingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadSysSettingResponse) ProtoMessage() {} + +func (x *ReadSysSettingResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_sys_setting_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 ReadSysSettingResponse.ProtoReflect.Descriptor instead. +func (*ReadSysSettingResponse) Descriptor() ([]byte, []int) { + return file_service_sys_setting_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadSysSettingResponse) GetValueJSON() []byte { + if x != nil { + return x.ValueJSON + } + return nil +} + +var File_service_sys_setting_proto protoreflect.FileDescriptor + +var file_service_sys_setting_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, + 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4a, 0x53, 0x4f, 0x4e, + 0x22, 0x2b, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, 0x53, 0x79, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x36, 0x0a, + 0x16, 0x52, 0x65, 0x61, 0x64, 0x53, 0x79, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xa3, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, + 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x64, 0x53, 0x79, 0x73, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x79, + 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x79, 0x73, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 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_sys_setting_proto_rawDescOnce sync.Once + file_service_sys_setting_proto_rawDescData = file_service_sys_setting_proto_rawDesc +) + +func file_service_sys_setting_proto_rawDescGZIP() []byte { + file_service_sys_setting_proto_rawDescOnce.Do(func() { + file_service_sys_setting_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_sys_setting_proto_rawDescData) + }) + return file_service_sys_setting_proto_rawDescData +} + +var file_service_sys_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_service_sys_setting_proto_goTypes = []interface{}{ + (*UpdateSysSettingRequest)(nil), // 0: pb.UpdateSysSettingRequest + (*ReadSysSettingRequest)(nil), // 1: pb.ReadSysSettingRequest + (*ReadSysSettingResponse)(nil), // 2: pb.ReadSysSettingResponse + (*RPCUpdateSuccess)(nil), // 3: pb.RPCUpdateSuccess +} +var file_service_sys_setting_proto_depIdxs = []int32{ + 0, // 0: pb.SysSettingService.updateSysSetting:input_type -> pb.UpdateSysSettingRequest + 1, // 1: pb.SysSettingService.readSysSetting:input_type -> pb.ReadSysSettingRequest + 3, // 2: pb.SysSettingService.updateSysSetting:output_type -> pb.RPCUpdateSuccess + 2, // 3: pb.SysSettingService.readSysSetting:output_type -> pb.ReadSysSettingResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] 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_service_sys_setting_proto_init() } +func file_service_sys_setting_proto_init() { + if File_service_sys_setting_proto != nil { + return + } + file_rpc_messages_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_sys_setting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSysSettingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_sys_setting_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadSysSettingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_sys_setting_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadSysSettingResponse); 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_sys_setting_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_sys_setting_proto_goTypes, + DependencyIndexes: file_service_sys_setting_proto_depIdxs, + MessageInfos: file_service_sys_setting_proto_msgTypes, + }.Build() + File_service_sys_setting_proto = out.File + file_service_sys_setting_proto_rawDesc = nil + file_service_sys_setting_proto_goTypes = nil + file_service_sys_setting_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 + +// SysSettingServiceClient is the client API for SysSettingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SysSettingServiceClient interface { + // 更改配置 + UpdateSysSetting(ctx context.Context, in *UpdateSysSettingRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) + // 读取配置 + ReadSysSetting(ctx context.Context, in *ReadSysSettingRequest, opts ...grpc.CallOption) (*ReadSysSettingResponse, error) +} + +type sysSettingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSysSettingServiceClient(cc grpc.ClientConnInterface) SysSettingServiceClient { + return &sysSettingServiceClient{cc} +} + +func (c *sysSettingServiceClient) UpdateSysSetting(ctx context.Context, in *UpdateSysSettingRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) { + out := new(RPCUpdateSuccess) + err := c.cc.Invoke(ctx, "/pb.SysSettingService/updateSysSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sysSettingServiceClient) ReadSysSetting(ctx context.Context, in *ReadSysSettingRequest, opts ...grpc.CallOption) (*ReadSysSettingResponse, error) { + out := new(ReadSysSettingResponse) + err := c.cc.Invoke(ctx, "/pb.SysSettingService/readSysSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SysSettingServiceServer is the server API for SysSettingService service. +type SysSettingServiceServer interface { + // 更改配置 + UpdateSysSetting(context.Context, *UpdateSysSettingRequest) (*RPCUpdateSuccess, error) + // 读取配置 + ReadSysSetting(context.Context, *ReadSysSettingRequest) (*ReadSysSettingResponse, error) +} + +// UnimplementedSysSettingServiceServer can be embedded to have forward compatible implementations. +type UnimplementedSysSettingServiceServer struct { +} + +func (*UnimplementedSysSettingServiceServer) UpdateSysSetting(context.Context, *UpdateSysSettingRequest) (*RPCUpdateSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSysSetting not implemented") +} +func (*UnimplementedSysSettingServiceServer) ReadSysSetting(context.Context, *ReadSysSettingRequest) (*ReadSysSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadSysSetting not implemented") +} + +func RegisterSysSettingServiceServer(s *grpc.Server, srv SysSettingServiceServer) { + s.RegisterService(&_SysSettingService_serviceDesc, srv) +} + +func _SysSettingService_UpdateSysSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSysSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SysSettingServiceServer).UpdateSysSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SysSettingService/UpdateSysSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SysSettingServiceServer).UpdateSysSetting(ctx, req.(*UpdateSysSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SysSettingService_ReadSysSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadSysSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SysSettingServiceServer).ReadSysSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SysSettingService/ReadSysSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SysSettingServiceServer).ReadSysSetting(ctx, req.(*ReadSysSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _SysSettingService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.SysSettingService", + HandlerType: (*SysSettingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "updateSysSetting", + Handler: _SysSettingService_UpdateSysSetting_Handler, + }, + { + MethodName: "readSysSetting", + Handler: _SysSettingService_ReadSysSetting_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_sys_setting.proto", +} diff --git a/pkg/rpc/protos/rpc_messages.proto b/pkg/rpc/protos/rpc_messages.proto index 8809fcd..993b3de 100644 --- a/pkg/rpc/protos/rpc_messages.proto +++ b/pkg/rpc/protos/rpc_messages.proto @@ -9,4 +9,4 @@ message RPCUpdateSuccess { message RPCDeleteSuccess { -} \ No newline at end of file +} diff --git a/pkg/rpc/protos/service_http_cache_policy.proto b/pkg/rpc/protos/service_http_cache_policy.proto index e968615..00ae6f4 100644 --- a/pkg/rpc/protos/service_http_cache_policy.proto +++ b/pkg/rpc/protos/service_http_cache_policy.proto @@ -4,10 +4,29 @@ option go_package = "./pb"; package pb; import "model_http_cache_policy.proto"; +import "rpc_messages.proto"; service HTTPCachePolicyService { // 获取所有可用策略 rpc findAllEnabledHTTPCachePolicies (FindAllEnabledHTTPCachePoliciesRequest) returns (FindAllEnabledHTTPCachePoliciesResponse); + + // 创建缓存策略 + rpc createHTTPCachePolicy (CreateHTTPCachePolicyRequest) returns (CreateHTTPCachePolicyResponse); + + // 修改缓存策略 + rpc updateHTTPCachePolicy (UpdateHTTPCachePolicyRequest) returns (RPCUpdateSuccess); + + // 删除缓存策略 + rpc deleteHTTPCachePolicy (DeleteHTTPCachePolicyRequest) returns (RPCDeleteSuccess); + + // 计算缓存策略数量 + rpc countAllEnabledHTTPCachePolicies (CountAllEnabledHTTPCachePoliciesRequest) returns (CountAllEnabledHTTPCachePoliciesResponse); + + // 列出单页的缓存策略 + rpc listEnabledHTTPCachePolicies (ListEnabledHTTPCachePoliciesRequest) returns (ListEnabledHTTPCachePoliciesResponse); + + // 查找单个缓存策略配置 + rpc findEnabledHTTPCachePolicyConfig (FindEnabledHTTPCachePolicyConfigRequest) returns (FindEnabledHTTPCachePolicyConfigResponse); } // 获取所有可用策略 @@ -19,3 +38,63 @@ message FindAllEnabledHTTPCachePoliciesResponse { repeated HTTPCachePolicy cachePolicies = 1; } +// 创建缓存策略 +message CreateHTTPCachePolicyRequest { + bool isOn = 1; + string name = 2; + string description = 3; + bytes capacityJSON = 4; + int64 maxKeys = 5; + bytes maxSizeJSON = 6; + string type = 7; + bytes optionsJSON = 8; +} + +message CreateHTTPCachePolicyResponse { + int64 cachePolicyId = 1; +} + +// 修改缓存策略 +message UpdateHTTPCachePolicyRequest { + int64 cachePolicyId = 1; + bool isOn = 2; + string name = 3; + string description = 4; + bytes capacityJSON = 5; + int64 maxKeys = 6; + bytes maxSizeJSON = 7; + string type = 8; + bytes optionsJSON = 9; +} + +// 删除缓存策略 +message DeleteHTTPCachePolicyRequest { + int64 cachePolicyId = 1; +} + +// 计算缓存策略数量 +message CountAllEnabledHTTPCachePoliciesRequest { +} + +message CountAllEnabledHTTPCachePoliciesResponse { + int64 count = 1; +} + +// 列出单页的缓存策略 +message ListEnabledHTTPCachePoliciesRequest { + int64 offset = 1; + int64 size = 2; +} + +message ListEnabledHTTPCachePoliciesResponse { + bytes cachePoliciesJSON = 1; +} + +// 查找单个缓存策略配置 +message FindEnabledHTTPCachePolicyConfigRequest { + int64 cachePolicyId = 1; +} + +message FindEnabledHTTPCachePolicyConfigResponse { + bytes cachePolicyJSON = 1; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_server.proto b/pkg/rpc/protos/service_server.proto index a336669..59dff28 100644 --- a/pkg/rpc/protos/service_server.proto +++ b/pkg/rpc/protos/service_server.proto @@ -62,10 +62,16 @@ service ServerService { rpc findAndInitServerWebConfig (FindAndInitServerWebConfigRequest) returns (FindAndInitServerWebConfigResponse); // 计算使用某个SSL证书的服务数量 - rpc countServersWithSSLCertId (CountServersWithSSLCertIdRequest) returns (CountServersWithSSLCertIdResponse); + rpc countAllEnabledServersWithSSLCertId (CountAllEnabledServersWithSSLCertIdRequest) returns (CountAllEnabledServersWithSSLCertIdResponse); // 查找使用某个SSL证书的所有服务 - rpc findAllServersWithSSLCertId (FindAllServersWithSSLCertIdRequest) returns (FindAllServersWithSSLCertIdResponse); + rpc findAllEnabledServersWithSSLCertId (FindAllEnabledServersWithSSLCertIdRequest) returns (FindAllEnabledServersWithSSLCertIdResponse); + + // 计算使用某个缓存策略的服务数量 + rpc countAllEnabledServersWithCachePolicyId (CountAllEnabledServersWithCachePolicyIdRequest) returns (CountAllEnabledServersWithCachePolicyIdResponse); + + // 查找使用某个缓存策略的所有服务 + rpc findAllEnabledServersWithCachePolicyId (FindAllEnabledServersWithCachePolicyIdRequest) returns (FindAllEnabledServersWithCachePolicyIdResponse); } // 创建服务 @@ -217,19 +223,38 @@ message FindAndInitServerWebConfigResponse { } // 计算使用某个SSL证书的服务数量 -message CountServersWithSSLCertIdRequest { +message CountAllEnabledServersWithSSLCertIdRequest { int64 certId = 1; } -message CountServersWithSSLCertIdResponse { +message CountAllEnabledServersWithSSLCertIdResponse { int64 count = 1; } // 查找使用某个SSL证书的所有服务 -message FindAllServersWithSSLCertIdRequest { +message FindAllEnabledServersWithSSLCertIdRequest { int64 certId = 1; } -message FindAllServersWithSSLCertIdResponse { +message FindAllEnabledServersWithSSLCertIdResponse { repeated Server servers = 1; -} \ No newline at end of file +} + +// 计算使用某个缓存策略的服务数量 +message CountAllEnabledServersWithCachePolicyIdRequest { + int64 cachePolicyId = 1; +} + +message CountAllEnabledServersWithCachePolicyIdResponse { + int64 count = 1; +} + +// 查找使用某个缓存策略的所有服务 +message FindAllEnabledServersWithCachePolicyIdRequest { + int64 cachePolicyId = 1; +} + +message FindAllEnabledServersWithCachePolicyIdResponse { + repeated Server servers = 1; +} + diff --git a/pkg/rpc/protos/service_sys_setting.proto b/pkg/rpc/protos/service_sys_setting.proto new file mode 100644 index 0000000..b63513e --- /dev/null +++ b/pkg/rpc/protos/service_sys_setting.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "rpc_messages.proto"; + +service SysSettingService { + // 更改配置 + rpc updateSysSetting (UpdateSysSettingRequest) returns (RPCUpdateSuccess); + + // 读取配置 + rpc readSysSetting (ReadSysSettingRequest) returns (ReadSysSettingResponse); +} + +// 更改配置 +message UpdateSysSettingRequest { + string code = 1; + bytes valueJSON = 2; +} + +// 读取配置 +message ReadSysSettingRequest { + string code = 1; +} + +message ReadSysSettingResponse { + bytes valueJSON = 1; +} \ No newline at end of file diff --git a/pkg/serverconfigs/http_cache_cond.go b/pkg/serverconfigs/http_cache_cond.go new file mode 100644 index 0000000..6378779 --- /dev/null +++ b/pkg/serverconfigs/http_cache_cond.go @@ -0,0 +1,67 @@ +package serverconfigs + +import ( + "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" + "github.com/iwind/TeaGo/lists" + "strings" + "time" +) + +var DefaultSkippedResponseCacheControlValues = []string{"private", "no-cache", "no-store"} + +type HTTPCacheCond struct { + Key string `yaml:"key" json:"key"` // 每个缓存的Key规则,里面可以有变量 + Life *shared.TimeDuration `yaml:"life" json:"life"` // 时间 + Status []int `yaml:"status" json:"status"` // 缓存的状态码列表 + MaxSize *shared.SizeCapacity `yaml:"maxSize" json:"maxSize"` // 能够请求的最大尺寸 + + SkipResponseCacheControlValues []string `yaml:"skipCacheControlValues" json:"skipCacheControlValues"` // 可以跳过的响应的Cache-Control值 + SkipResponseSetCookie bool `yaml:"skipSetCookie" json:"skipSetCookie"` // 是否跳过响应的Set-Cookie Header + EnableRequestCachePragma bool `yaml:"enableRequestCachePragma" json:"enableRequestCachePragma"` // 是否支持客户端的Pragma: no-cache + + Conds *shared.HTTPRequestCondsConfig `yaml:"conds" json:"conds"` // 请求条件 + + life time.Duration + maxSize int64 + uppercaseSkipCacheControlValues []string +} + +func (this *HTTPCacheCond) Init() error { + if this.MaxSize != nil { + this.maxSize = this.MaxSize.Bytes() + } + if this.Life != nil { + this.life = this.Life.Duration() + } + + // control-values + this.uppercaseSkipCacheControlValues = []string{} + for _, value := range this.SkipResponseCacheControlValues { + this.uppercaseSkipCacheControlValues = append(this.uppercaseSkipCacheControlValues, strings.ToUpper(value)) + } + + // conds + if this.Conds != nil { + err := this.Conds.Init() + if err != nil { + return err + } + } + + return nil +} + +// 最大数据尺寸 +func (this *HTTPCacheCond) MaxDataSize() int64 { + return this.maxSize +} + +// 生命周期 +func (this *HTTPCacheCond) LifeDuration() time.Duration { + return this.life +} + +// 是否包含某个Cache-Control值 +func (this *HTTPCacheCond) ContainsCacheControl(value string) bool { + return lists.ContainsString(this.uppercaseSkipCacheControlValues, strings.ToUpper(value)) +} diff --git a/pkg/serverconfigs/http_cache_config_file.go b/pkg/serverconfigs/http_cache_config_file.go new file mode 100644 index 0000000..119359c --- /dev/null +++ b/pkg/serverconfigs/http_cache_config_file.go @@ -0,0 +1,11 @@ +package serverconfigs + +type CachePolicyType = string + +type HTTPFileCacheConfig struct { + Dir string `yaml:"dir" json:"dir"` // 目录 +} + +func (this *HTTPFileCacheConfig) Init() error { + return nil +} diff --git a/pkg/serverconfigs/http_cache_config_memory.go b/pkg/serverconfigs/http_cache_config_memory.go new file mode 100644 index 0000000..cd837ac --- /dev/null +++ b/pkg/serverconfigs/http_cache_config_memory.go @@ -0,0 +1,8 @@ +package serverconfigs + +type HTTPMemoryCacheConfig struct { +} + +func (this *HTTPMemoryCacheConfig) Init() error { + return nil +} diff --git a/pkg/serverconfigs/http_cache_policy.go b/pkg/serverconfigs/http_cache_policy.go index 513b08c..65d8a6b 100644 --- a/pkg/serverconfigs/http_cache_policy.go +++ b/pkg/serverconfigs/http_cache_policy.go @@ -1,129 +1,36 @@ package serverconfigs import ( - "github.com/TeaOSLab/EdgeCommon/pkg/configutils" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" - "github.com/iwind/TeaGo/Tea" - "github.com/iwind/TeaGo/files" - "github.com/iwind/TeaGo/lists" - "github.com/iwind/TeaGo/logs" - "strings" - "time" ) -var DefaultSkippedResponseCacheControlValues = []string{"private", "no-cache", "no-store"} - // 缓存策略配置 type HTTPCachePolicy struct { - Id int64 `yaml:"id" json:"id"` - IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启 TODO - Name string `yaml:"name" json:"name"` // 名称 + Id int64 `yaml:"id" json:"id"` + IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启 + Name string `yaml:"name" json:"name"` // 名称 + Description string `yaml:"description" json:"description"` // 描述 + Capacity *shared.SizeCapacity `yaml:"capacity" json:"capacity"` // 最大内容容量 + MaxKeys int64 `yaml:"maxKeys" json:"maxKeys"` // 最多Key值 + MaxSize *shared.SizeCapacity `yaml:"maxSize" json:"maxSize"` // 单个缓存最大尺寸 + Type CachePolicyType `yaml:"type" json:"type"` // 类型 + Options map[string]interface{} `yaml:"options" json:"options"` // 选项 - Key string `yaml:"key" json:"key"` // 每个缓存的Key规则,里面可以有变量 - 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"` // 能够请求的最大尺寸 - - SkipResponseCacheControlValues []string `yaml:"skipCacheControlValues" json:"skipCacheControlValues"` // 可以跳过的响应的Cache-Control值 - SkipResponseSetCookie bool `yaml:"skipSetCookie" json:"skipSetCookie"` // 是否跳过响应的Set-Cookie Header - EnableRequestCachePragma bool `yaml:"enableRequestCachePragma" json:"enableRequestCachePragma"` // 是否支持客户端的Pragma: no-cache - - Conds *shared.HTTPRequestCondsConfig `yaml:"conds" json:"conds"` // 请求条件 - - life time.Duration - maxSize int64 capacity int64 - - uppercaseSkipCacheControlValues []string - - Type string `yaml:"type" json:"type"` // 类型 - Options map[string]interface{} `yaml:"options" json:"options"` // 选项 -} - -// 获取新对象 -func NewHTTPCachePolicy() *HTTPCachePolicy { - return &HTTPCachePolicy{ - SkipResponseCacheControlValues: DefaultSkippedResponseCacheControlValues, - SkipResponseSetCookie: true, - } -} - -// 从文件中读取缓存策略 -func NewCachePolicyFromFile(file string) *HTTPCachePolicy { - if len(file) == 0 { - return nil - } - reader, err := files.NewReader(Tea.ConfigFile(file)) - if err != nil { - logs.Error(err) - return nil - } - defer func() { - _ = reader.Close() - }() - - p := NewHTTPCachePolicy() - err = reader.ReadYAML(p) - if err != nil { - logs.Error(err) - return nil - } - - return p } // 校验 func (this *HTTPCachePolicy) Init() error { var err error - this.maxSize = this.MaxSize.Bytes() - this.life = this.Life.Duration() - this.capacity = this.Capacity.Bytes() - this.uppercaseSkipCacheControlValues = []string{} - for _, value := range this.SkipResponseCacheControlValues { - this.uppercaseSkipCacheControlValues = append(this.uppercaseSkipCacheControlValues, strings.ToUpper(value)) - } - - // cond - if this.Conds != nil { - err := this.Conds.Init() - if err != nil { - return err - } + if this.Capacity != nil { + this.capacity = this.Capacity.Bytes() } return err } -// 最大数据尺寸 -func (this *HTTPCachePolicy) MaxDataSize() int64 { - return this.maxSize -} - // 容量 func (this *HTTPCachePolicy) CapacitySize() int64 { return this.capacity } - -// 生命周期 -func (this *HTTPCachePolicy) LifeDuration() time.Duration { - return this.life -} - -// 是否包含某个Cache-Control值 -func (this *HTTPCachePolicy) ContainsCacheControl(value string) bool { - return lists.ContainsString(this.uppercaseSkipCacheControlValues, strings.ToUpper(value)) -} - -// 检查是否匹配关键词 -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 - if len(this.Type) > 0 { - tags = []string{"类型:" + this.Type} - } - } - return -} diff --git a/pkg/serverconfigs/http_cache_policy_types.go b/pkg/serverconfigs/http_cache_policy_types.go new file mode 100644 index 0000000..10f6bac --- /dev/null +++ b/pkg/serverconfigs/http_cache_policy_types.go @@ -0,0 +1,29 @@ +package serverconfigs + +import "github.com/iwind/TeaGo/maps" + +const ( + CachePolicyTypeFile CachePolicyType = "file" + CachePolicyTypeMemory CachePolicyType = "memory" +) + +var AllCachePolicyTypes = []maps.Map{ + { + "name": "文件缓存", + "type": CachePolicyTypeFile, + }, + { + "name": "内存缓存", + "type": CachePolicyTypeMemory, + }, +} + +// 根据类型查找名称 +func FindCachePolicyTypeName(policyType CachePolicyType) string { + for _, t := range AllCachePolicyTypes { + if t.GetString("type") == policyType { + return t.GetString("name") + } + } + return "" +} diff --git a/pkg/serverconfigs/http_cache_ref.go b/pkg/serverconfigs/http_cache_ref.go index 1c06190..ac712c5 100644 --- a/pkg/serverconfigs/http_cache_ref.go +++ b/pkg/serverconfigs/http_cache_ref.go @@ -1,11 +1,18 @@ package serverconfigs type HTTPCacheRef struct { - IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖 - IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启 - CachePolicyId int64 `yaml:"cachePolicyId" json:"cachePolicyId"` // 缓存策略ID + IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖 + IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启 + CachePolicyId int64 `yaml:"cachePolicyId" json:"cachePolicyId"` // 缓存策略ID + Cond *HTTPCacheCond `yaml:"cond" json:"cond"` // 条件 } func (this *HTTPCacheRef) Init() error { + if this.Cond != nil { + err := this.Cond.Init() + if err != nil { + return err + } + } return nil } diff --git a/pkg/serverconfigs/http_web_config.go b/pkg/serverconfigs/http_web_config.go index 844c571..5e6b955 100644 --- a/pkg/serverconfigs/http_web_config.go +++ b/pkg/serverconfigs/http_web_config.go @@ -17,7 +17,8 @@ type HTTPWebConfig struct { MaxRequestBodySize string `yaml:"maxRequestBodySize" json:"maxRequestBodySize"` // 请求body最大尺寸 TODO 需要实现 AccessLogRef *HTTPAccessLogRef `yaml:"accessLog" json:"accessLog"` // 访问日志配置 StatRef *HTTPStatRef `yaml:"statRef" json:"statRef"` // 统计配置 - CacheRef *HTTPCacheRef `yaml:"cacheRef" json:"cacheRef"` // 缓存配置 + CacheRefs []*HTTPCacheRef `yaml:"cacheRefs" json:"cacheRefs"` // 缓存配置 + CachePolicies []*HTTPCachePolicy `yaml:"cachePolicies" json:"cachePolicies"` // 缓存策略 FirewallRef *HTTPFirewallRef `yaml:"firewallRef" json:"firewallRef"` // 防火墙设置 WebsocketRef *HTTPWebsocketRef `yaml:"websocketRef" json:"websocketRef"` // Websocket应用配置 Websocket *HTTPWebsocketConfig `yaml:"websocket" json:"websocket"` // Websocket配置 @@ -111,8 +112,14 @@ func (this *HTTPWebConfig) Init() error { } // cache - if this.CacheRef != nil { - err := this.CacheRef.Init() + for _, cacheRef := range this.CacheRefs { + err := cacheRef.Init() + if err != nil { + return err + } + } + for _, cachePolicy := range this.CachePolicies { + err := cachePolicy.Init() if err != nil { return err }