Documentation ¶
Index ¶
- type AdminInfoOutput
- type AdminLoginInput
- type AdminLoginOutput
- type AdminSessionInfo
- type AppAddInput
- type AppDeleteInput
- type AppDetailInput
- type AppInfoListInput
- type AppListItemOutput
- type AppListOutput
- type AppUpdateInput
- type ChangePwdInput
- type DashServiceStatItemOutput
- type DashServiceStatOutput
- type PanelGroupDataOutput
- type ServiceAddGRPCInput
- type ServiceAddHTTPInput
- type ServiceAddTCPInput
- type ServiceDeleteInput
- type ServiceInfoInput
- type ServiceInfoItem
- type ServiceInfoOutput
- 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 AdminInfoOutput ¶
type AdminLoginInput ¶
type AdminLoginInput struct { UserName string `json:"username" form:"username" comment:"用户名" example:"admin" validate:"required"` Passwd 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 AppAddInput ¶
type AppAddInput 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 (*AppAddInput) GetValidParams ¶
func (a *AppAddInput) GetValidParams(c *gin.Context) error
type AppDeleteInput ¶
type AppDeleteInput struct {
ID int64 `json:"id" form:"id" comment:"�租户id" validate:"required"`
}
func (*AppDeleteInput) GetValidParams ¶
func (a *AppDeleteInput) GetValidParams(c *gin.Context) error
type AppDetailInput ¶
type AppDetailInput struct {
ID int64 `json:"id" form:"id" comment:"�租户id" validate:"required"`
}
func (*AppDetailInput) GetValidParams ¶
func (a *AppDetailInput) GetValidParams(c *gin.Context) error
type AppInfoListInput ¶
type AppInfoListInput struct { Info string `json:"info" form:"info" comment:"关键字" example:"http"` PageNo int `json:"page_no" form:"page_no" comment:"页数" example:"1" validate:"required,min=1,max=999"` PageSize int `json:"page_size" form:"page_size" comment:"页面大小" example:"3" validate:"required,min=1,max=999"` }
func (*AppInfoListInput) GetValidParams ¶
func (a *AppInfoListInput) 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 AppUpdateInput ¶
type AppUpdateInput struct { ID int64 `json:"id" form:"id" comment:"�租户id"` 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 (*AppUpdateInput) GetValidParams ¶
func (a *AppUpdateInput) GetValidParams(c *gin.Context) error
type ChangePwdInput ¶
type ChangePwdInput struct {
Password string `json:"password" form:"password" comment:"密码" example:"123456" validate:"required"`
}
func (*ChangePwdInput) BindValidParam ¶
func (ch *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) BindValidParam ¶
func (s *ServiceAddGRPCInput) BindValidParam(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) BindValidParam ¶
func (param *ServiceAddTCPInput) BindValidParam(c *gin.Context) error
type ServiceDeleteInput ¶
type ServiceDeleteInput struct {
ID int64 `json:"id" form:"id" comment:"服务id"`
}
func (*ServiceDeleteInput) BindValidParam ¶
func (s *ServiceDeleteInput) BindValidParam(c *gin.Context) error
type ServiceInfoInput ¶
type ServiceInfoInput struct { Info string `json:"info" form:"info" comment:"关键字" example:"http"` PageNo int `json:"page_no" form:"page_no" comment:"页数" example:"1" validate:"required"` PageSize int `json:"page_size" form:"page_size" comment:"页面大小" example:"3" validate:"required"` }
func (*ServiceInfoInput) BindValidParam ¶
func (serviceInput *ServiceInfoInput) BindValidParam(c *gin.Context) error
type ServiceInfoItem ¶
type ServiceInfoItem struct { ID int64 `json:"id" form:"id" comment:"服务id" example:"1" validate:""` LoadType int `json:"load_type" form:"load_type" comment:"加载类型" example:"1" validate:""` ServiceName string `json:"service_name" form:"service_name" comment:"服务名称" example:"test_grpc" validate:""` ServiceDesc string `json:"service_desc" form:"service_desc" comment:"服务描述" example:"" validate:""` ServiceAddr string `json:"service_addr" form:"service_addr"` Qps int64 `json:"qps" form:"qps"` Qpd int64 `json:"qpd" form:"qpd"` TotalNode int `json:"total_node" form:"total_node"` }
type ServiceInfoOutput ¶
type ServiceInfoOutput struct { Total int64 `json:"total" form:"total" comment:"总数" ` InfoList []*ServiceInfoItem `json:"info_list"` }
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) BindValidParam ¶
func (s *ServiceUpdateGRPCInput) BindValidParam(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) BindValidParam ¶
func (param *ServiceUpdateTCPInput) BindValidParam(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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.