Documentation
¶
Index ¶
- Constants
- type AssetsBalanceResponse
- type AssetsBalanceResult
- type Client
- func (c *Client) AssetsBalance(ctx context.Context, notMustParams ...gorequest.Params) (*AssetsBalanceResult, error)
- 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) GetApiUrl() string
- func (c *Client) GetUserID() string
- func (c *Client) NotifyUrl(ctx context.Context, params NotifyUrlParams, param gorequest.Params) error
- func (c *Client) PackageList(ctx context.Context, 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) SetApiKey(v string) *Client
- func (c *Client) SetApiUrl(v string) *Client
- func (c *Client) SetClientIP(clientIP string) *Client
- func (c *Client) SetLogFun(logFun gorequest.LogFunc)
- func (c *Client) SetTrace(trace bool)
- func (c *Client) SetUserID(v string) *Client
- func (c *Client) TraceEndSpan()
- func (c *Client) TraceGetSpanID() (spanID string)
- func (c *Client) TraceGetTraceID() (traceID string)
- func (c *Client) TraceRecordError(err error, options ...trace.EventOption)
- func (c *Client) TraceSetAttributes(kv ...attribute.KeyValue)
- func (c *Client) TraceSetStatus(code codes.Code, description string)
- func (c *Client) TraceStartSpan(ctx context.Context, spanName string) context.Context
- type ClientConfig
- type ElectricityBillOrderQueryResponse
- type ElectricityBillOrderQueryResult
- type ElectricityBillOrderResponse
- type ElectricityBillOrderResult
- type NotifyUrlParams
- 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"
)
View Source
const (
Version = "1.0.9"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetsBalanceResponse ¶ added in v1.0.1
type AssetsBalanceResult ¶ added in v1.0.1
type AssetsBalanceResult struct { Result AssetsBalanceResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) AssetsBalance ¶ added in v1.0.1
func (c *Client) AssetsBalance(ctx context.Context, notMustParams ...gorequest.Params) (*AssetsBalanceResult, error)
AssetsBalance 余额查询
func (*Client) ElectricityBillOrder ¶
func (c *Client) ElectricityBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*ElectricityBillOrderResult, error)
ElectricityBillOrder 电费订单下单
func (*Client) ElectricityBillOrderQuery ¶
func (c *Client) ElectricityBillOrderQuery(ctx context.Context, orderID string, orderNo string, notMustParams ...gorequest.Params) (*ElectricityBillOrderQueryResult, error)
ElectricityBillOrderQuery 电费订单查询
func (*Client) NotifyUrl ¶ added in v1.0.2
func (c *Client) NotifyUrl(ctx context.Context, params NotifyUrlParams, param gorequest.Params) error
NotifyUrl 通知回调地址
func (*Client) PackageList ¶
func (c *Client) PackageList(ctx context.Context, notMustParams ...gorequest.Params) (*PackageListResult, error)
PackageList 套餐列表 package_type = 套餐类型 phone_bill=话费 electricity=电费)
func (*Client) PhoneBillOrder ¶
func (c *Client) PhoneBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*PhoneBillOrderResult, error)
PhoneBillOrder 话费订单下单
func (*Client) PhoneBillOrderQuery ¶
func (c *Client) PhoneBillOrderQuery(ctx context.Context, orderID, orderNo string, notMustParams ...gorequest.Params) (*PhoneBillOrderQueryResult, error)
PhoneBillOrderQuery 话费订单查询
func (*Client) SetClientIP ¶ added in v1.0.6
SetClientIP 配置
func (*Client) TraceEndSpan ¶ added in v1.0.6
func (c *Client) TraceEndSpan()
TraceEndSpan 结束OpenTelemetry链路追踪状态
func (*Client) TraceGetSpanID ¶ added in v1.0.7
TraceGetSpanID 获取OpenTelemetry链路追踪SpanID
func (*Client) TraceGetTraceID ¶ added in v1.0.7
TraceGetTraceID 获取OpenTelemetry链路追踪TraceID
func (*Client) TraceRecordError ¶ added in v1.0.8
func (c *Client) TraceRecordError(err error, options ...trace.EventOption)
TraceRecordError 记录OpenTelemetry链路追踪错误
func (*Client) TraceSetAttributes ¶ added in v1.0.7
TraceSetAttributes 设置OpenTelemetry链路追踪属性
func (*Client) TraceSetStatus ¶ added in v1.0.7
TraceSetStatus 设置OpenTelemetry链路追踪状态
type ClientConfig ¶
ClientConfig 实例配置
type ElectricityBillOrderQueryResponse ¶
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,omitempty"` Time int `json:"time"` TraceId string `json:"trace_id"` }
type ElectricityBillOrderQueryResult ¶
type ElectricityBillOrderQueryResult struct { Result ElectricityBillOrderQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type ElectricityBillOrderResult ¶
type ElectricityBillOrderResult struct { Result ElectricityBillOrderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type NotifyUrlParams ¶ added in v1.0.2
type PackageListResponse ¶
type PackageListResponse struct { Code int `json:"code"` Info string `json:"info"` Data []struct { RechargeMoney float64 `json:"recharge_money"` // 充值金额 RechargeType string `json:"recharge_type"` // 充值类型 RechargeOperatorType string `json:"recharge_operator_type,omitempty"` // 充值运营商类型 } `json:"data,omitempty"` Time int `json:"time"` TraceId string `json:"trace_id"` }
type PackageListResult ¶
type PackageListResult struct { Result PackageListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type PhoneBillOrderQueryResponse ¶
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,omitempty"` Time int `json:"time"` TraceId string `json:"trace_id"` }
type PhoneBillOrderQueryResult ¶
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.