auth_check.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package apis
  4. type ProviderParamFilter struct {
  5. Name string `json:"name"`
  6. Value string `json:"value"`
  7. }
  8. type MerchantProviderLimitInfo struct {
  9. ProviderApiId int64 `json:"provider_api_id"`
  10. ProviderId int64 `json:"provider_id"`
  11. Enable bool `json:"enable" description:"商户数据源是否启用"`
  12. State bool `json:"state" description:"数据源是否启用"`
  13. DayCount int64 `json:"day_count" description:"每天限制访问次数"`
  14. ProviderApiCode string `json:"provider_api_code" description:"三方api 代码"`
  15. ThirdpartHost string `json:"thirdpart_host" description:"三方api域名"`
  16. ThirdpartApiName string `json:"thirdpart_api_name" description:"三方api名"`
  17. ThirdpartApiRouter string `json:"thirdpart_api_router" description:"三方api路由"`
  18. ThirdpartApiMethod string `json:"thirdpart_api_method" description:"三方api方法"`
  19. Count int64 `json:"count" description:"当天访问次数"`
  20. DayCountMaxLimit int64 `json:"day_count_max_limit" description:"每天数据源总访问上限"`
  21. Inventory int64 `json:"inventory" description:"保有量"`
  22. RetainMargin int64 `json:"retain_margin" description:"保有余量(总量-所有保有量)"`
  23. GroupNo int `json:"group_no"`
  24. RetainMarginTotalUsed int64 `json:"retain_margin_total_used"`
  25. Filters []ProviderParamFilter `json:"filters" orm:"-"`
  26. Params map[string]string `json:"-"`
  27. Timeout int `json:"timeout"`
  28. }
  29. type ManagementCheckProviderApiReq struct {
  30. MerchantChildApiId int64 `json:"merchant_child_api_id"`
  31. BaseApiId int64 `json:"base_api_id"`
  32. }
  33. type ManagementCheckProviderApiReply struct {
  34. MerchantProviderLimitInfoList []MerchantProviderLimitInfo `json:"merchant_provider_limit_info"`
  35. }