2020-08-30 16:12:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package models
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-05-26 14:40:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// NodeIPAddress 节点IP地址
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-30 16:12:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								type NodeIPAddress struct {
							 | 
						
					
						
							
								
									
										
										
										
											2021-09-13 10:51:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Id                uint32 `field:"id"`                // ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									NodeId            uint32 `field:"nodeId"`            // 节点ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Role              string `field:"role"`              // 节点角色
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-07 18:22:19 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									GroupId           uint32 `field:"groupId"`           // 所属分组ID
							 | 
						
					
						
							
								
									
										
										
										
											2021-09-13 10:51:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Name              string `field:"name"`              // 名称
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Ip                string `field:"ip"`                // IP地址
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Description       string `field:"description"`       // 描述
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									State             uint8  `field:"state"`             // 状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Order             uint32 `field:"order"`             // 排序
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CanAccess         uint8  `field:"canAccess"`         // 是否可以访问
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsOn              uint8  `field:"isOn"`              // 是否启用
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsUp              uint8  `field:"isUp"`              // 是否上线
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-18 14:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									IsHealthy         uint8  `field:"isHealthy"`         // 是否健康
							 | 
						
					
						
							
								
									
										
										
										
											2021-09-13 10:51:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Thresholds        string `field:"thresholds"`        // 上线阈值
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Connectivity      string `field:"connectivity"`      // 连通性状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BackupIP          string `field:"backupIP"`          // 备用IP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BackupThresholdId uint32 `field:"backupThresholdId"` // 触发备用IP的阈值
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-18 14:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CountUp           uint32 `field:"countUp"`           // UP状态次数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountDown         uint32 `field:"countDown"`         // DOWN状态次数
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-30 16:12:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								type NodeIPAddressOperator struct {
							 | 
						
					
						
							
								
									
										
										
										
											2021-09-13 10:51:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Id                interface{} // ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									NodeId            interface{} // 节点ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Role              interface{} // 节点角色
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-07 18:22:19 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									GroupId           interface{} // 所属分组ID
							 | 
						
					
						
							
								
									
										
										
										
											2021-09-13 10:51:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Name              interface{} // 名称
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Ip                interface{} // IP地址
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Description       interface{} // 描述
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									State             interface{} // 状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Order             interface{} // 排序
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CanAccess         interface{} // 是否可以访问
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsOn              interface{} // 是否启用
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsUp              interface{} // 是否上线
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-18 14:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									IsHealthy         interface{} // 是否健康
							 | 
						
					
						
							
								
									
										
										
										
											2021-09-13 10:51:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Thresholds        interface{} // 上线阈值
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Connectivity      interface{} // 连通性状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BackupIP          interface{} // 备用IP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BackupThresholdId interface{} // 触发备用IP的阈值
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-18 14:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CountUp           interface{} // UP状态次数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountDown         interface{} // DOWN状态次数
							 | 
						
					
						
							
								
									
										
										
										
											2020-08-30 16:12:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func NewNodeIPAddressOperator() *NodeIPAddressOperator {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return &NodeIPAddressOperator{}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |