1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- package v1
- type User struct {
- ID int64 `json:"id" form:"id"`
- Username string `json:"username" form:"username"`
- Password string `json:"password" form:"password"`
- Fullname string `json:"fullname" form:"fullname"`
- Mobile string `json:"mobile" form:"mobile"`
- Tel string `json:"tel" form:"tel"`
- Email string `json:"email" form:"email"`
- Remark string `json:"remark" form:"remark"`
- Source string `json:"source" form:"source"` // 用户来源
- NodeClusterId int64 `json:"nodeClusterId" form:"nodeClusterId"` // 节点集群ID
- }
- type Group struct {
- Name string `json:"name" form:"name"`
- }
- type Plan struct {
- UserId int64 `json:"userId" form:"userId"`
- PlanId int64 `json:"planId" form:"planId"`
- DayTo string `json:"dayTo" form:"dayTo"` // 结束日期,格式:YYYY-MM-DD,适用于按带宽和流量计费的套餐
- Period string `json:"period" form:"period"` // 周期类型:yearly、seasonally、monthly,适用于按时间周期计费的套餐
- CountPeriod int64 `json:"countPeriod" form:"countPeriod"` // 周期数量,适用于带宽和流量计费
- Name string `json:"name" form:"name"` // 备注名称
- IsFree bool `json:"isFree" form:"isFree"` // 可选项,是否免费
- PeriodDayTo string `json:"periodDayTo" form:"periodDayTo"` // 可选项, 按周期计费的套餐结束日期
- }
- type RenewalPlan struct {
- UserPlanId int64 `json:"userPlanId" form:"userPlanId"`
- DayTo string `json:"dayTo" form:"dayTo"` // 结束日期,格式:YYYY-MM-DD,适用于按带宽和流量计费的套餐
- Period string `json:"period" form:"period"` // 周期类型:yearly、seasonally、monthly,适用于按时间周期计费的套餐
- CountPeriod int64 `json:"countPeriod" form:"countPeriod"` // 周期数量,适用于带宽和流量计费
- IsFree bool `json:"isFree" form:"isFree"` // 可选项,是否免费
- PeriodDayTo string `json:"periodDayTo" form:"periodDayTo"` // 可选项, 按周期计费的套餐结束日期
- }
- type Website struct {
- UserId int64 `json:"userId" form:"userId"` //可选项,用户ID,如果不想指定用户,此值可以为0
- AdminId int64 `json:"adminId" form:"adminId"` //可选项,管理员ID
- Type string `json:"type" form:"type"` // 类型:httpProxy(HTTP反向代理,一般CDN服务都选这个)、httpWeb(静态文件服务,只会从服务器上读取文件内容,不会转发到源站)、tcpProxy(TCP反向代理)、udpProxy(UDP反向代理)
- Name string `json:"name" form:"name"` // 网站名称
- Description string `json:"description" form:"description"` // 可选项,网站描述
- ServerNamesJSON byte `json:"serverNamesJSON" form:"serverNamesJSON"` // 域名列表 json:server_names
- HttpJSON byte `json:"httpJSON" form:"httpJSON"` // HTTP协议设置,当type为httpProxy或者httpWeb时填写 json:http_protocol
- HttpsJSON byte `json:"httpsJSON" form:"httpsJSON"` // HTTPS协议设置,当type为httpProxy或者httpWeb时填写 json:https_protocol
- TcpJSON byte `json:"tcpJSON" form:"tcpJSON"` // TCP协议设置,当type为tcpProxy时填写 json:tcp_protocol
- TlsJSON byte `json:"tlsJSON" form:"tlsJSON"` // TLS协议设置,当type为tcpProxy时填写 json:tls_protocol
- UdpJSON byte `json:"udpJSON" form:"udpJSON"` // UDP协议设置,当type为udpProxy时填写 json:udp_protocol
- WebId int64 `json:"webId" form:"webId"` // 可选项,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作=
- ReverseProxyJSON byte `json:"reverseProxyJSON" form:"reverseProxyJSON"` // 反向代理(包含源站)配置引用,此项可以在创建网站后再设置 json:reverse_proxy_ref
- ServerGroupIds []int64 `json:"serverGroupIds" form:"serverGroupIds"` // 可选项,所属网站分组ID列表
- UserPlanId int64 `json:"userPlanId" form:"userPlanId"` // 可选项,套餐ID
- NodeClusterId int64 `json:"nodeClusterId" form:"nodeClusterId"` // 所部署的集群ID
- IncludeNodesJSON string `json:"includeNodesJSON" form:"includeNodesJSON"` // 备用参数,不用填写
- ExcludeNodesJSON string `json:"excludeNodesJSON" form:"excludeNodesJSON"` // 备用参数,不用填写
- }
- type TypeJSON struct {
- IsOn bool `json:"isOn" form:"isOn"` // 是否开启
- Listen []Listen `json:"listen" form:"listen"` // 监听端口
- }
- type Listen struct {
- Protocol string `json:"protocol" form:"protocol"` // 协议类型:tcp、udp
- Host string `json:"host" form:"host"` // 监听地址
- Port int64 `json:"port" form:"port"` // 端口
- }
- type ProxyJson struct {
- ServerId int64 `json:"serverId" form:"serverId"` // 网站ID
- JSON byte `json:"JSON" form:"JSON"` // TCP协议设置
- }
- type Origin struct {
- OriginId int64 `json:"originId" form:"originId"`
- Name string `json:"name" form:"name"` // 源站名称
- Addr string `json:"addr" form:"addr"` // 源站地址
- OssJSON byte `json:"ossJSON" form:"ossJSON"` // Oss配置 json:oss_config
- Description string `json:"description" form:"description"` // 备注
- Weight int64 `json:"weight" form:"weight"` // 权重
- IsOn bool `json:"isOn" form:"isOn"` // 是否开启
- Domains []string `json:"domains" form:"domains"` // 域名
- CertRefJSON byte `json:"certRefJSON" form:"certRefJSON"` // 证书引用,可选项
- Host string `json:"host" form:"host"` // 回源主机域名,可选项
- FollowPort bool `json:"followPort" form:"followPort"` // 是否跟随端口,可选项
- Http2Enabled bool `json:"http2Enabled" form:"http2Enabled"` //可选项,是否支持HTTP/2,只在HTTPS源站时生效
- TlsSecurityVerifyMode string `json:"tlsSecurityVerifyMode" form:"tlsSecurityVerifyMode"` // // 安全校验模式:auto系统默认,force强校验,skip不校验
- }
|