123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package apis
- type ManagementCheckApiReq struct {
- Header map[string]string `json:"header" description:"header 非加密"`
- Method string `json:"method" description:"请求方法 POST PUT ..."`
- Router string `json:"router"`
- Ip string `json:"ip" description:"请求的ip地址"`
- RequestParam []byte `json:"request_param" description:"query参数"`
- OriginRequestParam string `json:"origin_request_param"`
- }
- 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:"出参转换"`
- Child []ManagementBaseApiParam `json:"child"`
- }
- type RateLimitToken struct {
- AppKey string `json:"app_key" `
- Router string `json:"router"`
- RouterToken string `json:"router_token"`
- MerchantToken string `json:"merchant_token"`
- }
- type CheckMerchantApiResult struct {
- MerchantId int64 `json:"merchant_id" description:"商户id"`
- IsHttpCode int `json:"is_http_code"`
- MerchantChildApiId int64 `json:"merchant_child_api_id"`
- MerchantDataApiId int64 `json:"merchant_data_api_id"`
- BaseApiId int64 `json:"base_api_id" description:"基础api id"`
- ComboType int `json:"combo_type" description:"套餐类型 1 总次数, 2 按天"`
- CountType int `json:"count_type" description:"计数类型,即查 即得"`
- CountCode string `json:"count_code" description:"如果即查,返回码为该字段中的一种时需扣次数"`
- IsForceUpdate bool `json:"is_force_update" description:"是否强更"`
- RequstParamConf []ManagementBaseApiParam `json:"request_param_conf" description:"请求参数"`
- ResponseParamConf []ManagementBaseApiParam `json:"response_param_conf" description:"响应参数"`
- DecryptParam []byte `json:"descrypt_query_param" description:"解密后的参数"`
- AppSecret string `json:"app_secret"`
- IsCrypto bool `json:"is_encrypt"`
- AccessCountId int64 `json:"access_count_id"`
- ReuseTime int `json:"reuse_time"`
- ReplaceInfo MerchantReplaceInfo `json:"merchant_replace_info"`
- Timeout uint64 `json:"timeout" description:"商户接口超时时间"`
- MinimalTimeConsuming int `json:"minimal_time_consuming" description:"最小耗时"`
- RandomPercentage int `json:"random_percentage" description:"随机百分比"`
- IsRawErrorCode bool `json:"is_raw_error_code" description:"是否返回原始错误码"`
- Token RateLimitToken `json:"token"`
- // TODO 扣费方式 1 按量 2 按充值金额
- FeeType int `json:"fee_type"`
- // 单价
- UnitPrice float64 `json:"unit_price"`
- }
- type MerchantReplaceInfo struct {
- ReplaceMerchantId int64 `json:"replace_merchant_id"`
- ReplaceBaseApiId int64 `json:"replace_base_api_id"`
- ReplaceMerchantDataApiId int64 `json:"replace_merchant_data_api_id"`
- ReplaceMerchantChildApiId int64 `json:"replace_merchant_child_api_id"`
- }
- type ManagementCheckApiReply struct {
- MerchantApiInfo CheckMerchantApiResult `json:"api_info" description:"校验成功后商户api相关信息"`
- ErrCode int `json:"err_code"`
- ErrMsg string `json:"err_msg"`
- }
- type ManagementThirdpartCountIncreaseReq struct {
- State bool `json:"state" description:"访问三方状态,false失败,true成功"`
- MerchantChildApiId int64 `json:"merchant_child_api_id"`
- ProviderApiId int64 `json:"provider_api_id"`
- RawCode string `json:"raw_code"`
- }
- type ManagementThirdpartCountIncreaseReply struct {
- }
- type ManagementCheckCountCodeReq struct {
- AccessCountId int64 `json:"access_count_id"`
- CountCode string `json:"count_code"`
- Code string `json:"code"`
- CountType int `json:"count_type" description:"0 即查 1即得"`
- //TODO 扣费方式 1 按量 2 按充值金额
- FeeType int `json:"fee_type"`
- // 单价
- UnitPrice float64 `json:"unit_price"`
- MerchantDataApiId int64 `json:"merchant_data_api_id"`
- MerchantId int64 `json:"merchant_id"`
- }
- type ManagementCheckCountCodeReply struct {
- }
- type MerchantAppLoginReq struct {
- User string `json:"user"`
- Password string `json:"password"`
- }
- type MerchantAppLoginReply struct {
- MerchantId int64 `json:"merchant_id"`
- }
|