2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package models
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-11 21:00:29 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// NodeGrant 节点授权
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								type NodeGrant struct {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Id          uint32 `field:"id"`          // ID
							 | 
						
					
						
							
								
									
										
										
										
											2020-11-27 10:02:46 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									AdminId     uint32 `field:"adminId"`     // 管理员ID
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Name        string `field:"name"`        // 名称
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 19:02:28 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Method      string `field:"method"`      // 登录方式
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Username    string `field:"username"`    // 用户名
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Password    string `field:"password"`    // 密码
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Su          uint8  `field:"su"`          // 是否需要su
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-06 15:31:01 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									PrivateKey  string `field:"privateKey"`  // 私钥
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Passphrase  string `field:"passphrase"`  // 私钥密码
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Description string `field:"description"` // 备注
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									NodeId      uint32 `field:"nodeId"`      // 专有节点
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-11 21:00:29 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Role        string `field:"role"`        // 角色
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									State       uint8  `field:"state"`       // 状态
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 10:12:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CreatedAt   uint64 `field:"createdAt"`   // 创建时间
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								type NodeGrantOperator struct {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Id          interface{} // ID
							 | 
						
					
						
							
								
									
										
										
										
											2020-11-27 10:02:46 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									AdminId     interface{} // 管理员ID
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Name        interface{} // 名称
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 19:02:28 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Method      interface{} // 登录方式
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Username    interface{} // 用户名
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Password    interface{} // 密码
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Su          interface{} // 是否需要su
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-06 15:31:01 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									PrivateKey  interface{} // 私钥
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Passphrase  interface{} // 私钥密码
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Description interface{} // 备注
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									NodeId      interface{} // 专有节点
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-11 21:00:29 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Role        interface{} // 角色
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									State       interface{} // 状态
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 10:12:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CreatedAt   interface{} // 创建时间
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 22:17:53 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func NewNodeGrantOperator() *NodeGrantOperator {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return &NodeGrantOperator{}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |