diff --git a/pkg/rpc/pb/model_http_access_log_test.go b/pkg/rpc/pb/model_http_access_log_test.go deleted file mode 100644 index 857305a..0000000 --- a/pkg/rpc/pb/model_http_access_log_test.go +++ /dev/null @@ -1,119 +0,0 @@ -package pb - -import ( - "encoding/json" - "github.com/golang/protobuf/proto" - "runtime" - "strconv" - "testing" - "time" -) - -func TestHTTPAccessLog_Marshal(t *testing.T) { - data, err := proto.Marshal(&HTTPAccessLog{ - ServerId: 1, - LocationId: 1, - RewriteId: 1, - NodeId: 1, - }) - if err != nil { - t.Fatal(err) - } - t.Log(len(data), "bytes") - - accessLog := &HTTPAccessLog{} - err = proto.Unmarshal(data, accessLog) - if err != nil { - t.Fatal(err) - } - t.Log("accessLog:", accessLog) -} - -func TestHTTPAccessLog_Memory(t *testing.T) { - s := []*HTTPAccessLog{} - for i := 0; i < 100000; i++ { - s = append(s, &HTTPAccessLog{ - ServerId: 1, - LocationId: 1, - RewriteId: 1, - NodeId: 1, - RequestPath: "/hello", - RequestURI: "/hello?name=lu&age=20", - RequestMethod: "POST", - RequestFilename: "/hello.html", - Header: map[string]*Strings{ - "User-Agent": { - Values: []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"}, - }, - }, - }) - } - time.Sleep(10 * time.Second) -} - -func TestHTTPAccessLog_RequestId(t *testing.T) { - u := time.Now().UnixNano() - t.Logf("%d, %d", u, len(strconv.FormatInt(u, 10))) -} - -func BenchmarkHTTPAccessLog_Proto_Marshal(b *testing.B) { - runtime.GOMAXPROCS(1) - for i := 0; i < b.N; i++ { - _, _ = proto.Marshal(&HTTPAccessLog{ - ServerId: 1, - LocationId: 1, - RewriteId: 1, - NodeId: 1, - RequestPath: "/hello", - RequestURI: "/hello?name=lu&age=20", - RequestMethod: "POST", - RequestFilename: "/hello.html", - Header: map[string]*Strings{ - "User-Agent": { - Values: []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"}, - }, - }, - }) - } -} - -func BenchmarkHTTPAccessLog_JSON_Marshal(b *testing.B) { - runtime.GOMAXPROCS(1) - for i := 0; i < b.N; i++ { - _, _ = json.Marshal(&HTTPAccessLog{ - ServerId: 1, - LocationId: 1, - RewriteId: 1, - NodeId: 1, - RequestPath: "/hello", - RequestURI: "/hello?name=lu&age=20", - RequestMethod: "POST", - RequestFilename: "/hello.html", - Header: map[string]*Strings{ - "User-Agent": { - Values: []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"}, - }, - }, - }) - } -} - -func BenchmarkHTTPAccessLog_JSON_Marshal_Map(b *testing.B) { - runtime.GOMAXPROCS(1) - for i := 0; i < b.N; i++ { - m := map[string]interface{}{ - "ServerId": "1", - "LocationId": "1", - "RewriteId": "1", - "NodeId": "1", - "RequestPath": "/hello", - "RequestURI": "/hello?name=lu&age=20", - "RequestMethod": "POST", - "RequestFilename": "/hello.html", - "Header": map[string]interface{}{ - "User-Agent": []string{"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"}, - }, - } - _, _ = json.Marshal(m) - } -} diff --git a/pkg/rpc/pb/model_node_price_item.pb.go b/pkg/rpc/pb/model_node_price_item.pb.go new file mode 100644 index 0000000..6af9316 --- /dev/null +++ b/pkg/rpc/pb/model_node_price_item.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_node_price_item.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type NodePriceItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + BitsFrom int64 `protobuf:"varint,5,opt,name=bitsFrom,proto3" json:"bitsFrom,omitempty"` + BitsTo int64 `protobuf:"varint,6,opt,name=bitsTo,proto3" json:"bitsTo,omitempty"` +} + +func (x *NodePriceItem) Reset() { + *x = NodePriceItem{} + if protoimpl.UnsafeEnabled { + mi := &file_model_node_price_item_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodePriceItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodePriceItem) ProtoMessage() {} + +func (x *NodePriceItem) ProtoReflect() protoreflect.Message { + mi := &file_model_node_price_item_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 NodePriceItem.ProtoReflect.Descriptor instead. +func (*NodePriceItem) Descriptor() ([]byte, []int) { + return file_model_node_price_item_proto_rawDescGZIP(), []int{0} +} + +func (x *NodePriceItem) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *NodePriceItem) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *NodePriceItem) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NodePriceItem) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *NodePriceItem) GetBitsFrom() int64 { + if x != nil { + return x.BitsFrom + } + return 0 +} + +func (x *NodePriceItem) GetBitsTo() int64 { + if x != nil { + return x.BitsTo + } + return 0 +} + +var File_model_node_price_item_proto protoreflect.FileDescriptor + +var file_model_node_price_item_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, + 0x62, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x62, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x62, + 0x69, 0x74, 0x73, 0x54, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x69, 0x74, + 0x73, 0x54, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_model_node_price_item_proto_rawDescOnce sync.Once + file_model_node_price_item_proto_rawDescData = file_model_node_price_item_proto_rawDesc +) + +func file_model_node_price_item_proto_rawDescGZIP() []byte { + file_model_node_price_item_proto_rawDescOnce.Do(func() { + file_model_node_price_item_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_node_price_item_proto_rawDescData) + }) + return file_model_node_price_item_proto_rawDescData +} + +var file_model_node_price_item_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_node_price_item_proto_goTypes = []interface{}{ + (*NodePriceItem)(nil), // 0: pb.NodePriceItem +} +var file_model_node_price_item_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_model_node_price_item_proto_init() } +func file_model_node_price_item_proto_init() { + if File_model_node_price_item_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_node_price_item_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodePriceItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_node_price_item_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_node_price_item_proto_goTypes, + DependencyIndexes: file_model_node_price_item_proto_depIdxs, + MessageInfos: file_model_node_price_item_proto_msgTypes, + }.Build() + File_model_node_price_item_proto = out.File + file_model_node_price_item_proto_rawDesc = nil + file_model_node_price_item_proto_goTypes = nil + file_model_node_price_item_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/model_node_region.pb.go b/pkg/rpc/pb/model_node_region.pb.go index 158f93a..ac7bb8d 100644 --- a/pkg/rpc/pb/model_node_region.pb.go +++ b/pkg/rpc/pb/model_node_region.pb.go @@ -30,9 +30,10 @@ type NodeRegion struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + PricesJSON []byte `protobuf:"bytes,4,opt,name=pricesJSON,proto3" json:"pricesJSON,omitempty"` } func (x *NodeRegion) Reset() { @@ -88,16 +89,25 @@ func (x *NodeRegion) GetName() string { return "" } +func (x *NodeRegion) GetPricesJSON() []byte { + if x != nil { + return x.PricesJSON + } + return nil +} + var File_model_node_region_proto protoreflect.FileDescriptor var file_model_node_region_proto_rawDesc = []byte{ 0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x44, 0x0a, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x64, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x4a, 0x53, 0x4f, + 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x4a, + 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/pkg/rpc/pb/service_node_price_item.pb.go b/pkg/rpc/pb/service_node_price_item.pb.go new file mode 100644 index 0000000..c6bba75 --- /dev/null +++ b/pkg/rpc/pb/service_node_price_item.pb.go @@ -0,0 +1,1140 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_node_price_item.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 CreateNodePriceItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + BitsFrom int64 `protobuf:"varint,3,opt,name=bitsFrom,proto3" json:"bitsFrom,omitempty"` + BitsTo int64 `protobuf:"varint,4,opt,name=bitsTo,proto3" json:"bitsTo,omitempty"` +} + +func (x *CreateNodePriceItemRequest) Reset() { + *x = CreateNodePriceItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNodePriceItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNodePriceItemRequest) ProtoMessage() {} + +func (x *CreateNodePriceItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 CreateNodePriceItemRequest.ProtoReflect.Descriptor instead. +func (*CreateNodePriceItemRequest) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateNodePriceItemRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateNodePriceItemRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *CreateNodePriceItemRequest) GetBitsFrom() int64 { + if x != nil { + return x.BitsFrom + } + return 0 +} + +func (x *CreateNodePriceItemRequest) GetBitsTo() int64 { + if x != nil { + return x.BitsTo + } + return 0 +} + +type CreateNodePriceItemResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItemId int64 `protobuf:"varint,1,opt,name=NodePriceItemId,proto3" json:"NodePriceItemId,omitempty"` +} + +func (x *CreateNodePriceItemResponse) Reset() { + *x = CreateNodePriceItemResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNodePriceItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNodePriceItemResponse) ProtoMessage() {} + +func (x *CreateNodePriceItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 CreateNodePriceItemResponse.ProtoReflect.Descriptor instead. +func (*CreateNodePriceItemResponse) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateNodePriceItemResponse) GetNodePriceItemId() int64 { + if x != nil { + return x.NodePriceItemId + } + return 0 +} + +// 修改区域价格 +type UpdateNodePriceItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItemId int64 `protobuf:"varint,1,opt,name=NodePriceItemId,proto3" json:"NodePriceItemId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"` + BitsFrom int64 `protobuf:"varint,4,opt,name=bitsFrom,proto3" json:"bitsFrom,omitempty"` + BitsTo int64 `protobuf:"varint,5,opt,name=bitsTo,proto3" json:"bitsTo,omitempty"` +} + +func (x *UpdateNodePriceItemRequest) Reset() { + *x = UpdateNodePriceItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNodePriceItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNodePriceItemRequest) ProtoMessage() {} + +func (x *UpdateNodePriceItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 UpdateNodePriceItemRequest.ProtoReflect.Descriptor instead. +func (*UpdateNodePriceItemRequest) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateNodePriceItemRequest) GetNodePriceItemId() int64 { + if x != nil { + return x.NodePriceItemId + } + return 0 +} + +func (x *UpdateNodePriceItemRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateNodePriceItemRequest) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *UpdateNodePriceItemRequest) GetBitsFrom() int64 { + if x != nil { + return x.BitsFrom + } + return 0 +} + +func (x *UpdateNodePriceItemRequest) GetBitsTo() int64 { + if x != nil { + return x.BitsTo + } + return 0 +} + +// 删除区域价格 +type DeleteNodePriceItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItemId int64 `protobuf:"varint,1,opt,name=NodePriceItemId,proto3" json:"NodePriceItemId,omitempty"` +} + +func (x *DeleteNodePriceItemRequest) Reset() { + *x = DeleteNodePriceItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNodePriceItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNodePriceItemRequest) ProtoMessage() {} + +func (x *DeleteNodePriceItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 DeleteNodePriceItemRequest.ProtoReflect.Descriptor instead. +func (*DeleteNodePriceItemRequest) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteNodePriceItemRequest) GetNodePriceItemId() int64 { + if x != nil { + return x.NodePriceItemId + } + return 0 +} + +// 查找所有区域价格 +type FindAllEnabledNodePriceItemsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *FindAllEnabledNodePriceItemsRequest) Reset() { + *x = FindAllEnabledNodePriceItemsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledNodePriceItemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledNodePriceItemsRequest) ProtoMessage() {} + +func (x *FindAllEnabledNodePriceItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 FindAllEnabledNodePriceItemsRequest.ProtoReflect.Descriptor instead. +func (*FindAllEnabledNodePriceItemsRequest) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{4} +} + +func (x *FindAllEnabledNodePriceItemsRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +type FindAllEnabledNodePriceItemsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItems []*NodePriceItem `protobuf:"bytes,1,rep,name=NodePriceItems,proto3" json:"NodePriceItems,omitempty"` +} + +func (x *FindAllEnabledNodePriceItemsResponse) Reset() { + *x = FindAllEnabledNodePriceItemsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledNodePriceItemsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledNodePriceItemsResponse) ProtoMessage() {} + +func (x *FindAllEnabledNodePriceItemsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 FindAllEnabledNodePriceItemsResponse.ProtoReflect.Descriptor instead. +func (*FindAllEnabledNodePriceItemsResponse) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{5} +} + +func (x *FindAllEnabledNodePriceItemsResponse) GetNodePriceItems() []*NodePriceItem { + if x != nil { + return x.NodePriceItems + } + return nil +} + +// 查找所有启用的区域价格 +type FindAllEnabledAndOnNodePriceItemsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *FindAllEnabledAndOnNodePriceItemsRequest) Reset() { + *x = FindAllEnabledAndOnNodePriceItemsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledAndOnNodePriceItemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledAndOnNodePriceItemsRequest) ProtoMessage() {} + +func (x *FindAllEnabledAndOnNodePriceItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 FindAllEnabledAndOnNodePriceItemsRequest.ProtoReflect.Descriptor instead. +func (*FindAllEnabledAndOnNodePriceItemsRequest) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{6} +} + +func (x *FindAllEnabledAndOnNodePriceItemsRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +type FindAllEnabledAndOnNodePriceItemsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItems []*NodePriceItem `protobuf:"bytes,1,rep,name=NodePriceItems,proto3" json:"NodePriceItems,omitempty"` +} + +func (x *FindAllEnabledAndOnNodePriceItemsResponse) Reset() { + *x = FindAllEnabledAndOnNodePriceItemsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledAndOnNodePriceItemsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledAndOnNodePriceItemsResponse) ProtoMessage() {} + +func (x *FindAllEnabledAndOnNodePriceItemsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 FindAllEnabledAndOnNodePriceItemsResponse.ProtoReflect.Descriptor instead. +func (*FindAllEnabledAndOnNodePriceItemsResponse) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{7} +} + +func (x *FindAllEnabledAndOnNodePriceItemsResponse) GetNodePriceItems() []*NodePriceItem { + if x != nil { + return x.NodePriceItems + } + return nil +} + +// 查找单个区域价格信息 +type FindEnabledNodePriceItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItemId int64 `protobuf:"varint,1,opt,name=NodePriceItemId,proto3" json:"NodePriceItemId,omitempty"` +} + +func (x *FindEnabledNodePriceItemRequest) Reset() { + *x = FindEnabledNodePriceItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledNodePriceItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledNodePriceItemRequest) ProtoMessage() {} + +func (x *FindEnabledNodePriceItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 FindEnabledNodePriceItemRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledNodePriceItemRequest) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{8} +} + +func (x *FindEnabledNodePriceItemRequest) GetNodePriceItemId() int64 { + if x != nil { + return x.NodePriceItemId + } + return 0 +} + +type FindEnabledNodePriceItemResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodePriceItem *NodePriceItem `protobuf:"bytes,1,opt,name=NodePriceItem,proto3" json:"NodePriceItem,omitempty"` +} + +func (x *FindEnabledNodePriceItemResponse) Reset() { + *x = FindEnabledNodePriceItemResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_price_item_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledNodePriceItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledNodePriceItemResponse) ProtoMessage() {} + +func (x *FindEnabledNodePriceItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_node_price_item_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 FindEnabledNodePriceItemResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledNodePriceItemResponse) Descriptor() ([]byte, []int) { + return file_service_node_price_item_proto_rawDescGZIP(), []int{9} +} + +func (x *FindEnabledNodePriceItemResponse) GetNodePriceItem() *NodePriceItem { + if x != nil { + return x.NodePriceItem + } + return nil +} + +var File_service_node_price_item_proto protoreflect.FileDescriptor + +var file_service_node_price_item_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 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, 0x1a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x69, + 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x69, + 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x69, 0x74, 0x73, 0x54, 0x6f, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x69, 0x74, 0x73, 0x54, 0x6f, 0x22, 0x47, + 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, + 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x74, 0x73, + 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x69, 0x74, 0x73, + 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x69, 0x74, 0x73, 0x54, 0x6f, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x69, 0x74, 0x73, 0x54, 0x6f, 0x22, 0x46, 0x0a, 0x1a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x23, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x61, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x22, 0x3e, 0x0a, 0x28, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x22, 0x66, 0x0a, 0x29, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0e, 0x4e, 0x6f, 0x64, 0x65, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x4b, 0x0a, 0x1f, 0x46, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, + 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x4e, + 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x32, 0xd9, 0x04, 0x0a, 0x14, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, + 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1e, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x13, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x71, 0x0a, 0x1c, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, + 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x21, 0x66, 0x69, 0x6e, 0x64, 0x41, + 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2c, 0x2e, 0x70, + 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, + 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x49, 0x74, 0x65, 0x6d, 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_node_price_item_proto_rawDescOnce sync.Once + file_service_node_price_item_proto_rawDescData = file_service_node_price_item_proto_rawDesc +) + +func file_service_node_price_item_proto_rawDescGZIP() []byte { + file_service_node_price_item_proto_rawDescOnce.Do(func() { + file_service_node_price_item_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_node_price_item_proto_rawDescData) + }) + return file_service_node_price_item_proto_rawDescData +} + +var file_service_node_price_item_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_service_node_price_item_proto_goTypes = []interface{}{ + (*CreateNodePriceItemRequest)(nil), // 0: pb.CreateNodePriceItemRequest + (*CreateNodePriceItemResponse)(nil), // 1: pb.CreateNodePriceItemResponse + (*UpdateNodePriceItemRequest)(nil), // 2: pb.UpdateNodePriceItemRequest + (*DeleteNodePriceItemRequest)(nil), // 3: pb.DeleteNodePriceItemRequest + (*FindAllEnabledNodePriceItemsRequest)(nil), // 4: pb.FindAllEnabledNodePriceItemsRequest + (*FindAllEnabledNodePriceItemsResponse)(nil), // 5: pb.FindAllEnabledNodePriceItemsResponse + (*FindAllEnabledAndOnNodePriceItemsRequest)(nil), // 6: pb.FindAllEnabledAndOnNodePriceItemsRequest + (*FindAllEnabledAndOnNodePriceItemsResponse)(nil), // 7: pb.FindAllEnabledAndOnNodePriceItemsResponse + (*FindEnabledNodePriceItemRequest)(nil), // 8: pb.FindEnabledNodePriceItemRequest + (*FindEnabledNodePriceItemResponse)(nil), // 9: pb.FindEnabledNodePriceItemResponse + (*NodePriceItem)(nil), // 10: pb.NodePriceItem + (*RPCSuccess)(nil), // 11: pb.RPCSuccess +} +var file_service_node_price_item_proto_depIdxs = []int32{ + 10, // 0: pb.FindAllEnabledNodePriceItemsResponse.NodePriceItems:type_name -> pb.NodePriceItem + 10, // 1: pb.FindAllEnabledAndOnNodePriceItemsResponse.NodePriceItems:type_name -> pb.NodePriceItem + 10, // 2: pb.FindEnabledNodePriceItemResponse.NodePriceItem:type_name -> pb.NodePriceItem + 0, // 3: pb.NodePriceItemService.createNodePriceItem:input_type -> pb.CreateNodePriceItemRequest + 2, // 4: pb.NodePriceItemService.updateNodePriceItem:input_type -> pb.UpdateNodePriceItemRequest + 3, // 5: pb.NodePriceItemService.deleteNodePriceItem:input_type -> pb.DeleteNodePriceItemRequest + 4, // 6: pb.NodePriceItemService.findAllEnabledNodePriceItems:input_type -> pb.FindAllEnabledNodePriceItemsRequest + 6, // 7: pb.NodePriceItemService.findAllEnabledAndOnNodePriceItems:input_type -> pb.FindAllEnabledAndOnNodePriceItemsRequest + 8, // 8: pb.NodePriceItemService.findEnabledNodePriceItem:input_type -> pb.FindEnabledNodePriceItemRequest + 1, // 9: pb.NodePriceItemService.createNodePriceItem:output_type -> pb.CreateNodePriceItemResponse + 11, // 10: pb.NodePriceItemService.updateNodePriceItem:output_type -> pb.RPCSuccess + 11, // 11: pb.NodePriceItemService.deleteNodePriceItem:output_type -> pb.RPCSuccess + 5, // 12: pb.NodePriceItemService.findAllEnabledNodePriceItems:output_type -> pb.FindAllEnabledNodePriceItemsResponse + 7, // 13: pb.NodePriceItemService.findAllEnabledAndOnNodePriceItems:output_type -> pb.FindAllEnabledAndOnNodePriceItemsResponse + 9, // 14: pb.NodePriceItemService.findEnabledNodePriceItem:output_type -> pb.FindEnabledNodePriceItemResponse + 9, // [9:15] is the sub-list for method output_type + 3, // [3:9] 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 +} + +func init() { file_service_node_price_item_proto_init() } +func file_service_node_price_item_proto_init() { + if File_service_node_price_item_proto != nil { + return + } + file_rpc_messages_proto_init() + file_model_node_price_item_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_node_price_item_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNodePriceItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNodePriceItemResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNodePriceItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNodePriceItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledNodePriceItemsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledNodePriceItemsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledAndOnNodePriceItemsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledAndOnNodePriceItemsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledNodePriceItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_node_price_item_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledNodePriceItemResponse); 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_node_price_item_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_node_price_item_proto_goTypes, + DependencyIndexes: file_service_node_price_item_proto_depIdxs, + MessageInfos: file_service_node_price_item_proto_msgTypes, + }.Build() + File_service_node_price_item_proto = out.File + file_service_node_price_item_proto_rawDesc = nil + file_service_node_price_item_proto_goTypes = nil + file_service_node_price_item_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 + +// NodePriceItemServiceClient is the client API for NodePriceItemService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type NodePriceItemServiceClient interface { + // 创建区域价格 + CreateNodePriceItem(ctx context.Context, in *CreateNodePriceItemRequest, opts ...grpc.CallOption) (*CreateNodePriceItemResponse, error) + // 修改区域价格 + UpdateNodePriceItem(ctx context.Context, in *UpdateNodePriceItemRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 删除区域价格 + DeleteNodePriceItem(ctx context.Context, in *DeleteNodePriceItemRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 查找所有区域价格 + FindAllEnabledNodePriceItems(ctx context.Context, in *FindAllEnabledNodePriceItemsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodePriceItemsResponse, error) + // 查找所有启用的区域价格 + FindAllEnabledAndOnNodePriceItems(ctx context.Context, in *FindAllEnabledAndOnNodePriceItemsRequest, opts ...grpc.CallOption) (*FindAllEnabledAndOnNodePriceItemsResponse, error) + // 查找单个区域信息 + FindEnabledNodePriceItem(ctx context.Context, in *FindEnabledNodePriceItemRequest, opts ...grpc.CallOption) (*FindEnabledNodePriceItemResponse, error) +} + +type nodePriceItemServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNodePriceItemServiceClient(cc grpc.ClientConnInterface) NodePriceItemServiceClient { + return &nodePriceItemServiceClient{cc} +} + +func (c *nodePriceItemServiceClient) CreateNodePriceItem(ctx context.Context, in *CreateNodePriceItemRequest, opts ...grpc.CallOption) (*CreateNodePriceItemResponse, error) { + out := new(CreateNodePriceItemResponse) + err := c.cc.Invoke(ctx, "/pb.NodePriceItemService/createNodePriceItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodePriceItemServiceClient) UpdateNodePriceItem(ctx context.Context, in *UpdateNodePriceItemRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NodePriceItemService/updateNodePriceItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodePriceItemServiceClient) DeleteNodePriceItem(ctx context.Context, in *DeleteNodePriceItemRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NodePriceItemService/deleteNodePriceItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodePriceItemServiceClient) FindAllEnabledNodePriceItems(ctx context.Context, in *FindAllEnabledNodePriceItemsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodePriceItemsResponse, error) { + out := new(FindAllEnabledNodePriceItemsResponse) + err := c.cc.Invoke(ctx, "/pb.NodePriceItemService/findAllEnabledNodePriceItems", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodePriceItemServiceClient) FindAllEnabledAndOnNodePriceItems(ctx context.Context, in *FindAllEnabledAndOnNodePriceItemsRequest, opts ...grpc.CallOption) (*FindAllEnabledAndOnNodePriceItemsResponse, error) { + out := new(FindAllEnabledAndOnNodePriceItemsResponse) + err := c.cc.Invoke(ctx, "/pb.NodePriceItemService/findAllEnabledAndOnNodePriceItems", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodePriceItemServiceClient) FindEnabledNodePriceItem(ctx context.Context, in *FindEnabledNodePriceItemRequest, opts ...grpc.CallOption) (*FindEnabledNodePriceItemResponse, error) { + out := new(FindEnabledNodePriceItemResponse) + err := c.cc.Invoke(ctx, "/pb.NodePriceItemService/findEnabledNodePriceItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NodePriceItemServiceServer is the server API for NodePriceItemService service. +type NodePriceItemServiceServer interface { + // 创建区域价格 + CreateNodePriceItem(context.Context, *CreateNodePriceItemRequest) (*CreateNodePriceItemResponse, error) + // 修改区域价格 + UpdateNodePriceItem(context.Context, *UpdateNodePriceItemRequest) (*RPCSuccess, error) + // 删除区域价格 + DeleteNodePriceItem(context.Context, *DeleteNodePriceItemRequest) (*RPCSuccess, error) + // 查找所有区域价格 + FindAllEnabledNodePriceItems(context.Context, *FindAllEnabledNodePriceItemsRequest) (*FindAllEnabledNodePriceItemsResponse, error) + // 查找所有启用的区域价格 + FindAllEnabledAndOnNodePriceItems(context.Context, *FindAllEnabledAndOnNodePriceItemsRequest) (*FindAllEnabledAndOnNodePriceItemsResponse, error) + // 查找单个区域信息 + FindEnabledNodePriceItem(context.Context, *FindEnabledNodePriceItemRequest) (*FindEnabledNodePriceItemResponse, error) +} + +// UnimplementedNodePriceItemServiceServer can be embedded to have forward compatible implementations. +type UnimplementedNodePriceItemServiceServer struct { +} + +func (*UnimplementedNodePriceItemServiceServer) CreateNodePriceItem(context.Context, *CreateNodePriceItemRequest) (*CreateNodePriceItemResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNodePriceItem not implemented") +} +func (*UnimplementedNodePriceItemServiceServer) UpdateNodePriceItem(context.Context, *UpdateNodePriceItemRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNodePriceItem not implemented") +} +func (*UnimplementedNodePriceItemServiceServer) DeleteNodePriceItem(context.Context, *DeleteNodePriceItemRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNodePriceItem not implemented") +} +func (*UnimplementedNodePriceItemServiceServer) FindAllEnabledNodePriceItems(context.Context, *FindAllEnabledNodePriceItemsRequest) (*FindAllEnabledNodePriceItemsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNodePriceItems not implemented") +} +func (*UnimplementedNodePriceItemServiceServer) FindAllEnabledAndOnNodePriceItems(context.Context, *FindAllEnabledAndOnNodePriceItemsRequest) (*FindAllEnabledAndOnNodePriceItemsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledAndOnNodePriceItems not implemented") +} +func (*UnimplementedNodePriceItemServiceServer) FindEnabledNodePriceItem(context.Context, *FindEnabledNodePriceItemRequest) (*FindEnabledNodePriceItemResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledNodePriceItem not implemented") +} + +func RegisterNodePriceItemServiceServer(s *grpc.Server, srv NodePriceItemServiceServer) { + s.RegisterService(&_NodePriceItemService_serviceDesc, srv) +} + +func _NodePriceItemService_CreateNodePriceItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNodePriceItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodePriceItemServiceServer).CreateNodePriceItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodePriceItemService/CreateNodePriceItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodePriceItemServiceServer).CreateNodePriceItem(ctx, req.(*CreateNodePriceItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodePriceItemService_UpdateNodePriceItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNodePriceItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodePriceItemServiceServer).UpdateNodePriceItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodePriceItemService/UpdateNodePriceItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodePriceItemServiceServer).UpdateNodePriceItem(ctx, req.(*UpdateNodePriceItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodePriceItemService_DeleteNodePriceItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNodePriceItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodePriceItemServiceServer).DeleteNodePriceItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodePriceItemService/DeleteNodePriceItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodePriceItemServiceServer).DeleteNodePriceItem(ctx, req.(*DeleteNodePriceItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodePriceItemService_FindAllEnabledNodePriceItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllEnabledNodePriceItemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodePriceItemServiceServer).FindAllEnabledNodePriceItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodePriceItemService/FindAllEnabledNodePriceItems", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodePriceItemServiceServer).FindAllEnabledNodePriceItems(ctx, req.(*FindAllEnabledNodePriceItemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodePriceItemService_FindAllEnabledAndOnNodePriceItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllEnabledAndOnNodePriceItemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodePriceItemServiceServer).FindAllEnabledAndOnNodePriceItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodePriceItemService/FindAllEnabledAndOnNodePriceItems", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodePriceItemServiceServer).FindAllEnabledAndOnNodePriceItems(ctx, req.(*FindAllEnabledAndOnNodePriceItemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodePriceItemService_FindEnabledNodePriceItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledNodePriceItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodePriceItemServiceServer).FindEnabledNodePriceItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodePriceItemService/FindEnabledNodePriceItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodePriceItemServiceServer).FindEnabledNodePriceItem(ctx, req.(*FindEnabledNodePriceItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _NodePriceItemService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.NodePriceItemService", + HandlerType: (*NodePriceItemServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createNodePriceItem", + Handler: _NodePriceItemService_CreateNodePriceItem_Handler, + }, + { + MethodName: "updateNodePriceItem", + Handler: _NodePriceItemService_UpdateNodePriceItem_Handler, + }, + { + MethodName: "deleteNodePriceItem", + Handler: _NodePriceItemService_DeleteNodePriceItem_Handler, + }, + { + MethodName: "findAllEnabledNodePriceItems", + Handler: _NodePriceItemService_FindAllEnabledNodePriceItems_Handler, + }, + { + MethodName: "findAllEnabledAndOnNodePriceItems", + Handler: _NodePriceItemService_FindAllEnabledAndOnNodePriceItems_Handler, + }, + { + MethodName: "findEnabledNodePriceItem", + Handler: _NodePriceItemService_FindEnabledNodePriceItem_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_node_price_item.proto", +} diff --git a/pkg/rpc/pb/service_node_region.pb.go b/pkg/rpc/pb/service_node_region.pb.go index ddb1470..1b8a06f 100644 --- a/pkg/rpc/pb/service_node_region.pb.go +++ b/pkg/rpc/pb/service_node_region.pb.go @@ -551,6 +551,70 @@ func (x *FindEnabledNodeRegionResponse) GetNodeRegion() *NodeRegion { return nil } +// 修改价格项价格 +type UpdateNodeRegionPriceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeRegionId int64 `protobuf:"varint,1,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"` + NodeItemId int64 `protobuf:"varint,2,opt,name=nodeItemId,proto3" json:"nodeItemId,omitempty"` + Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"` +} + +func (x *UpdateNodeRegionPriceRequest) Reset() { + *x = UpdateNodeRegionPriceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_node_region_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNodeRegionPriceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNodeRegionPriceRequest) ProtoMessage() {} + +func (x *UpdateNodeRegionPriceRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_node_region_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 UpdateNodeRegionPriceRequest.ProtoReflect.Descriptor instead. +func (*UpdateNodeRegionPriceRequest) Descriptor() ([]byte, []int) { + return file_service_node_region_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateNodeRegionPriceRequest) GetNodeRegionId() int64 { + if x != nil { + return x.NodeRegionId + } + return 0 +} + +func (x *UpdateNodeRegionPriceRequest) GetNodeItemId() int64 { + if x != nil { + return x.NodeItemId + } + return 0 +} + +func (x *UpdateNodeRegionPriceRequest) GetPrice() float32 { + if x != nil { + return x.Price + } + return 0 +} + var File_service_node_region_proto protoreflect.FileDescriptor var file_service_node_region_proto_rawDesc = []byte{ @@ -605,48 +669,60 @@ var file_service_node_region_proto_rawDesc = []byte{ 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x32, 0xf2, 0x04, - 0x0a, 0x11, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, + 0x6e, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, + 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, + 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x32, 0xbd, 0x05, 0x0a, 0x11, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, + 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, + 0x10, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x68, + 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, - 0x0a, 0x1e, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x62, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, - 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, - 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e, 0x66, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, + 0x64, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, + 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5c, + 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x15, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -661,7 +737,7 @@ func file_service_node_region_proto_rawDescGZIP() []byte { return file_service_node_region_proto_rawDescData } -var file_service_node_region_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_service_node_region_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_service_node_region_proto_goTypes = []interface{}{ (*CreateNodeRegionRequest)(nil), // 0: pb.CreateNodeRegionRequest (*CreateNodeRegionResponse)(nil), // 1: pb.CreateNodeRegionResponse @@ -674,13 +750,14 @@ var file_service_node_region_proto_goTypes = []interface{}{ (*UpdateNodeRegionOrdersRequest)(nil), // 8: pb.UpdateNodeRegionOrdersRequest (*FindEnabledNodeRegionRequest)(nil), // 9: pb.FindEnabledNodeRegionRequest (*FindEnabledNodeRegionResponse)(nil), // 10: pb.FindEnabledNodeRegionResponse - (*NodeRegion)(nil), // 11: pb.NodeRegion - (*RPCSuccess)(nil), // 12: pb.RPCSuccess + (*UpdateNodeRegionPriceRequest)(nil), // 11: pb.UpdateNodeRegionPriceRequest + (*NodeRegion)(nil), // 12: pb.NodeRegion + (*RPCSuccess)(nil), // 13: pb.RPCSuccess } var file_service_node_region_proto_depIdxs = []int32{ - 11, // 0: pb.FindAllEnabledNodeRegionsResponse.nodeRegions:type_name -> pb.NodeRegion - 11, // 1: pb.FindAllEnabledAndOnNodeRegionsResponse.nodeRegions:type_name -> pb.NodeRegion - 11, // 2: pb.FindEnabledNodeRegionResponse.nodeRegion:type_name -> pb.NodeRegion + 12, // 0: pb.FindAllEnabledNodeRegionsResponse.nodeRegions:type_name -> pb.NodeRegion + 12, // 1: pb.FindAllEnabledAndOnNodeRegionsResponse.nodeRegions:type_name -> pb.NodeRegion + 12, // 2: pb.FindEnabledNodeRegionResponse.nodeRegion:type_name -> pb.NodeRegion 0, // 3: pb.NodeRegionService.createNodeRegion:input_type -> pb.CreateNodeRegionRequest 2, // 4: pb.NodeRegionService.updateNodeRegion:input_type -> pb.UpdateNodeRegionRequest 3, // 5: pb.NodeRegionService.deleteNodeRegion:input_type -> pb.DeleteNodeRegionRequest @@ -688,15 +765,17 @@ var file_service_node_region_proto_depIdxs = []int32{ 6, // 7: pb.NodeRegionService.findAllEnabledAndOnNodeRegions:input_type -> pb.FindAllEnabledAndOnNodeRegionsRequest 8, // 8: pb.NodeRegionService.updateNodeRegionOrders:input_type -> pb.UpdateNodeRegionOrdersRequest 9, // 9: pb.NodeRegionService.findEnabledNodeRegion:input_type -> pb.FindEnabledNodeRegionRequest - 1, // 10: pb.NodeRegionService.createNodeRegion:output_type -> pb.CreateNodeRegionResponse - 12, // 11: pb.NodeRegionService.updateNodeRegion:output_type -> pb.RPCSuccess - 12, // 12: pb.NodeRegionService.deleteNodeRegion:output_type -> pb.RPCSuccess - 5, // 13: pb.NodeRegionService.findAllEnabledNodeRegions:output_type -> pb.FindAllEnabledNodeRegionsResponse - 7, // 14: pb.NodeRegionService.findAllEnabledAndOnNodeRegions:output_type -> pb.FindAllEnabledAndOnNodeRegionsResponse - 12, // 15: pb.NodeRegionService.updateNodeRegionOrders:output_type -> pb.RPCSuccess - 10, // 16: pb.NodeRegionService.findEnabledNodeRegion:output_type -> pb.FindEnabledNodeRegionResponse - 10, // [10:17] is the sub-list for method output_type - 3, // [3:10] is the sub-list for method input_type + 11, // 10: pb.NodeRegionService.updateNodeRegionPrice:input_type -> pb.UpdateNodeRegionPriceRequest + 1, // 11: pb.NodeRegionService.createNodeRegion:output_type -> pb.CreateNodeRegionResponse + 13, // 12: pb.NodeRegionService.updateNodeRegion:output_type -> pb.RPCSuccess + 13, // 13: pb.NodeRegionService.deleteNodeRegion:output_type -> pb.RPCSuccess + 5, // 14: pb.NodeRegionService.findAllEnabledNodeRegions:output_type -> pb.FindAllEnabledNodeRegionsResponse + 7, // 15: pb.NodeRegionService.findAllEnabledAndOnNodeRegions:output_type -> pb.FindAllEnabledAndOnNodeRegionsResponse + 13, // 16: pb.NodeRegionService.updateNodeRegionOrders:output_type -> pb.RPCSuccess + 10, // 17: pb.NodeRegionService.findEnabledNodeRegion:output_type -> pb.FindEnabledNodeRegionResponse + 13, // 18: pb.NodeRegionService.updateNodeRegionPrice:output_type -> pb.RPCSuccess + 11, // [11:19] is the sub-list for method output_type + 3, // [3:11] 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 @@ -842,6 +921,18 @@ func file_service_node_region_proto_init() { return nil } } + file_service_node_region_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNodeRegionPriceRequest); 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{ @@ -849,7 +940,7 @@ func file_service_node_region_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_node_region_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, @@ -889,6 +980,8 @@ type NodeRegionServiceClient interface { UpdateNodeRegionOrders(ctx context.Context, in *UpdateNodeRegionOrdersRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 查找单个区域信息 FindEnabledNodeRegion(ctx context.Context, in *FindEnabledNodeRegionRequest, opts ...grpc.CallOption) (*FindEnabledNodeRegionResponse, error) + // 修改价格项价格 + UpdateNodeRegionPrice(ctx context.Context, in *UpdateNodeRegionPriceRequest, opts ...grpc.CallOption) (*RPCSuccess, error) } type nodeRegionServiceClient struct { @@ -962,6 +1055,15 @@ func (c *nodeRegionServiceClient) FindEnabledNodeRegion(ctx context.Context, in return out, nil } +func (c *nodeRegionServiceClient) UpdateNodeRegionPrice(ctx context.Context, in *UpdateNodeRegionPriceRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NodeRegionService/updateNodeRegionPrice", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NodeRegionServiceServer is the server API for NodeRegionService service. type NodeRegionServiceServer interface { // 创建区域 @@ -978,6 +1080,8 @@ type NodeRegionServiceServer interface { UpdateNodeRegionOrders(context.Context, *UpdateNodeRegionOrdersRequest) (*RPCSuccess, error) // 查找单个区域信息 FindEnabledNodeRegion(context.Context, *FindEnabledNodeRegionRequest) (*FindEnabledNodeRegionResponse, error) + // 修改价格项价格 + UpdateNodeRegionPrice(context.Context, *UpdateNodeRegionPriceRequest) (*RPCSuccess, error) } // UnimplementedNodeRegionServiceServer can be embedded to have forward compatible implementations. @@ -1005,6 +1109,9 @@ func (*UnimplementedNodeRegionServiceServer) UpdateNodeRegionOrders(context.Cont func (*UnimplementedNodeRegionServiceServer) FindEnabledNodeRegion(context.Context, *FindEnabledNodeRegionRequest) (*FindEnabledNodeRegionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindEnabledNodeRegion not implemented") } +func (*UnimplementedNodeRegionServiceServer) UpdateNodeRegionPrice(context.Context, *UpdateNodeRegionPriceRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeRegionPrice not implemented") +} func RegisterNodeRegionServiceServer(s *grpc.Server, srv NodeRegionServiceServer) { s.RegisterService(&_NodeRegionService_serviceDesc, srv) @@ -1136,6 +1243,24 @@ func _NodeRegionService_FindEnabledNodeRegion_Handler(srv interface{}, ctx conte return interceptor(ctx, in, info, handler) } +func _NodeRegionService_UpdateNodeRegionPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNodeRegionPriceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeRegionServiceServer).UpdateNodeRegionPrice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NodeRegionService/UpdateNodeRegionPrice", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeRegionServiceServer).UpdateNodeRegionPrice(ctx, req.(*UpdateNodeRegionPriceRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _NodeRegionService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.NodeRegionService", HandlerType: (*NodeRegionServiceServer)(nil), @@ -1168,6 +1293,10 @@ var _NodeRegionService_serviceDesc = grpc.ServiceDesc{ MethodName: "findEnabledNodeRegion", Handler: _NodeRegionService_FindEnabledNodeRegion_Handler, }, + { + MethodName: "updateNodeRegionPrice", + Handler: _NodeRegionService_UpdateNodeRegionPrice_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_node_region.proto", diff --git a/pkg/rpc/protos/model_node_price_item.proto b/pkg/rpc/protos/model_node_price_item.proto new file mode 100644 index 0000000..305c0c4 --- /dev/null +++ b/pkg/rpc/protos/model_node_price_item.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message NodePriceItem { + int64 id = 1; + bool isOn = 2; + string name = 3; + string type = 4; + int64 bitsFrom = 5; + int64 bitsTo = 6; +} \ No newline at end of file diff --git a/pkg/rpc/protos/model_node_region.proto b/pkg/rpc/protos/model_node_region.proto index 1fe2eb5..bd0cad1 100644 --- a/pkg/rpc/protos/model_node_region.proto +++ b/pkg/rpc/protos/model_node_region.proto @@ -7,4 +7,5 @@ message NodeRegion { int64 id = 1; bool isOn = 2; string name = 3; + bytes pricesJSON = 4; } \ No newline at end of file diff --git a/pkg/rpc/protos/service_node_price_item.proto b/pkg/rpc/protos/service_node_price_item.proto new file mode 100644 index 0000000..e4264fc --- /dev/null +++ b/pkg/rpc/protos/service_node_price_item.proto @@ -0,0 +1,81 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "rpc_messages.proto"; +import "model_node_price_item.proto"; + +// 节点区域定价相关服务 +service NodePriceItemService { + // 创建区域价格 + rpc createNodePriceItem (CreateNodePriceItemRequest) returns (CreateNodePriceItemResponse); + + // 修改区域价格 + rpc updateNodePriceItem (UpdateNodePriceItemRequest) returns (RPCSuccess); + + // 删除区域价格 + rpc deleteNodePriceItem (DeleteNodePriceItemRequest) returns (RPCSuccess); + + // 查找所有区域价格 + rpc findAllEnabledNodePriceItems (FindAllEnabledNodePriceItemsRequest) returns (FindAllEnabledNodePriceItemsResponse); + + // 查找所有启用的区域价格 + rpc findAllEnabledAndOnNodePriceItems (FindAllEnabledAndOnNodePriceItemsRequest) returns (FindAllEnabledAndOnNodePriceItemsResponse); + + // 查找单个区域信息 + rpc findEnabledNodePriceItem (FindEnabledNodePriceItemRequest) returns (FindEnabledNodePriceItemResponse); +} + +// 创建区域价格 +message CreateNodePriceItemRequest { + string name = 1; + string type = 2; + int64 bitsFrom = 3; + int64 bitsTo = 4; +} + +message CreateNodePriceItemResponse { + int64 NodePriceItemId = 1; +} + +// 修改区域价格 +message UpdateNodePriceItemRequest { + int64 NodePriceItemId = 1; + string name = 2; + bool isOn = 3; + int64 bitsFrom = 4; + int64 bitsTo = 5; +} + +// 删除区域价格 +message DeleteNodePriceItemRequest { + int64 NodePriceItemId = 1; +} + +// 查找所有区域价格 +message FindAllEnabledNodePriceItemsRequest { + string type = 1; +} + +message FindAllEnabledNodePriceItemsResponse { + repeated NodePriceItem NodePriceItems = 1; +} + +// 查找所有启用的区域价格 +message FindAllEnabledAndOnNodePriceItemsRequest { + string type = 1; +} + +message FindAllEnabledAndOnNodePriceItemsResponse { + repeated NodePriceItem NodePriceItems = 1; +} + +// 查找单个区域价格信息 +message FindEnabledNodePriceItemRequest { + int64 NodePriceItemId = 1; +} + +message FindEnabledNodePriceItemResponse { + NodePriceItem NodePriceItem = 1; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_node_region.proto b/pkg/rpc/protos/service_node_region.proto index 8b334fd..98f08d5 100644 --- a/pkg/rpc/protos/service_node_region.proto +++ b/pkg/rpc/protos/service_node_region.proto @@ -28,6 +28,9 @@ service NodeRegionService { // 查找单个区域信息 rpc findEnabledNodeRegion (FindEnabledNodeRegionRequest) returns (FindEnabledNodeRegionResponse); + + // 修改价格项价格 + rpc updateNodeRegionPrice (UpdateNodeRegionPriceRequest) returns (RPCSuccess); } // 创建区域 @@ -81,4 +84,11 @@ message FindEnabledNodeRegionRequest { message FindEnabledNodeRegionResponse { NodeRegion nodeRegion = 1; +} + +// 修改价格项价格 +message UpdateNodeRegionPriceRequest { + int64 nodeRegionId = 1; + int64 nodeItemId = 2; + float price = 3; } \ No newline at end of file