123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package apis
- type DataApi struct {
- Id int64 `json:"data_api_id" description:"数据api id"`
- DataApiName string `json:"data_api_name" description:"数据api名"`
- DataApiType int `json:"data_api_type" description:"数据api类型"`
- DataApiDesc string `json:"data_api_desc" description:"数据API描述"`
- Version string `json:"version" description:"数据api版本"`
- IsRelease bool `json:"is_release" description:"是否发布"`
- ReleaseTime string `json:"release_time" description:"发布时间"`
- CreateTime string `json:"-"`
- UpdateTime string `json:"-"`
- }
- func (o *DataApi) TableName() string {
- return "t_gd_data_api"
- }
- type QueryType struct {
- Id int64 `json:"query_type_id" description:"数据api查询方式id"`
- DataApiId int64 `json:"data_api_id" description:"数据api"`
- IsFree bool `json:"is_free" description:"数据api查询方式是否免费"`
- QueryTypeName string `json:"query_type_name" description:"查询方式名"`
- CreateTime string `json:"-"`
- UpdateTime string `json:"-"`
- DataApiBaseApis []ManagementDataApiBaseApi `json:"data_api_base_apis" orm:"-" description:"数据api中基础api"`
- DayDataCombos []DataCombo `json:"day_data_combos" orm:"-"`
- TotalDataCombos []DataCombo `json:"total_data_combos" orm:"-"`
- FreeDataCombos []DataCombo `json:"free_data_combos" orm:"-"`
- UnitPrice float64 `json:"unit_price"`
- //DataCombos []DataCombo `json:"-" orm:"-" description:"数据api中数据套餐"`
- }
- func (o *QueryType) TableName() string {
- return "t_gd_data_api_query_type"
- }
- type BaseApiParamFilter struct {
- Name string `json:"name"`
- Value string `json:"value"`
- RuleId int `json:"rule_id"`
- }
- type ManagementDataApiBaseApi struct {
- Id int64 `json:"data_api_base_api_id" description:"数据api中基础api id"`
- Priority int `json:"priority" description:"数据api中基础api 优先级"`
- ApiId int64 `json:"api_id" description:"基础api id"`
- ApiName string `json:"api_name" orm:"-"`
- SaleName string `json:"sale_name" description:"销售名"`
- QueryTypeId int64 `json:"query_type_id" description:"查询方式id"`
- //ProviderApis string `json:"-"`
- //ProviderApiLimitGroup []ProviderLimitGroup `json:"provider_api_limit_group" orm:"-"`
- ProviderGroupList []BaseApiProviderGroupItem `json:"provider_group_list" orm:"-" description:""`
- RequestParams []ManagementBaseApiParam `json:"request_params" description:"请求参数" orm:"-"`
- ResponseParams []ManagementBaseApiParam `json:"response_params" description:"响应参数" orm:"-"`
- RequestParam string `json:"-" description:"请求参数json字符串"`
- ResponseParam string `json:"-" description:"响应参数json字符串"`
- CountType int `json:"count_type" description:"计数类型"`
- CountCode string `json:"count_code" description:"计数码"`
- ForceUpdate bool `json:"force_update" description:是否强更"`
- IsCrypto bool `json:"is_crypto" description:"是否加密"`
- CreateTime string `json:"-"`
- UpdateTime string `json:"-"`
- ReuseTime int `json:"reuse_time"`
- Filter string `json:"filter"`
- Filters []BaseApiParamFilter `json:"filters" orm:"-"`
- Router string `orm:"-" json:"router"`
- ApiType int `orm:"-" json:"api_type"`
- }
- func (o *ManagementDataApiBaseApi) TableName() string {
- return "t_gd_child_data_api"
- }
- type DataCombo struct {
- Id int64 `json:"combo_id" description:"查询方式套餐id"`
- QueryTypeId int64 `json:"query_type_id" description:"查询方式id"`
- Count int64 `json:"count" description:"次数"`
- Price float64 `json:"price" description:"价格"`
- Type int `json:"type" description:"计数类型" description:"1 总次数,2 按天"`
- TotalDay int `json:"total_day" description:"总天数"`
- //IsFree bool `json:"-" description:"是否免费"`
- CreateTime string `json:"-"`
- UpdateTime string `json:"-"`
- }
- func (o *DataCombo) TableName() string {
- return "t_gd_data_api_combo"
- }
- // 添加数据api
- type ManagementDataApiAddApiReq struct {
- DataApiName string `json:"data_api_name"`
- DataApiType int `json:"data_api_type"`
- Version string `json:"version"`
- DataApiDesc string `json:"data_api_desc"`
- }
- type ManagementDataApiAddApiReply struct {
- DataApiId int64 `json:"data_api_id"`
- }
- // 删除数据api
- type ManagementDataApiDeleteApiReq struct {
- DataApiId int64 `json:"data_api_id"`
- }
- type ManagementDataApiDeleteApiReply struct {
- }
- // 修改数据api
- type ManagementDataApiModifyApiReq struct {
- DataApiId int64 `json:"data_api_id"`
- DataApiName string `json:"data_api_name"`
- DataApiType int `json:"data_api_type"`
- Version string `json:"version"`
- DataApiDesc string `json:"data_api_desc"`
- }
- type ManagementDataApiModifyApiReply struct {
- }
- // 获取数据api列表
- type ManagementDataApiGetAllReq struct {
- PageSize int64 `json:"page_size"`
- PageNumber int64 `json:"page_number" description:""`
- Search string `json:"search"`
- IsAll bool `json:"is_all"`
- DataApiType string `json:"data_api_type"`
- MerchantId int64 `json:"merchant_id"`
- }
- type ManagementDataApiGetAllReply struct {
- Total int64 `json:"total" description:""`
- PageSize int64 `json:"page_size" description:"page大小"`
- PageNumber int64 `json:"page_number" description:""`
- DataApis []DataApi `json:"data_apis"`
- }
- // 获取数据api详情
- type ManagementDataApiGetApiInfoReq struct {
- DataApiId int64 `json:"data_api_id"`
- }
- type ManagementDataApiGetApiInfoReply struct {
- QueryTypes []QueryType `json:"query_types"`
- }
- // 发布数据api
- type ManagementDataApiReleaseApiReq struct {
- DataApiId int64 `json:"data_api_id"`
- Status int `json:"status"`
- }
- type ManagementDataApiReleaseApiReply struct {
- }
- type ManagementQueryTypeInfo struct {
- DataApiId int64 `json:"data_api_id"`
- QueryTypeName string `json:"query_type_name"`
- }
- // 添加数据api查询方式
- /*type ManagementDataApiAddQueryTypeReq struct {
- QueryTypeInfos []ManagementQueryTypeInfo `json:"query_type_infos"`
- }
- type ManagementAddQueryType struct {
- QueryTypeId int64 `json:"query_type_id" description:"数据api查询方式id"`
- QueryTypeName string `json:"query_type_name" description:"数据api查询方式名"`
- }
- type ManagementDataApiAddQueryTypeReply struct {
- ManagementAddQueryTypes []ManagementAddQueryType `json:"management_add_query_types"`
- }*/
- type DataApiQueryTypeInfo struct {
- QueryTypeId int64 `json:"query_type_id"`
- QueryTypeName string `json:"query_type_name" description:"数据api查询方式名"`
- }
- // 添加数据api查询方式
- type ManagementDataApiAddQueryTypeReq struct {
- DataApiId int64 `json:"data_api_id"`
- QueryTypes []DataApiQueryTypeInfo `json:"query_types"`
- }
- type ManagementDataApiAddQueryTypeReply struct {
- QueryTypes []DataApiQueryTypeInfo `json:"query_types"`
- }
- // 修改数据api查询方式
- type ManagementDataApiModifyQueryTypeReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- QueryTypeName string `json:"query_type_name"`
- }
- type ManagementDataApiModifyQueryTypeReply struct {
- }
- // 删除数据api查询方式
- type ManagementDataApiRemoveQueryTypeReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- }
- type ManagementDataApiRemoveQueryTypeReply struct {
- }
- // 获取数据api查询方式
- type ManagementDataApiGetQueryTypeReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- }
- type ManagementDataApiGetQueryTypeReply struct {
- QueryTypeInfo QueryType `json:"query_type_info"`
- }
- type DataApiAddBaseApi struct {
- ApiId int64 `json:"api_id"`
- //Priority int `json:"priority" description:"优先级"`
- }
- // 数据api添加基础api
- type ManagementDataApiAddBaseApiReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- BaseApiList []int64 `json:"base_api_list"`
- }
- type ManagementDataApiAddBaseApiReply struct {
- //DataApiBaseApiId int64 `json:"data_api_base_api_id"`
- }
- // 数据api删除基础api
- type ManagementDataApiRemoveBaseApiReq struct {
- DataApiBaseApiId int64 `json:"data_api_base_api_id"`
- }
- type ManagementDataApiRemoveBaseApiReply struct {
- }
- // 数据api修改基础api信息
- type ManagementDataApiModifyBaseApiReq struct {
- DataApiBaseApiId int64 `json:"data_api_base_api_id"`
- ProviderApis string `json:"-"`
- SaleName string `json:"sale_name" description:"销售名"`
- ProviderGroupList []BaseApiProviderGroupItem `json:"provider_group_list"`
- //ProviderApiLimitGroup []ProviderLimitGroup `json:"provider_api_limit_group"`
- RequestParam []ManagementBaseApiParam `json:"request_params"`
- ResponseParam []ManagementBaseApiParam `json:"response_params"`
- CountCode string `json:"count_code"`
- CountType int `json:"count_type"`
- ForceUpdate bool `json:"force_update"`
- IsCrypto bool `json:"is_crypto"`
- ReuseTime int `json:"reuse_time"`
- Filters []BaseApiParamFilter `json:"filters"`
- }
- type ManagementDataApiModifyBaseApiReply struct {
- }
- // 数据api获取基础api
- type ManagementDataApiGetBaseApiReq struct {
- DataApiBaseApiId int64 `json:"data_api_base_api_id"`
- //DataApiQueryTypeId int64 `json:"data_api_query_type_id"`
- }
- type ManagementDataApiGetBaseApiReply struct {
- DataApiBaseApis ManagementDataApiBaseApi `json:"data_api_base_apis" orm:"-"`
- }
- // 数据api添加数据套餐
- type ManagementDataApiAddDataCombo struct {
- ComboId int64 `json:"combo_id"`
- QueryTypeId int64 `json:"query_type_id"`
- Count int64 `json:"count"`
- Type int `json:"type" description:"1 总次数,2 按天"`
- TotalDay int `json:"total_day"`
- Price float64 `json:"price"`
- IsDelete bool `json:"is_delete"`
- }
- type ManagementDataApiAddDataComboReq struct {
- ManagementAddDataComboList []ManagementDataApiAddDataCombo `json:"management_add_data_combo_list"`
- }
- type ManagementDataApiAddDataComboReply struct {
- //ComboId int64 `json:"combo_id"`
- }
- // 数据api修改数据套餐
- type ManagementDataApiModifyDataComboReq struct {
- ComboId int64 `json:"combo_id"`
- Count int64 `json:"count"`
- //Type int `json:"type"`
- TotalDay int `json:"total_day"`
- Price float64 `json:"price"`
- //IsFree bool `json:"is_free"`
- }
- type ManagementDataApiModifyDataComboReply struct {
- }
- // 数据api删除数据套餐
- type ManagementDataApiRemoveDataComboReq struct {
- ComboId int64 `json:"combo_id"`
- }
- type ManagementDataApiRemoveDataComboReply struct {
- }
- // 获取数据api数据套餐
- type ManagementDataApiGetDataComboReq struct {
- ComboId int64 `json:"combo_id"`
- }
- type ManagementDataApiGetDataComboReply struct {
- Count int `json:"count"`
- Price float64 `json:"price"`
- Type int `json:"type"`
- TotalDay int `json:"total_day"`
- QueryTypeName string `json:"query_type_name"`
- }
- type ProviderLimitGroup struct {
- GroupId int `json:"group_id"`
- ProviderApiLimits []ProviderApiLimit `json:"provider_api_limits"`
- }
- // 数据api选择三方数据源接口
- type ProviderApiLimit struct {
- ThirdpartApiId int64 `json:"thirdpart_api_id" description:"三方api id"`
- PlatformName string `json:"platform_name" description:"三方平台名"`
- PlatformCode string `json:"platform_code" description:"三方平台码"`
- ThirdpartApiName string `json:"thirdpart_api_name" description:"三方api名称"`
- ThirdpartApiRouter string `json:"thirdpart_api_router" description:"三方api路由"`
- ThirdpartApiMethod string `json:"thirdpart_api_method" description:"三方api方法"`
- Enable bool `json:"enable" description:"是否启用"`
- DayCount int `json:"day_count" description:"每日调用量限额"`
- Count int `json:"count" description:"总调用量限额"`
- }
- /*type ManagementDataApiChooseProviderApiReq struct {
- DataApiBaseApiId int64 `json:"data_api_base_api_id"`
- ProviderApiLimitGroup []ProviderLimitGroup `json:"provider_api_limit_group"`
- }
- type ManagementDataApiChooseProviderApiReply struct {
- }*/
- // 数据api中 api优先级调整
- /*type DataApiPriority struct {
- DataApiBaseApiId int64 `json:"data_api_base_api_id"`
- Priority int `json:"priority"`
- }
- type ManagementDataApiChangeBaseApiIndexReq struct {
- DataApiPriorityList []DataApiPriority `json:"data_api_priority_list"`
- }
- */
- type ManagementDataApiChangeBaseApiIndexReply struct {
- }
- // 获取数据api查询方式
- type ManagementDataApiQueryTypeList struct {
- QueryTypeId int64 `json:"query_type_id"`
- QueryTypeName string `json:"query_type_name"`
- }
- type ManagementDataApiGetQueryTypeListReq struct {
- DataApiId int64 `json:"data_api_id"`
- }
- type ManagementDataApiGetQueryTypeListReply struct {
- ManagementDataApiQueryTypeList []ManagementDataApiQueryTypeList `json:"query_type_list"`
- }
- // 设置查询方式数据套餐
- type ManagementDataApiSetFreeDataComboReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- DataApiQueryTypeIsFree bool `json:"is_free"`
- UnitPrice float64 `json:"unit_price"`
- Count int64 `json:"count"`
- }
- type ManagementDataApiSetFreeDataComboReply struct {
- }
- type ManagementQueryTypeBaseApi struct {
- Priority int `json:"priority" description:"优先级"`
- DataApiBaseApiId int64 `json:"data_api_base_api_id" description:"数据api中基础api id"`
- ApiId int64 `json:"api_id"`
- ApiName string `json:"api_name"`
- SaleName string `json:"sale_name"`
- ApiType int `json:"api_type"`
- Router string `json:"router"`
- }
- type ManagementQueryTypeBaseApiListReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- }
- type ManagementQueryTypeBaseApiListReply struct {
- ManagementQueryTypeBaseApiList []ManagementQueryTypeBaseApi `json:"management_query_type_base_api_list"`
- }
- type ManagementDataApiComboListReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- }
- type DataApiComboListItem struct {
- ComboId int64 `json:"combo_id"`
- ComboDesc string `json:"combo_desc" description:"套餐描述"` // desc 改为 combodesc
- ComboType int `json:"combo_type" description:"套餐类型"`
- Count int `json:"count"`
- Price float64 `json:"price"`
- //Type int `json:"type"`
- }
- type ManagementDataApiComboListReply struct {
- //ComboList []string `json:"combo_list"`
- ComboList []DataApiComboListItem `json:"combo_list"`
- }
- type TGdDataApiProviderApiRelation struct {
- Id int64 `json:"id"`
- ChildDataApiId int64 `json:"child_data_api_id"`
- ProviderApiId int64 `json:"provider_api_id"`
- GroupNo int `json:"group_no"`
- GroupName string `json:"group_name"`
- Enable bool `json:"enable"`
- }
- type GetApiInfoReq struct {
- Id int64 `json:"id"`
- }
- type GetApiInfoReply struct {
- DataApiName string `json:"data_api_name" description:"数据api名"`
- DataApiType int `json:"data_api_type" description:"数据api类型"`
- DataApiDesc string `json:"data_api_desc" description:"数据API描述"`
- Version string `json:"version" description:"数据api版本"`
- IsRelease bool `json:"is_release" description:"是否发布"`
- }
- type GetDataComboFreeReq struct {
- QueryTypeId int64 `json:"query_type_id"`
- }
- type GetDataComboFreeReply struct {
- Count int64 `json:"count"`
- IsFree int `json:"is_free"`
- }
- type ManagementGetFilterRuleReq struct {
- }
- type FilterRule struct {
- RuleId int64 `orm:"column(id)" json:"rule_id"`
- RuleName string `orm:"column(name)" json:"rule_name"`
- RuleDesc string `orm:"column(desc)" json:"rule_desc"`
- EffectiveParam string `orm:"column(effective_param)" json:"effective_param"`
- }
- type ManagementGetFilterRuleReply struct {
- Rules []FilterRule `json:"rules"`
- }
|