Documentation ¶
Index ¶
- type APPAddHttpInput
- type APPDetailInput
- type APPListInput
- type APPListItemOutput
- type APPListOutput
- type APPUpdateHttpInput
- type AdminInfoOutput
- type AdminLoginInput
- type AdminLoginOutput
- type AdminSessionInfo
- type ChangePwdInput
- type DashServiceStatItemOutput
- type DashServiceStatOutput
- type PanelGroupDataOutput
- type ServiceAddGrpcInput
- type ServiceAddHTTPInput
- type ServiceAddTcpInput
- type ServiceDeleteInput
- type ServiceListInput
- type ServiceListItemOutput
- type ServiceListOutput
- type ServiceStatOutput
- type ServiceUpdateGrpcInput
- type ServiceUpdateHTTPInput
- type ServiceUpdateTcpInput
- type StatisticsOutput
- type TokensInput
- type TokensOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APPAddHttpInput ¶
type APPAddHttpInput struct { AppID string `json:"app_id" form:"app_id" comment:"�租户id" validate:"required"` Name string `json:"name" form:"name" comment:"租户名称" validate:"required"` Secret string `json:"secret" form:"secret" comment:"密钥" validate:""` WhiteIPS string `json:"white_ips" form:"white_ips" comment:"ip白名单,支持前缀匹配"` Qpd int64 `json:"qpd" form:"qpd" comment:"日请求量限制" validate:""` Qps int64 `json:"qps" form:"qps" comment:"每秒请求量限制" validate:""` }
func (*APPAddHttpInput) GetValidParams ¶
func (params *APPAddHttpInput) GetValidParams(c *gin.Context) error
type APPDetailInput ¶
type APPDetailInput struct {
ID int64 `json:"id" form:"id" comment:"租户ID" validate:"required"`
}
func (*APPDetailInput) GetValidParams ¶
func (params *APPDetailInput) GetValidParams(c *gin.Context) error
type APPListInput ¶
type APPListInput struct { Info string `json:"info" form:"info" comment:"查找信息" validate:""` PageSize int `json:"page_size" form:"page_size" comment:"页数" validate:"required,min=1,max=999"` PageNo int `json:"page_no" form:"page_no" comment:"页码" validate:"required,min=1,max=999"` }
func (*APPListInput) GetValidParams ¶
func (params *APPListInput) GetValidParams(c *gin.Context) error
type APPListItemOutput ¶
type APPListItemOutput struct { ID int64 `json:"id" gorm:"primary_key"` AppID string `json:"app_id" gorm:"column:app_id" description:"�租户id "` Name string `json:"name" gorm:"column:name" description:"租户名称 "` Secret string `json:"secret" gorm:"column:secret" description:"密钥"` WhiteIPS string `json:"white_ips" gorm:"column:white_ips" description:"ip白名单,支持前缀匹配 "` Qpd int64 `json:"qpd" gorm:"column:qpd" description:"日请求量限制"` Qps int64 `json:"qps" gorm:"column:qps" description:"每秒请求量限制"` RealQpd int64 `json:"real_qpd" description:"日请求量限制"` RealQps int64 `json:"real_qps" description:"每秒请求量限制"` UpdatedAt time.Time `json:"create_at" gorm:"column:create_at" description:"添加时间 "` CreatedAt time.Time `json:"update_at" gorm:"column:update_at" description:"更新时间"` IsDelete int8 `json:"is_delete" gorm:"column:is_delete" description:"是否已删除;0:否;1:是"` }
type APPListOutput ¶
type APPListOutput struct { List []APPListItemOutput `json:"list" form:"list" comment:"租户列表"` Total int64 `json:"total" form:"total" comment:"租户总数"` }
type APPUpdateHttpInput ¶
type APPUpdateHttpInput struct { ID int64 `json:"id" form:"id" gorm:"column:id" comment:"主键ID" validate:"required"` AppID string `json:"app_id" form:"app_id" gorm:"column:app_id" comment:"租户id" validate:""` Name string `json:"name" form:"name" gorm:"column:name" comment:"租户名称" validate:"required"` Secret string `json:"secret" form:"secret" gorm:"column:secret" comment:"密钥" validate:"required"` WhiteIPS string `json:"white_ips" form:"white_ips" gorm:"column:white_ips" comment:"ip白名单,支持前缀匹配 "` Qpd int64 `json:"qpd" form:"qpd" gorm:"column:qpd" comment:"日请求量限制"` Qps int64 `json:"qps" form:"qps" gorm:"column:qps" comment:"每秒请求量限制"` }
func (*APPUpdateHttpInput) GetValidParams ¶
func (params *APPUpdateHttpInput) GetValidParams(c *gin.Context) error
type AdminInfoOutput ¶
type AdminLoginInput ¶
type AdminLoginInput struct { UserName string `json:"username" form:"username" comment:"管理员用户名" example:"admin" validate:"required,valid_username"` //管理员用户名 Password string `json:"password" form:"password" comment:"密码" example:"123456" validate:"required"` //密码 }
func (*AdminLoginInput) BindValidParam ¶
func (param *AdminLoginInput) BindValidParam(c *gin.Context) error
type AdminLoginOutput ¶
type AdminLoginOutput struct {
Token string `json:"token" form:"token" comment:"token" example:"token" validate:""` //token
}
type AdminSessionInfo ¶
type ChangePwdInput ¶
type ChangePwdInput struct {
Password string `json:"password" form:"password" comment:"密码" example:"123456" validate:"required"` //密码
}
func (*ChangePwdInput) BindValidParam ¶
func (param *ChangePwdInput) BindValidParam(c *gin.Context) error
type DashServiceStatOutput ¶
type DashServiceStatOutput struct { Legend []string `json:"legend"` Data []DashServiceStatItemOutput `json:"data"` }
type PanelGroupDataOutput ¶
type ServiceAddGrpcInput ¶
type ServiceAddGrpcInput struct { ServiceName string `json:"service_name" form:"service_name" comment:"服务名称" validate:"required,valid_service_name"` ServiceDesc string `json:"service_desc" form:"service_desc" comment:"服务描述" validate:"required"` Port int `json:"port" form:"port" comment:"端口,需要设置8001-8999范围内" validate:"required,min=8001,max=8999"` HeaderTransfor string `json:"header_transfor" form:"header_transfor" comment:"metadata转换" validate:"valid_header_transfor"` OpenAuth int `json:"open_auth" form:"open_auth" comment:"是否开启权限验证" validate:""` BlackList string `` /* 135-byte string literal not displayed */ WhiteList string `` /* 135-byte string literal not displayed */ WhiteHostName string `json:"white_host_name" form:"white_host_name" comment:"白名单主机,以逗号间隔" validate:"valid_iplist"` ClientIPFlowLimit int `json:"clientip_flow_limit" form:"clientip_flow_limit" comment:"客户端IP限流" validate:""` ServiceFlowLimit int `json:"service_flow_limit" form:"service_flow_limit" comment:"服务端限流" validate:""` RoundType int `json:"round_type" form:"round_type" comment:"轮询策略" validate:""` IpList string `json:"ip_list" form:"ip_list" comment:"IP列表" validate:"required,valid_ipportlist"` WeightList string `json:"weight_list" form:"weight_list" comment:"权重列表" validate:"required,valid_weightlist"` ForbidList string `json:"forbid_list" form:"forbid_list" comment:"禁用IP列表" validate:"valid_iplist"` }
func (*ServiceAddGrpcInput) GetValidParams ¶
func (params *ServiceAddGrpcInput) GetValidParams(c *gin.Context) error
type ServiceAddHTTPInput ¶
type ServiceAddHTTPInput struct { ServiceName string `json:"service_name" form:"service_name" comment:"服务名" example:"" validate:"required,valid_service_name"` //服务名 ServiceDesc string `json:"service_desc" form:"service_desc" comment:"服务描述" example:"" validate:"required,max=255,min=1"` //服务描述 RuleType int `json:"rule_type" form:"rule_type" comment:"接入类型" example:"" validate:"max=1,min=0"` //接入类型 Rule string `json:"rule" form:"rule" comment:"接入路径:域名或者前缀" example:"" validate:"required,valid_rule"` //域名或者前缀 NeedHttps int `json:"need_https" form:"need_https" comment:"支持https" example:"" validate:"max=1,min=0"` //支持https NeedStripUri int `json:"need_strip_uri" form:"need_strip_uri" comment:"启用strip_uri" example:"" validate:"max=1,min=0"` //启用strip_uri NeedWebsocket int `json:"need_websocket" form:"need_websocket" comment:"是否支持websocket" example:"" validate:"max=1,min=0"` //是否支持websocket UrlRewrite string `json:"url_rewrite" form:"url_rewrite" comment:"url重写功能" example:"" validate:"valid_url_rewrite"` //url重写功能 HeaderTransfor string `json:"header_transfor" form:"header_transfor" comment:"header转换" example:"" validate:"valid_header_transfor"` //header转换 OpenAuth int `json:"open_auth" form:"open_auth" comment:"是否开启权限" example:"" validate:"max=1,min=0"` //关键词 BlackList string `json:"black_list" form:"black_list" comment:"黑名单ip" example:"" validate:""` //黑名单ip WhiteList string `json:"white_list" form:"white_list" comment:"白名单ip" example:"" validate:""` //白名单ip ClientipFlowLimit int `json:"clientip_flow_limit" form:"clientip_flow_limit" comment:"�客户端ip限流 " example:"" validate:"min=0"` //�客户端ip限流 ServiceFlowLimit int `json:"service_flow_limit" form:"service_flow_limit" comment:"服务端限流" example:"" validate:"min=0"` //服务端限流 RoundType int `json:"round_type" form:"round_type" comment:"轮询方式" example:"" validate:"max=3,min=0"` //轮询方式 IpList string `json:"ip_list" form:"ip_list" comment:"ip列表" example:"" validate:"required,valid_ipportlist"` //ip列表 WeightList string `json:"weight_list" form:"weight_list" comment:"�权重列表" example:"" validate:"required,valid_weightlist"` //�权重列表 UpstreamConnectTimeout int `` //建立连接超时, 单位s /* 129-byte string literal not displayed */ UpstreamHeaderTimeout int `` //获取header超时, 单位s /* 127-byte string literal not displayed */ UpstreamIdleTimeout int `` //链接最大空闲时间, 单位s /* 129-byte string literal not displayed */ UpstreamMaxIdle int `json:"upstream_max_idle" form:"upstream_max_idle" comment:"最大空闲链接数" example:"" validate:"min=0"` //最大空闲链接数 }
func (*ServiceAddHTTPInput) BindValidParam ¶
func (param *ServiceAddHTTPInput) BindValidParam(c *gin.Context) error
type ServiceAddTcpInput ¶
type ServiceAddTcpInput struct { ServiceName string `json:"service_name" form:"service_name" comment:"服务名称" validate:"required,valid_service_name"` ServiceDesc string `json:"service_desc" form:"service_desc" comment:"服务描述" validate:"required"` Port int `json:"port" form:"port" comment:"端口,需要设置8001-8999范围内" validate:"required,min=8001,max=8999"` HeaderTransfor string `json:"header_transfor" form:"header_transfor" comment:"header头转换" validate:" "` OpenAuth int `json:"open_auth" form:"open_auth" comment:"是否开启权限验证" validate:""` BlackList string `` /* 135-byte string literal not displayed */ WhiteList string `` /* 135-byte string literal not displayed */ WhiteHostName string `json:"white_host_name" form:"white_host_name" comment:"白名单主机,以逗号间隔" validate:"valid_iplist"` ClientIPFlowLimit int `json:"clientip_flow_limit" form:"clientip_flow_limit" comment:"客户端IP限流" validate:""` ServiceFlowLimit int `json:"service_flow_limit" form:"service_flow_limit" comment:"服务端限流" validate:""` RoundType int `json:"round_type" form:"round_type" comment:"轮询策略" validate:""` IpList string `json:"ip_list" form:"ip_list" comment:"IP列表" validate:"required,valid_ipportlist"` WeightList string `json:"weight_list" form:"weight_list" comment:"权重列表" validate:"required,valid_weightlist"` ForbidList string `json:"forbid_list" form:"forbid_list" comment:"禁用IP列表" validate:"valid_iplist"` }
func (*ServiceAddTcpInput) GetValidParams ¶
func (params *ServiceAddTcpInput) GetValidParams(c *gin.Context) error
type ServiceDeleteInput ¶
type ServiceDeleteInput struct {
ID int64 `json:"id" form:"id" comment:"服务ID" example:"56" validate:"required"` //服务ID
}
func (*ServiceDeleteInput) BindValidParam ¶
func (param *ServiceDeleteInput) BindValidParam(c *gin.Context) error
type ServiceListInput ¶
type ServiceListInput struct { Info string `json:"info" form:"info" comment:"关键词" example:"" validate:""` //关键词 PageNo int `json:"page_no" form:"page_no" comment:"页数" example:"1" validate:"required"` //页数 PageSize int `json:"page_size" form:"page_size" comment:"每页条数" example:"20" validate:"required"` //每页条数 }
func (*ServiceListInput) BindValidParam ¶
func (param *ServiceListInput) BindValidParam(c *gin.Context) error
type ServiceListItemOutput ¶
type ServiceListItemOutput struct { ID int64 `json:"id" form:"id"` //id ServiceName string `json:"service_name" form:"service_name"` //服务名称 ServiceDesc string `json:"service_desc" form:"service_desc"` //服务描述 LoadType int `json:"load_type" form:"load_type"` //类型 ServiceAddr string `json:"service_addr" form:"service_addr"` //服务地址 Qps int64 `json:"qps" form:"qps"` //qps Qpd int64 `json:"qpd" form:"qpd"` //qpd TotalNode int `json:"total_node" form:"total_node"` //节点数 }
type ServiceListOutput ¶
type ServiceListOutput struct { Total int64 `json:"total" form:"total" comment:"总数" example:"" validate:""` //总数 List []ServiceListItemOutput `json:"list" form:"list" comment:"列表" example:"" validate:""` //列表 }
type ServiceStatOutput ¶
type ServiceUpdateGrpcInput ¶
type ServiceUpdateGrpcInput struct { ID int64 `json:"id" form:"id" comment:"服务ID" validate:"required"` ServiceName string `json:"service_name" form:"service_name" comment:"服务名称" validate:"required,valid_service_name"` ServiceDesc string `json:"service_desc" form:"service_desc" comment:"服务描述" validate:"required"` Port int `json:"port" form:"port" comment:"端口,需要设置8001-8999范围内" validate:"required,min=8001,max=8999"` HeaderTransfor string `json:"header_transfor" form:"header_transfor" comment:"metadata转换" validate:"valid_header_transfor"` OpenAuth int `json:"open_auth" form:"open_auth" comment:"是否开启权限验证" validate:""` BlackList string `` /* 135-byte string literal not displayed */ WhiteList string `` /* 135-byte string literal not displayed */ WhiteHostName string `json:"white_host_name" form:"white_host_name" comment:"白名单主机,以逗号间隔" validate:"valid_iplist"` ClientIPFlowLimit int `json:"clientip_flow_limit" form:"clientip_flow_limit" comment:"客户端IP限流" validate:""` ServiceFlowLimit int `json:"service_flow_limit" form:"service_flow_limit" comment:"服务端限流" validate:""` RoundType int `json:"round_type" form:"round_type" comment:"轮询策略" validate:""` IpList string `json:"ip_list" form:"ip_list" comment:"IP列表" validate:"required,valid_ipportlist"` WeightList string `json:"weight_list" form:"weight_list" comment:"权重列表" validate:"required,valid_weightlist"` ForbidList string `json:"forbid_list" form:"forbid_list" comment:"禁用IP列表" validate:"valid_iplist"` }
func (*ServiceUpdateGrpcInput) GetValidParams ¶
func (params *ServiceUpdateGrpcInput) GetValidParams(c *gin.Context) error
type ServiceUpdateHTTPInput ¶
type ServiceUpdateHTTPInput struct { ID int64 `json:"id" form:"id" comment:"服务ID" example:"62" validate:"required,min=1"` //服务ID ServiceName string `` //服务名 /* 131-byte string literal not displayed */ ServiceDesc string `` //服务描述 /* 129-byte string literal not displayed */ RuleType int `json:"rule_type" form:"rule_type" comment:"接入类型" example:"" validate:"max=1,min=0"` //接入类型 Rule string `` //域名或者前缀 /* 132-byte string literal not displayed */ NeedHttps int `json:"need_https" form:"need_https" comment:"支持https" example:"" validate:"max=1,min=0"` //支持https NeedStripUri int `json:"need_strip_uri" form:"need_strip_uri" comment:"启用strip_uri" example:"" validate:"max=1,min=0"` //启用strip_uri NeedWebsocket int `json:"need_websocket" form:"need_websocket" comment:"是否支持websocket" example:"" validate:"max=1,min=0"` //是否支持websocket UrlRewrite string `json:"url_rewrite" form:"url_rewrite" comment:"url重写功能" example:"" validate:"valid_url_rewrite"` //url重写功能 HeaderTransfor string `json:"header_transfor" form:"header_transfor" comment:"header转换" example:"" validate:"valid_header_transfor"` //header转换 OpenAuth int `json:"open_auth" form:"open_auth" comment:"是否开启权限" example:"" validate:"max=1,min=0"` //关键词 BlackList string `json:"black_list" form:"black_list" comment:"黑名单ip" example:"" validate:""` //黑名单ip WhiteList string `json:"white_list" form:"white_list" comment:"白名单ip" example:"" validate:""` //白名单ip ClientipFlowLimit int `json:"clientip_flow_limit" form:"clientip_flow_limit" comment:"�客户端ip限流 " example:"" validate:"min=0"` //�客户端ip限流 ServiceFlowLimit int `json:"service_flow_limit" form:"service_flow_limit" comment:"服务端限流" example:"" validate:"min=0"` //服务端限流 RoundType int `json:"round_type" form:"round_type" comment:"轮询方式" example:"" validate:"max=3,min=0"` //轮询方式 IpList string `json:"ip_list" form:"ip_list" comment:"ip列表" example:"127.0.0.1:80" validate:"required,valid_ipportlist"` //ip列表 WeightList string `json:"weight_list" form:"weight_list" comment:"�权重列表" example:"50" validate:"required,valid_weightlist"` //�权重列表 UpstreamConnectTimeout int `` //建立连接超时, 单位s /* 129-byte string literal not displayed */ UpstreamHeaderTimeout int `` //获取header超时, 单位s /* 127-byte string literal not displayed */ UpstreamIdleTimeout int `` //链接最大空闲时间, 单位s /* 129-byte string literal not displayed */ UpstreamMaxIdle int `json:"upstream_max_idle" form:"upstream_max_idle" comment:"最大空闲链接数" example:"" validate:"min=0"` //最大空闲链接数 }
func (*ServiceUpdateHTTPInput) BindValidParam ¶
func (param *ServiceUpdateHTTPInput) BindValidParam(c *gin.Context) error
type ServiceUpdateTcpInput ¶
type ServiceUpdateTcpInput struct { ID int64 `json:"id" form:"id" comment:"服务ID" validate:"required"` ServiceName string `json:"service_name" form:"service_name" comment:"服务名称" validate:"required,valid_service_name"` ServiceDesc string `json:"service_desc" form:"service_desc" comment:"服务描述" validate:"required"` Port int `json:"port" form:"port" comment:"端口,需要设置8001-8999范围内" validate:"required,min=8001,max=8999"` OpenAuth int `json:"open_auth" form:"open_auth" comment:"是否开启权限验证" validate:""` BlackList string `` /* 135-byte string literal not displayed */ WhiteList string `` /* 135-byte string literal not displayed */ WhiteHostName string `json:"white_host_name" form:"white_host_name" comment:"白名单主机,以逗号间隔" validate:"valid_iplist"` ClientIPFlowLimit int `json:"clientip_flow_limit" form:"clientip_flow_limit" comment:"客户端IP限流" validate:""` ServiceFlowLimit int `json:"service_flow_limit" form:"service_flow_limit" comment:"服务端限流" validate:""` RoundType int `json:"round_type" form:"round_type" comment:"轮询策略" validate:""` IpList string `json:"ip_list" form:"ip_list" comment:"IP列表" validate:"required,valid_ipportlist"` WeightList string `json:"weight_list" form:"weight_list" comment:"权重列表" validate:"required,valid_weightlist"` ForbidList string `json:"forbid_list" form:"forbid_list" comment:"禁用IP列表" validate:"valid_iplist"` }
func (*ServiceUpdateTcpInput) GetValidParams ¶
func (params *ServiceUpdateTcpInput) GetValidParams(c *gin.Context) error
type StatisticsOutput ¶
type TokensInput ¶
type TokensInput struct { GrantType string `json:"grant_type" form:"grant_type" comment:"授权类型" example:"client_credentials" validate:"required"` //授权类型 Scope string `json:"scope" form:"scope" comment:"权限范围" example:"read_write" validate:"required"` //权限范围 }
func (*TokensInput) BindValidParam ¶
func (param *TokensInput) BindValidParam(c *gin.Context) error
type TokensOutput ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.