Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ConfigApp(userID string, apiKey string) *Client
- func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)
- func (c *Client) DefaultHttp()
- func (c *Client) ElectricityBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*ElectricityBillOrderResult, error)
- func (c *Client) ElectricityBillOrderQuery(ctx context.Context, orderID string, orderNo string, ...) (*ElectricityBillOrderQueryResult, error)
- func (c *Client) GetApiKey() string
- func (c *Client) GetUserID() string
- func (c *Client) PackageList(ctx context.Context, packageType string, notMustParams ...gorequest.Params) (*PackageListResult, error)
- func (c *Client) PhoneBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*PhoneBillOrderResult, error)
- func (c *Client) PhoneBillOrderQuery(ctx context.Context, orderID, orderNo string, ...) (*PhoneBillOrderQueryResult, error)
- func (c *Client) SetHttp(app *gorequest.App)
- type ClientConfig
- type ElectricityBillOrderQueryResponse
- type ElectricityBillOrderQueryResult
- type ElectricityBillOrderResponse
- type ElectricityBillOrderResult
- type PackageListResponse
- type PackageListResult
- type PhoneBillOrderQueryResponse
- type PhoneBillOrderQueryResult
- type PhoneBillOrderResponse
- type PhoneBillOrderResult
Constants ¶
View Source
const ( CodeError = 0 // 请求异常 CodeSuccess = 1 // 请求成功 )
View Source
const ( OrderStatusRecharge = "RECHARGE" // 充值中 OrderStatusFailure = "FAILURE" // 充值失败 OrderStatusSuccess = "SUCCESS" // 充值成功 )
View Source
const (
LogTable = "aswzk"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) ConfigSLogClientFun ¶
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)
ConfigSLogClientFun 日志配置
func (*Client) ElectricityBillOrder ¶
func (c *Client) ElectricityBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*ElectricityBillOrderResult, error)
ElectricityBillOrder 电费订单下单
func (*Client) ElectricityBillOrderQuery ¶ added in v1.0.202
func (c *Client) ElectricityBillOrderQuery(ctx context.Context, orderID string, orderNo string, notMustParams ...gorequest.Params) (*ElectricityBillOrderQueryResult, error)
ElectricityBillOrderQuery 电费订单查询
func (*Client) PackageList ¶ added in v1.0.211
func (c *Client) PackageList(ctx context.Context, packageType string, notMustParams ...gorequest.Params) (*PackageListResult, error)
PackageList 套餐列表
func (*Client) PhoneBillOrder ¶
func (c *Client) PhoneBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*PhoneBillOrderResult, error)
PhoneBillOrder 话费订单下单
func (*Client) PhoneBillOrderQuery ¶ added in v1.0.202
func (c *Client) PhoneBillOrderQuery(ctx context.Context, orderID, orderNo string, notMustParams ...gorequest.Params) (*PhoneBillOrderQueryResult, error)
PhoneBillOrderQuery 话费订单查询
type ClientConfig ¶
ClientConfig 实例配置
type ElectricityBillOrderQueryResponse ¶ added in v1.0.202
type ElectricityBillOrderQueryResponse struct { Code int `json:"code"` // 状态码 Info string `json:"info"` // 状态信息 Data struct { RechargeAccount string `json:"recharge_account"` // 充值账号 RechargeMoney float64 `json:"recharge_money"` // 充值金额 RechargeType string `json:"recharge_type"` // 充值类型 RechargeReason string `json:"recharge_reason,omitempty"` // 充值失败原因 OrderID string `json:"order_id"` // 订单编号 OrderNo string `json:"order_no"` // 商户订单编号 Remark string `json:"remark"` // 订单备注 OrderStatus string `json:"order_status"` // 订单状态 OrderCost float64 `json:"order_cost,omitempty"` // 订单成本价 } `json:"data"` Time int `json:"time"` TraceId string `json:"trace_id"` }
type ElectricityBillOrderQueryResult ¶ added in v1.0.202
type ElectricityBillOrderQueryResult struct { Result ElectricityBillOrderQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type ElectricityBillOrderResult ¶
type ElectricityBillOrderResult struct { Result ElectricityBillOrderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type PackageListResponse ¶ added in v1.0.211
type PackageListResponse struct { Code int `json:"code"` Info string `json:"info"` Data []struct { RechargeMoney int `json:"recharge_money"` // 充值金额 RechargeType string `json:"recharge_type"` // 充值类型 RechargeOperatorType string `json:"recharge_operator_type,omitempty"` // 充值运营商类型 } `json:"data"` Time int `json:"time"` TraceId string `json:"trace_id"` }
type PackageListResult ¶ added in v1.0.211
type PackageListResult struct { Result PackageListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type PhoneBillOrderQueryResponse ¶ added in v1.0.202
type PhoneBillOrderQueryResponse struct { Code int `json:"code"` Info string `json:"info"` Data struct { RechargeAccount string `json:"recharge_account"` // 充值账号 RechargeMoney float64 `json:"recharge_money"` // 充值金额 RechargeType string `json:"recharge_type"` // 充值类型 RechargeReason string `json:"recharge_reason,omitempty"` // 充值失败原因 OrderID string `json:"order_id"` // 订单编号 OrderNo string `json:"order_no"` // 商户订单编号 Remark string `json:"remark"` // 订单备注 OrderStatus string `json:"order_status"` // 订单状态 OrderCost float64 `json:"order_cost,omitempty"` // 订单成本价 } `json:"data"` Time int `json:"time"` TraceId string `json:"trace_id"` }
type PhoneBillOrderQueryResult ¶ added in v1.0.202
type PhoneBillOrderQueryResult struct { Result PhoneBillOrderQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type PhoneBillOrderResponse ¶
type PhoneBillOrderResult ¶
type PhoneBillOrderResult struct { Result PhoneBillOrderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
Click to show internal directories.
Click to hide internal directories.