2020-09-15 14:44:11 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package models
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-16 20:29:18 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// HTTP Web
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-15 14:44:11 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								type HTTPWeb struct {
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 18:43:42 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Id                 uint32 `field:"id"`                 // ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsOn               uint8  `field:"isOn"`               // 是否启用
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TemplateId         uint32 `field:"templateId"`         // 模版ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									AdminId            uint32 `field:"adminId"`            // 管理员ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									UserId             uint32 `field:"userId"`             // 用户ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									State              uint8  `field:"state"`              // 状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CreatedAt          uint64 `field:"createdAt"`          // 创建时间
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-26 19:54:15 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Root               string `field:"root"`               // 根目录
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 18:43:42 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Charset            string `field:"charset"`            // 字符集
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Shutdown           string `field:"shutdown"`           // 临时关闭页面配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pages              string `field:"pages"`              // 特殊页面
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RedirectToHttps    string `field:"redirectToHttps"`    // 跳转到HTTPS设置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Indexes            string `field:"indexes"`            // 首页文件列表
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									MaxRequestBodySize string `field:"maxRequestBodySize"` // 最大允许的请求内容尺寸
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-28 16:25:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RequestHeader      string `field:"requestHeader"`      // 请求Header配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									ResponseHeader     string `field:"responseHeader"`     // 响应Header配置
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 18:43:42 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									AccessLog          string `field:"accessLog"`          // 访问日志配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Stat               string `field:"stat"`               // 统计配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Gzip               string `field:"gzip"`               // Gzip配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Cache              string `field:"cache"`              // 缓存配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Firewall           string `field:"firewall"`           // 防火墙设置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Locations          string `field:"locations"`          // 路径规则配置
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-26 19:54:15 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Websocket          string `field:"websocket"`          // Websocket设置
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-28 16:25:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RewriteRules       string `field:"rewriteRules"`       // 重写规则配置
							 | 
						
					
						
							
								
									
										
										
										
											2021-01-10 17:34:35 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									HostRedirects      string `field:"hostRedirects"`      // 域名跳转
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-15 14:44:11 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								type HTTPWebOperator struct {
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 18:43:42 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Id                 interface{} // ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsOn               interface{} // 是否启用
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TemplateId         interface{} // 模版ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									AdminId            interface{} // 管理员ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									UserId             interface{} // 用户ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									State              interface{} // 状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CreatedAt          interface{} // 创建时间
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-26 19:54:15 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Root               interface{} // 根目录
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 18:43:42 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Charset            interface{} // 字符集
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Shutdown           interface{} // 临时关闭页面配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pages              interface{} // 特殊页面
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RedirectToHttps    interface{} // 跳转到HTTPS设置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Indexes            interface{} // 首页文件列表
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									MaxRequestBodySize interface{} // 最大允许的请求内容尺寸
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-28 16:25:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RequestHeader      interface{} // 请求Header配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									ResponseHeader     interface{} // 响应Header配置
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-23 18:43:42 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									AccessLog          interface{} // 访问日志配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Stat               interface{} // 统计配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Gzip               interface{} // Gzip配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Cache              interface{} // 缓存配置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Firewall           interface{} // 防火墙设置
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Locations          interface{} // 路径规则配置
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-26 19:54:15 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Websocket          interface{} // Websocket设置
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-28 16:25:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RewriteRules       interface{} // 重写规则配置
							 | 
						
					
						
							
								
									
										
										
										
											2021-01-10 17:34:35 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									HostRedirects      interface{} // 域名跳转
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-15 14:44:11 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func NewHTTPWebOperator() *HTTPWebOperator {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return &HTTPWebOperator{}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |