可以清理数据库节点的数据表

This commit is contained in:
GoEdgeLab
2021-01-19 22:05:54 +08:00
parent f43745d35f
commit f13c4a9a14
4 changed files with 701 additions and 152 deletions

View File

@@ -40,6 +40,7 @@ type DBNode struct {
Username string `protobuf:"bytes,8,opt,name=username,proto3" json:"username,omitempty"`
Password string `protobuf:"bytes,9,opt,name=password,proto3" json:"password,omitempty"`
Charset string `protobuf:"bytes,10,opt,name=charset,proto3" json:"charset,omitempty"`
Status *DBNodeStatus `protobuf:"bytes,30,opt,name=status,proto3" json:"status,omitempty"`
}
func (x *DBNode) Reset() {
@@ -144,11 +145,81 @@ func (x *DBNode) GetCharset() string {
return ""
}
func (x *DBNode) GetStatus() *DBNodeStatus {
if x != nil {
return x.Status
}
return nil
}
type DBNodeStatus struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IsOk bool `protobuf:"varint,1,opt,name=isOk,proto3" json:"isOk,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *DBNodeStatus) Reset() {
*x = DBNodeStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_model_db_node_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBNodeStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBNodeStatus) ProtoMessage() {}
func (x *DBNodeStatus) ProtoReflect() protoreflect.Message {
mi := &file_model_db_node_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 DBNodeStatus.ProtoReflect.Descriptor instead.
func (*DBNodeStatus) Descriptor() ([]byte, []int) {
return file_model_db_node_proto_rawDescGZIP(), []int{1}
}
func (x *DBNodeStatus) GetIsOk() bool {
if x != nil {
return x.IsOk
}
return false
}
func (x *DBNodeStatus) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *DBNodeStatus) GetError() string {
if x != nil {
return x.Error
}
return ""
}
var File_model_db_node_proto protoreflect.FileDescriptor
var file_model_db_node_proto_rawDesc = []byte{
0x0a, 0x13, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x44, 0x42,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xa2, 0x02, 0x0a, 0x06, 0x44, 0x42,
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x02, 0x69, 0x64, 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,
@@ -164,8 +235,15 @@ var file_model_db_node_proto_rawDesc = []byte{
0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68,
0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61,
0x72, 0x73, 0x65, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x72, 0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x1e,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c,
0x0a, 0x0c, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12,
0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73,
0x4f, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -180,16 +258,18 @@ func file_model_db_node_proto_rawDescGZIP() []byte {
return file_model_db_node_proto_rawDescData
}
var file_model_db_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_model_db_node_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_model_db_node_proto_goTypes = []interface{}{
(*DBNode)(nil), // 0: pb.DBNode
(*DBNodeStatus)(nil), // 1: pb.DBNodeStatus
}
var file_model_db_node_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
1, // 0: pb.DBNode.status:type_name -> pb.DBNodeStatus
1, // [1:1] is the sub-list for method output_type
1, // [1:1] 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_model_db_node_proto_init() }
@@ -210,6 +290,18 @@ func file_model_db_node_proto_init() {
return nil
}
}
file_model_db_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBNodeStatus); 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{
@@ -217,7 +309,7 @@ func file_model_db_node_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_model_db_node_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},

View File

@@ -146,7 +146,7 @@ type CreateDBNodeResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,omitempty"`
}
func (x *CreateDBNodeResponse) Reset() {
@@ -181,9 +181,9 @@ func (*CreateDBNodeResponse) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{1}
}
func (x *CreateDBNodeResponse) GetNodeId() int64 {
func (x *CreateDBNodeResponse) GetDbNodeId() int64 {
if x != nil {
return x.NodeId
return x.DbNodeId
}
return 0
}
@@ -194,7 +194,7 @@ type UpdateDBNodeRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,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"`
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
@@ -238,9 +238,9 @@ func (*UpdateDBNodeRequest) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{2}
}
func (x *UpdateDBNodeRequest) GetNodeId() int64 {
func (x *UpdateDBNodeRequest) GetDbNodeId() int64 {
if x != nil {
return x.NodeId
return x.DbNodeId
}
return 0
}
@@ -314,7 +314,7 @@ type DeleteDBNodeRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,omitempty"`
}
func (x *DeleteDBNodeRequest) Reset() {
@@ -349,9 +349,9 @@ func (*DeleteDBNodeRequest) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{3}
}
func (x *DeleteDBNodeRequest) GetNodeId() int64 {
func (x *DeleteDBNodeRequest) GetDbNodeId() int64 {
if x != nil {
return x.NodeId
return x.DbNodeId
}
return 0
}
@@ -456,7 +456,7 @@ type ListEnabledDBNodesResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Nodes []*DBNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
DbNodes []*DBNode `protobuf:"bytes,1,rep,name=dbNodes,proto3" json:"dbNodes,omitempty"`
}
func (x *ListEnabledDBNodesResponse) Reset() {
@@ -491,9 +491,9 @@ func (*ListEnabledDBNodesResponse) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{6}
}
func (x *ListEnabledDBNodesResponse) GetNodes() []*DBNode {
func (x *ListEnabledDBNodesResponse) GetDbNodes() []*DBNode {
if x != nil {
return x.Nodes
return x.DbNodes
}
return nil
}
@@ -504,7 +504,7 @@ type FindEnabledDBNodeRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,omitempty"`
}
func (x *FindEnabledDBNodeRequest) Reset() {
@@ -539,9 +539,9 @@ func (*FindEnabledDBNodeRequest) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{7}
}
func (x *FindEnabledDBNodeRequest) GetNodeId() int64 {
func (x *FindEnabledDBNodeRequest) GetDbNodeId() int64 {
if x != nil {
return x.NodeId
return x.DbNodeId
}
return 0
}
@@ -551,7 +551,7 @@ type FindEnabledDBNodeResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Node *DBNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
DbNode *DBNode `protobuf:"bytes,1,opt,name=dbNode,proto3" json:"dbNode,omitempty"`
}
func (x *FindEnabledDBNodeResponse) Reset() {
@@ -586,13 +586,220 @@ func (*FindEnabledDBNodeResponse) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{8}
}
func (x *FindEnabledDBNodeResponse) GetNode() *DBNode {
func (x *FindEnabledDBNodeResponse) GetDbNode() *DBNode {
if x != nil {
return x.Node
return x.DbNode
}
return nil
}
// 获取所有表信息
type FindAllDBNodeTablesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,omitempty"`
}
func (x *FindAllDBNodeTablesRequest) Reset() {
*x = FindAllDBNodeTablesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_db_node_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllDBNodeTablesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllDBNodeTablesRequest) ProtoMessage() {}
func (x *FindAllDBNodeTablesRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_db_node_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 FindAllDBNodeTablesRequest.ProtoReflect.Descriptor instead.
func (*FindAllDBNodeTablesRequest) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{9}
}
func (x *FindAllDBNodeTablesRequest) GetDbNodeId() int64 {
if x != nil {
return x.DbNodeId
}
return 0
}
type FindAllDBNodeTablesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DbNodeTables []*DBTable `protobuf:"bytes,1,rep,name=dbNodeTables,proto3" json:"dbNodeTables,omitempty"`
}
func (x *FindAllDBNodeTablesResponse) Reset() {
*x = FindAllDBNodeTablesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_db_node_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllDBNodeTablesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllDBNodeTablesResponse) ProtoMessage() {}
func (x *FindAllDBNodeTablesResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_db_node_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 FindAllDBNodeTablesResponse.ProtoReflect.Descriptor instead.
func (*FindAllDBNodeTablesResponse) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{10}
}
func (x *FindAllDBNodeTablesResponse) GetDbNodeTables() []*DBTable {
if x != nil {
return x.DbNodeTables
}
return nil
}
// 删除表
type DeleteDBNodeTableRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,omitempty"`
DbNodeTable string `protobuf:"bytes,2,opt,name=dbNodeTable,proto3" json:"dbNodeTable,omitempty"`
}
func (x *DeleteDBNodeTableRequest) Reset() {
*x = DeleteDBNodeTableRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_db_node_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteDBNodeTableRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteDBNodeTableRequest) ProtoMessage() {}
func (x *DeleteDBNodeTableRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_db_node_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 DeleteDBNodeTableRequest.ProtoReflect.Descriptor instead.
func (*DeleteDBNodeTableRequest) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{11}
}
func (x *DeleteDBNodeTableRequest) GetDbNodeId() int64 {
if x != nil {
return x.DbNodeId
}
return 0
}
func (x *DeleteDBNodeTableRequest) GetDbNodeTable() string {
if x != nil {
return x.DbNodeTable
}
return ""
}
// 清空表
type TruncateDBNodeTableRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DbNodeId int64 `protobuf:"varint,1,opt,name=dbNodeId,proto3" json:"dbNodeId,omitempty"`
DbNodeTable string `protobuf:"bytes,2,opt,name=dbNodeTable,proto3" json:"dbNodeTable,omitempty"`
}
func (x *TruncateDBNodeTableRequest) Reset() {
*x = TruncateDBNodeTableRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_db_node_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TruncateDBNodeTableRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TruncateDBNodeTableRequest) ProtoMessage() {}
func (x *TruncateDBNodeTableRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_db_node_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TruncateDBNodeTableRequest.ProtoReflect.Descriptor instead.
func (*TruncateDBNodeTableRequest) Descriptor() ([]byte, []int) {
return file_service_db_node_proto_rawDescGZIP(), []int{12}
}
func (x *TruncateDBNodeTableRequest) GetDbNodeId() int64 {
if x != nil {
return x.DbNodeId
}
return 0
}
func (x *TruncateDBNodeTableRequest) GetDbNodeTable() string {
if x != nil {
return x.DbNodeTable
}
return ""
}
var File_service_db_node_proto protoreflect.FileDescriptor
var file_service_db_node_proto_rawDesc = []byte{
@@ -600,91 +807,128 @@ var file_service_db_node_proto_rawDesc = []byte{
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x13, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 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, 0xf5, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44,
0x42, 0x4e, 0x6f, 0x64, 0x65, 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, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f,
0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x22, 0x2e, 0x0a, 0x14,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x8d, 0x02, 0x0a,
0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 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, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f,
0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x22, 0x2d, 0x0a, 0x13,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42,
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x19,
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64,
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, 0x3e, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05,
0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x32, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x19, 0x46, 0x69, 0x6e,
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65,
0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32, 0xbe, 0x03, 0x0a, 0x0d, 0x44, 0x42, 0x4e, 0x6f, 0x64,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e,
0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42,
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a,
0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f,
0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e,
0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44,
0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x62, 0x5f, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x01, 0x0a, 0x13, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 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, 0x12, 0x0a, 0x04,
0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72,
0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73,
0x65, 0x74, 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f,
0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62,
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x62,
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x91, 0x02, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 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, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08,
0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x22, 0x31, 0x0a, 0x13, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x1f, 0x0a,
0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47,
0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e,
0x6f, 0x64, 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, 0x42, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x4e, 0x6f,
0x64, 0x65, 0x52, 0x07, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x18, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64,
0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64,
0x65, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x22, 0x0a, 0x06, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x64, 0x62,
0x4e, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x44,
0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x4e,
0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a,
0x0c, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x54, 0x61, 0x62, 0x6c, 0x65,
0x52, 0x0c, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x58,
0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61,
0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62,
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x62,
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65,
0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x62, 0x4e,
0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x1a, 0x54, 0x72, 0x75, 0x6e,
0x63, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65,
0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x32, 0xa0, 0x05, 0x0a, 0x0d, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f,
0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42,
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x16, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42,
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50,
0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53,
0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e,
0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 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, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54,
0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a,
0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62,
0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42,
0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 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, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f,
0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x75,
0x6e, 0x63, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 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,
}
@@ -700,7 +944,7 @@ func file_service_db_node_proto_rawDescGZIP() []byte {
return file_service_db_node_proto_rawDescData
}
var file_service_db_node_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_service_db_node_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_service_db_node_proto_goTypes = []interface{}{
(*CreateDBNodeRequest)(nil), // 0: pb.CreateDBNodeRequest
(*CreateDBNodeResponse)(nil), // 1: pb.CreateDBNodeResponse
@@ -711,30 +955,42 @@ var file_service_db_node_proto_goTypes = []interface{}{
(*ListEnabledDBNodesResponse)(nil), // 6: pb.ListEnabledDBNodesResponse
(*FindEnabledDBNodeRequest)(nil), // 7: pb.FindEnabledDBNodeRequest
(*FindEnabledDBNodeResponse)(nil), // 8: pb.FindEnabledDBNodeResponse
(*DBNode)(nil), // 9: pb.DBNode
(*RPCSuccess)(nil), // 10: pb.RPCSuccess
(*RPCCountResponse)(nil), // 11: pb.RPCCountResponse
(*FindAllDBNodeTablesRequest)(nil), // 9: pb.FindAllDBNodeTablesRequest
(*FindAllDBNodeTablesResponse)(nil), // 10: pb.FindAllDBNodeTablesResponse
(*DeleteDBNodeTableRequest)(nil), // 11: pb.DeleteDBNodeTableRequest
(*TruncateDBNodeTableRequest)(nil), // 12: pb.TruncateDBNodeTableRequest
(*DBNode)(nil), // 13: pb.DBNode
(*DBTable)(nil), // 14: pb.DBTable
(*RPCSuccess)(nil), // 15: pb.RPCSuccess
(*RPCCountResponse)(nil), // 16: pb.RPCCountResponse
}
var file_service_db_node_proto_depIdxs = []int32{
9, // 0: pb.ListEnabledDBNodesResponse.nodes:type_name -> pb.DBNode
9, // 1: pb.FindEnabledDBNodeResponse.node:type_name -> pb.DBNode
0, // 2: pb.DBNodeService.createDBNode:input_type -> pb.CreateDBNodeRequest
2, // 3: pb.DBNodeService.updateDBNode:input_type -> pb.UpdateDBNodeRequest
3, // 4: pb.DBNodeService.deleteDBNode:input_type -> pb.DeleteDBNodeRequest
4, // 5: pb.DBNodeService.countAllEnabledDBNodes:input_type -> pb.CountAllEnabledDBNodesRequest
5, // 6: pb.DBNodeService.listEnabledDBNodes:input_type -> pb.ListEnabledDBNodesRequest
7, // 7: pb.DBNodeService.findEnabledDBNode:input_type -> pb.FindEnabledDBNodeRequest
1, // 8: pb.DBNodeService.createDBNode:output_type -> pb.CreateDBNodeResponse
10, // 9: pb.DBNodeService.updateDBNode:output_type -> pb.RPCSuccess
10, // 10: pb.DBNodeService.deleteDBNode:output_type -> pb.RPCSuccess
11, // 11: pb.DBNodeService.countAllEnabledDBNodes:output_type -> pb.RPCCountResponse
6, // 12: pb.DBNodeService.listEnabledDBNodes:output_type -> pb.ListEnabledDBNodesResponse
8, // 13: pb.DBNodeService.findEnabledDBNode:output_type -> pb.FindEnabledDBNodeResponse
8, // [8:14] is the sub-list for method output_type
2, // [2:8] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
13, // 0: pb.ListEnabledDBNodesResponse.dbNodes:type_name -> pb.DBNode
13, // 1: pb.FindEnabledDBNodeResponse.dbNode:type_name -> pb.DBNode
14, // 2: pb.FindAllDBNodeTablesResponse.dbNodeTables:type_name -> pb.DBTable
0, // 3: pb.DBNodeService.createDBNode:input_type -> pb.CreateDBNodeRequest
2, // 4: pb.DBNodeService.updateDBNode:input_type -> pb.UpdateDBNodeRequest
3, // 5: pb.DBNodeService.deleteDBNode:input_type -> pb.DeleteDBNodeRequest
4, // 6: pb.DBNodeService.countAllEnabledDBNodes:input_type -> pb.CountAllEnabledDBNodesRequest
5, // 7: pb.DBNodeService.listEnabledDBNodes:input_type -> pb.ListEnabledDBNodesRequest
7, // 8: pb.DBNodeService.findEnabledDBNode:input_type -> pb.FindEnabledDBNodeRequest
9, // 9: pb.DBNodeService.findAllDBNodeTables:input_type -> pb.FindAllDBNodeTablesRequest
11, // 10: pb.DBNodeService.deleteDBNodeTable:input_type -> pb.DeleteDBNodeTableRequest
12, // 11: pb.DBNodeService.truncateDBNodeTable:input_type -> pb.TruncateDBNodeTableRequest
1, // 12: pb.DBNodeService.createDBNode:output_type -> pb.CreateDBNodeResponse
15, // 13: pb.DBNodeService.updateDBNode:output_type -> pb.RPCSuccess
15, // 14: pb.DBNodeService.deleteDBNode:output_type -> pb.RPCSuccess
16, // 15: pb.DBNodeService.countAllEnabledDBNodes:output_type -> pb.RPCCountResponse
6, // 16: pb.DBNodeService.listEnabledDBNodes:output_type -> pb.ListEnabledDBNodesResponse
8, // 17: pb.DBNodeService.findEnabledDBNode:output_type -> pb.FindEnabledDBNodeResponse
10, // 18: pb.DBNodeService.findAllDBNodeTables:output_type -> pb.FindAllDBNodeTablesResponse
15, // 19: pb.DBNodeService.deleteDBNodeTable:output_type -> pb.RPCSuccess
15, // 20: pb.DBNodeService.truncateDBNodeTable:output_type -> pb.RPCSuccess
12, // [12:21] is the sub-list for method output_type
3, // [3:12] 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_db_node_proto_init() }
@@ -744,6 +1000,7 @@ func file_service_db_node_proto_init() {
}
file_model_db_node_proto_init()
file_rpc_messages_proto_init()
file_model_db_table_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_db_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateDBNodeRequest); i {
@@ -853,6 +1110,54 @@ func file_service_db_node_proto_init() {
return nil
}
}
file_service_db_node_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllDBNodeTablesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_db_node_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllDBNodeTablesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_db_node_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteDBNodeTableRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_db_node_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TruncateDBNodeTableRequest); 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{
@@ -860,7 +1165,7 @@ func file_service_db_node_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_db_node_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 13,
NumExtensions: 0,
NumServices: 1,
},
@@ -898,6 +1203,12 @@ type DBNodeServiceClient interface {
ListEnabledDBNodes(ctx context.Context, in *ListEnabledDBNodesRequest, opts ...grpc.CallOption) (*ListEnabledDBNodesResponse, error)
// 根据ID查找可用的数据库节点
FindEnabledDBNode(ctx context.Context, in *FindEnabledDBNodeRequest, opts ...grpc.CallOption) (*FindEnabledDBNodeResponse, error)
// 获取所有表信息
FindAllDBNodeTables(ctx context.Context, in *FindAllDBNodeTablesRequest, opts ...grpc.CallOption) (*FindAllDBNodeTablesResponse, error)
// 删除表
DeleteDBNodeTable(ctx context.Context, in *DeleteDBNodeTableRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 清空表
TruncateDBNodeTable(ctx context.Context, in *TruncateDBNodeTableRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type dBNodeServiceClient struct {
@@ -962,6 +1273,33 @@ func (c *dBNodeServiceClient) FindEnabledDBNode(ctx context.Context, in *FindEna
return out, nil
}
func (c *dBNodeServiceClient) FindAllDBNodeTables(ctx context.Context, in *FindAllDBNodeTablesRequest, opts ...grpc.CallOption) (*FindAllDBNodeTablesResponse, error) {
out := new(FindAllDBNodeTablesResponse)
err := c.cc.Invoke(ctx, "/pb.DBNodeService/findAllDBNodeTables", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dBNodeServiceClient) DeleteDBNodeTable(ctx context.Context, in *DeleteDBNodeTableRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.DBNodeService/deleteDBNodeTable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dBNodeServiceClient) TruncateDBNodeTable(ctx context.Context, in *TruncateDBNodeTableRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.DBNodeService/truncateDBNodeTable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DBNodeServiceServer is the server API for DBNodeService service.
type DBNodeServiceServer interface {
// 创建数据库节点
@@ -976,6 +1314,12 @@ type DBNodeServiceServer interface {
ListEnabledDBNodes(context.Context, *ListEnabledDBNodesRequest) (*ListEnabledDBNodesResponse, error)
// 根据ID查找可用的数据库节点
FindEnabledDBNode(context.Context, *FindEnabledDBNodeRequest) (*FindEnabledDBNodeResponse, error)
// 获取所有表信息
FindAllDBNodeTables(context.Context, *FindAllDBNodeTablesRequest) (*FindAllDBNodeTablesResponse, error)
// 删除表
DeleteDBNodeTable(context.Context, *DeleteDBNodeTableRequest) (*RPCSuccess, error)
// 清空表
TruncateDBNodeTable(context.Context, *TruncateDBNodeTableRequest) (*RPCSuccess, error)
}
// UnimplementedDBNodeServiceServer can be embedded to have forward compatible implementations.
@@ -1000,6 +1344,15 @@ func (*UnimplementedDBNodeServiceServer) ListEnabledDBNodes(context.Context, *Li
func (*UnimplementedDBNodeServiceServer) FindEnabledDBNode(context.Context, *FindEnabledDBNodeRequest) (*FindEnabledDBNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledDBNode not implemented")
}
func (*UnimplementedDBNodeServiceServer) FindAllDBNodeTables(context.Context, *FindAllDBNodeTablesRequest) (*FindAllDBNodeTablesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllDBNodeTables not implemented")
}
func (*UnimplementedDBNodeServiceServer) DeleteDBNodeTable(context.Context, *DeleteDBNodeTableRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteDBNodeTable not implemented")
}
func (*UnimplementedDBNodeServiceServer) TruncateDBNodeTable(context.Context, *TruncateDBNodeTableRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method TruncateDBNodeTable not implemented")
}
func RegisterDBNodeServiceServer(s *grpc.Server, srv DBNodeServiceServer) {
s.RegisterService(&_DBNodeService_serviceDesc, srv)
@@ -1113,6 +1466,60 @@ func _DBNodeService_FindEnabledDBNode_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
func _DBNodeService_FindAllDBNodeTables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllDBNodeTablesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DBNodeServiceServer).FindAllDBNodeTables(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.DBNodeService/FindAllDBNodeTables",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DBNodeServiceServer).FindAllDBNodeTables(ctx, req.(*FindAllDBNodeTablesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DBNodeService_DeleteDBNodeTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteDBNodeTableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DBNodeServiceServer).DeleteDBNodeTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.DBNodeService/DeleteDBNodeTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DBNodeServiceServer).DeleteDBNodeTable(ctx, req.(*DeleteDBNodeTableRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DBNodeService_TruncateDBNodeTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TruncateDBNodeTableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DBNodeServiceServer).TruncateDBNodeTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.DBNodeService/TruncateDBNodeTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DBNodeServiceServer).TruncateDBNodeTable(ctx, req.(*TruncateDBNodeTableRequest))
}
return interceptor(ctx, in, info, handler)
}
var _DBNodeService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.DBNodeService",
HandlerType: (*DBNodeServiceServer)(nil),
@@ -1141,6 +1548,18 @@ var _DBNodeService_serviceDesc = grpc.ServiceDesc{
MethodName: "findEnabledDBNode",
Handler: _DBNodeService_FindEnabledDBNode_Handler,
},
{
MethodName: "findAllDBNodeTables",
Handler: _DBNodeService_FindAllDBNodeTables_Handler,
},
{
MethodName: "deleteDBNodeTable",
Handler: _DBNodeService_DeleteDBNodeTable_Handler,
},
{
MethodName: "truncateDBNodeTable",
Handler: _DBNodeService_TruncateDBNodeTable_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_db_node.proto",

View File

@@ -14,4 +14,11 @@ message DBNode {
string username = 8;
string password = 9;
string charset = 10;
DBNodeStatus status = 30;
}
message DBNodeStatus {
bool isOk = 1;
int64 size = 2;
string error = 3;
}

View File

@@ -5,6 +5,7 @@ package pb;
import "model_db_node.proto";
import "rpc_messages.proto";
import "model_db_table.proto";
service DBNodeService {
// 创建数据库节点
@@ -24,6 +25,15 @@ service DBNodeService {
// 根据ID查找可用的数据库节点
rpc findEnabledDBNode (FindEnabledDBNodeRequest) returns (FindEnabledDBNodeResponse);
// 获取所有表信息
rpc findAllDBNodeTables (FindAllDBNodeTablesRequest) returns (FindAllDBNodeTablesResponse);
// 删除表
rpc deleteDBNodeTable (DeleteDBNodeTableRequest) returns (RPCSuccess);
// 清空表
rpc truncateDBNodeTable (TruncateDBNodeTableRequest) returns (RPCSuccess);
}
// 创建数据库节点
@@ -40,12 +50,12 @@ message CreateDBNodeRequest {
}
message CreateDBNodeResponse {
int64 nodeId = 1;
int64 dbNodeId = 1;
}
// 修改数据库节点
message UpdateDBNodeRequest {
int64 nodeId = 1;
int64 dbNodeId = 1;
string name = 2;
string description = 3;
bool isOn = 4;
@@ -59,7 +69,7 @@ message UpdateDBNodeRequest {
// 删除节点
message DeleteDBNodeRequest {
int64 nodeId = 1;
int64 dbNodeId = 1;
}
// 计算可用的数据库节点数量
@@ -74,14 +84,35 @@ message ListEnabledDBNodesRequest {
}
message ListEnabledDBNodesResponse {
repeated DBNode nodes = 1;
repeated DBNode dbNodes = 1;
}
// 根据ID查找可用的数据库节点
message FindEnabledDBNodeRequest {
int64 nodeId = 1;
int64 dbNodeId = 1;
}
message FindEnabledDBNodeResponse {
DBNode node = 1;
DBNode dbNode = 1;
}
// 获取所有表信息
message FindAllDBNodeTablesRequest {
int64 dbNodeId = 1;
}
message FindAllDBNodeTablesResponse {
repeated DBTable dbNodeTables = 1;
}
// 删除表
message DeleteDBNodeTableRequest {
int64 dbNodeId = 1;
string dbNodeTable = 2;
}
// 清空表
message TruncateDBNodeTableRequest {
int64 dbNodeId = 1;
string dbNodeTable = 2;
}