Documentation
¶
Index ¶
- type APPAddHttpInput
- type APPDetailInput
- type APPListInput
- type APPListItemOutput
- type APPListOutput
- type APPUpdateHttpInput
- type DashServiceStatItemOutput
- type DashServiceStatOutput
- type PanelGroupDataOutput
- type ServiceAddInput
- type ServiceDeleteInput
- type ServiceListInput
- type ServiceListItemOutput
- type ServiceListOutput
- type ServiceStatOutput
- type ServiceUpdateInput
- 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 { AccessKey string `json:"access_key" form:"access_key" comment:"租户key" validate:"required"` Name string `json:"name" form:"name" comment:"租户名称" validate:"required"` SecretKey string `json:"secret_key" form:"secret_key" comment:"密钥" validate:""` 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:"租户key" 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=99999"` PageNo int `json:"page_no" form:"page_no" comment:"页码" validate:"required,min=1,max=99999"` }
func (*APPListInput) GetValidParams ¶
func (params *APPListInput) GetValidParams(c *gin.Context) error
type APPListItemOutput ¶
type APPListItemOutput struct { ID int64 `json:"id" gorm:"primary_key"` AccessKey string `json:"access_key" gorm:"column:access_key" description:"租户key "` Name string `json:"name" gorm:"column:name" description:"租户名称 "` SecretKey string `json:"secret_key" gorm:"column:secret_key" description:"密钥"` 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"` AccessKey string `json:"access_key" form:"access_key" gorm:"column:access_key" comment:"租户key" validate:""` Name string `json:"name" form:"name" gorm:"column:name" comment:"租户名称" validate:"required"` SecretKey string `json:"secret_key" form:"secret_key" gorm:"column:secret_key" comment:"密钥" validate:"required"` 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 DashServiceStatOutput ¶
type DashServiceStatOutput struct { Legend []string `json:"legend"` Data []DashServiceStatItemOutput `json:"data"` }
type PanelGroupDataOutput ¶
type ServiceAddInput ¶
type ServiceAddInput 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"` //服务描述 ProtocolType int `json:"protocol_type" form:"protocol_type" comment:"协议类型" example:"" validate:"max=4,min=0"` 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"` //域名或者前缀 NeedStripUri int `json:"need_strip_uri" form:"need_strip_uri" comment:"启用strip_uri" example:"" validate:"max=1,min=0"` //启用strip_uri 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"` //轮询方式 ProxyName string `json:"proxy_name" form:"proxy_name" comment:"ip列表" example:"" validate:"required"` //ip列表 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 (*ServiceAddInput) BindValidParam ¶
func (param *ServiceAddInput) BindValidParam(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"` //服务描述 ProtocolType int `json:"protocol_type" form:"protocol_type"` //类型 ServiceAddr string `json:"service_addr" form:"service_addr"` //服务地址 Qps int64 `json:"qps" form:"qps"` //qps Qpd int64 `json:"qpd" form:"qpd"` //qpd }
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 ServiceUpdateInput ¶
type ServiceUpdateInput 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 */ NeedStripUri int `json:"need_strip_uri" form:"need_strip_uri" comment:"启用strip_uri" example:"" validate:"max=1,min=0"` //启用strip_uri 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"` //轮询方式 ProxyName string `` //ip列表 /* 129-byte string literal not displayed */ 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 (*ServiceUpdateInput) BindValidParam ¶
func (param *ServiceUpdateInput) BindValidParam(c *gin.Context) error
type StatisticsOutput ¶
type TokensInput ¶
type TokensInput struct { AccessKey string `json:"accessKey" form:"accessKey" comment:"租户key" example:"demo-todo-list" validate:"required"` SecretKey string `json:"secretKey" form:"secretKey" comment:"租户密钥" example:"3cef5776249ca556508c8e793f58e6ec" validate:"required"` }
func (*TokensInput) BindValidParam ¶
func (param *TokensInput) BindValidParam(c *gin.Context) error
type TokensOutput ¶
type TokensOutput struct {
AccessToken string `json:"access_token" form:"access_token"` //access_token
}
Click to show internal directories.
Click to hide internal directories.