123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- // Copyright 2019 utimes.cc. All rights reserved.
- // Use of this source code is governed by utimes.cc.
- package apis
- type ManagementBaseApiParam struct {
- Required bool `json:"required" description:"是否必选"`
- Name string `json:"name" description:"参数名字"`
- Mean string `json:"mean" description:"参数含义"`
- Type string `json:"type" description:"参数类型,整形、字符串等"`
- Example string `json:"example" description:"参数示例"`
- Selected bool `json:"selected" description:"是否选择"`
- In string `json:"in" description:"body 或query"`
- Child []ManagementBaseApiParam `json:"child"`
- Value string `json:"value"`
- }
- type ManagementApiProviderRelation struct {
- Id int64 `json:"id"`
- ApiId int64 `json:"api_id"`
- ProviderApiId int64 `json:"provider_api_id"`
- Priority int `json:"priority"`
- GroupNo int `json:"group_no"`
- GroupName string `json:"group_name"`
- OldGroupNo int `json:"-" orm:"-"`
- }
- func (o *ManagementApiProviderRelation) TableName() string {
- return "t_gd_api_provider_relation"
- }
- type ManagementBaseApiInfo struct {
- Type int `json:"type" description:"参数类型0:数据api,1:h5 api, 2:辅助api"`
- Name string `json:"name" description:"基础api名"`
- Method string `json:"method" description:"方法,GET POST等"`
- Router string `json:"router" description:"路由"`
- RequestParam []ManagementBaseApiParam `json:"request_param" description:"请求参数"`
- ResponseParam []ManagementBaseApiParam `json:"response_param" description:"响应参数"`
- ErrorCode []int `json:"error_code" description:"错误码数组"`
- ThresholdTimeout int `json:"threshold_timeout"`
- ThresholdFailRate float64 `json:"threshold_fail_rate"`
- ThresholdNorecordRate float64 `json:"threshold_norecord_rage"`
- Enable bool `json:"enable"`
- Comment string `json:"comment"`
- }
- type TGdApi struct {
- Id int64 `json:"id"`
- ApiType int `json:"api_type"`
- Name string `json:"name"`
- Method string `json:"method" description:"方法,GET POST等"`
- Router string `json:"router" description:"路由"`
- RequestParam string `json:"request_param" description:"请求参数"`
- ResponseParam string `json:"response_param" description:"响应参数"`
- //ProviderApiIds string `json:"provider_api_ids" description:"三方api列表 "`
- Enable bool `json:"enable"`
- ErrorCodeIds string `json:"error_code_ids"`
- CreateTime string `json:"create_time"`
- UpdateTime string `json:"update_time"`
- ThresholdTimeout int `json:"threshold_timeout"`
- ThresholdFailRate float64 `json:"threshold_fail_rate"`
- ThresholdNorecordRate float64 `json:"threshold_norecord_rate"`
- WarningEnable bool `json:"warning_enable"`
- Comment string `json:"comment"`
- IsShow bool `json:"is_show"`
- RateLimit int `json:"rate_limit" description:"并发限制"`
- }
- type ManagementAddBaseApiReq struct {
- BaseApiInfo ManagementBaseApiInfo `json:"base_api_info" description:""`
- }
- type ManagementAddBaseApiReply struct {
- ApiId int64 `json:"api_id" description:""`
- }
- type ManagementDelBaseApiReq struct {
- ApiId int64 `json:"api_id" description:""`
- }
- type ManagementDelBaseApiReply struct {
- }
- type ManagementUpdateBaseApiReq struct {
- ApiId int64 `json:"api_id" description:""`
- BaseApiInfo ManagementBaseApiInfo `json:"base_api_info" description:""`
- }
- type ManagementUpdateBaseApiReply struct {
- ApiId int64 `json:"api_id" description:""`
- }
- type ManagementBaseApiListItem struct {
- ApiId int64 `json:"api_id" description:""`
- Enable bool `json:"enable"`
- IsShow bool `json:"is_show"`
- OperationTime string `json:"operation_time" description:"操作时间"`
- Name string `json:"api_name" description:""`
- Type string `json:"api_type" description:""`
- Router string `json:"router"`
- Method string `json:"method"`
- RequestParam string `json:"request_param"`
- ResponseParam string `json:"response_param"`
- ThresholdTimeout int `json:"threshold_timeout"`
- ThresholdFailRate float64 `json:"threshold_fail_rate"`
- ThresholdNorecordRate float64 `json:"threshold_norecord_rate"`
- WarningEnable bool `json:"warning_enable"`
- RateLimit int `json:"rate_limit" description:"并发限制"`
- }
- type ManagementGetBaseApiListReq struct {
- ApiType int `json:"api_type"`
- PageNumber int `json:"page_number" description:""`
- Search string `json:"search"`
- IsAll bool `json:"is_all"`
- MerchantId int64 `json:"merchant_id"`
- }
- type ManagementGetBaseApiListReply struct {
- Total int `json:"total" description:""`
- PageNumber int `json:"page_number" description:""`
- PageSize int `json:"page_size" description:""`
- BaseApiItemList []ManagementBaseApiListItem `json:"base_api_item_list"`
- }
- type ManagementGetBaseApiInfoReq struct {
- ApiId int64 `json:"api_id" description:""`
- }
- type ManagementGetBaseApiInfoReply struct {
- BaseApiInfo ManagementBaseApiInfo `json:"base_api_info" description:""`
- }
- //api停启用
- type ManagementSetBaseApiStateReq struct {
- ApiId int64 `json:"api_id" description:""`
- Enable bool `json:"enable" description:""`
- }
- type ManagementSetBaseApiStateReply struct {
- }
- type ProviderGroupApiIdItem struct {
- GroupNo int `json:"group_no"`
- GroupName string `json:"group_name"`
- ProviderApiIdList []int64 `json:"provider_api_id_list"`
- }
- type ManagementAddBaseApiProviderReq struct {
- ApiId int64 `json:"api_id"`
- //ProviderApiIdList []int64 `json:"provider_api_id_list"`
- ProviderGroupList []ProviderGroupApiIdItem `json:"provider_group_list"`
- }
- type ManagementAddBaseApiProviderReply struct {
- }
- type ManagementGetBaseApiProviderListReq struct {
- ApiId int64 `json:"api_id" description:"基础api id"`
- //PageNumber int64 `json:"page_number" description:"当前页"`
- }
- type BaseApiProviderItem struct {
- ProviderApiId int64 `json:"provider_api_id"`
- Priority int `json:"priority" description:"优先级"`
- ThirdpartApiName string `json:"thirdpart_api_name" description:"数据源接口名称"`
- ThirdpartApiRouter string `json:"thirdpart_api_router" description:"数据源接口路径"`
- PlatformName string `json:"platform_name" description:"数据源平台名称"`
- Enable bool `json:"enable"`
- }
- type BaseApiProviderGroupItem struct {
- GroupNo int `json:"group_no"`
- GroupName string `json:"group_name"`
- ProviderApiList []BaseApiProviderItem `json:"provider_api_list" description:""`
- }
- type ManagementGetBaseApiProviderListReply struct {
- //Total int `json:"" description:""`
- //PageSize int `json:"" description:""`
- //PageNumber int `json:"" description:""`
- //List []BaseApiProviderItemList `json:"list" description:""`
- //ProviderApiList []BaseApiProviderItem `json:"provider_api_list" description:""`
- ProviderGroupList []BaseApiProviderGroupItem `json:"provider_group_list"`
- }
- type ManagementGetBaseApiIdReq struct {
- Method string `json:"method" description:"方法,GET POST等"`
- Router string `json:"router" description:"路由"`
- }
- type ManagementGetBaseApiIdReply struct {
- ApiId int64 `json:"api_id" description:""`
- }
- type ManagementGetBaseApiByRouterReq struct {
- Method string `json:"method" description:"方法,GET POST等"`
- Router string `json:"router" description:"路由"`
- AppKey string `json:"app_key"`
- ApiId int `json:"api_id"`
- MerchantId int `json:"merchant_id"`
- }
- type ManagementGetBaseApiByRouterReply struct {
- Data map[string]string `json:"data"`
- }
- type ManagementSetBaseApiThresholdReq struct {
- ApiId int64 `json:"api_id" in:"query" require:"true"`
- ThresholdTimeout int `json:"threshold_timeout" in:"query" require:"false"`
- ThresholdFailRate float64 `json:"threshold_fail_rate" in:"query" require:"false"`
- ThresholdNorecordRate float64 `json:"threshold_norecord_rate" in:"query" require:"false"`
- WarningEnable bool `json:"warning_enable"`
- RateLimit int `json:"rate_limit" description:"并发限制"`
- }
- type ManagementSetBaseApiThresholdReply struct {
- }
- type ManagementSetBaseApiShowInfoReq struct {
- ApiId int64 `json:"api_id" description:"api id" in:"path"`
- IsShow bool `json:"is_show"`
- }
- type ManagementSetBaseApiShowInfoReply struct {
- }
|