Documentation ¶
Index ¶
- Constants
- func CallResponseString() string
- func QueryAfdian[T any, R any](c *Client, requestPath string, params *T) (*R, error)
- type AfdianCall
- type AfdianCallData
- type AfdianCallResponse
- type AfdianResponse
- type Client
- type Order
- type PageData
- type Plan
- type Request
- type Sku
- type Sponsor
- type Timing
- type User
Constants ¶
View Source
const AfDianOpenApiUri = "https://afdian.net/api/open"
Variables ¶
This section is empty.
Functions ¶
func CallResponseString ¶
func CallResponseString() string
Types ¶
type AfdianCall ¶
type AfdianCall AfdianResponse[AfdianCallData]
type AfdianCallData ¶
type AfdianCallResponse ¶
AfdianCallResponse 爱发电回调返回 {"ec":200,"em":""}
func CallResponseStruct ¶
func CallResponseStruct() *AfdianCallResponse
type AfdianResponse ¶
type Client ¶
func (*Client) QueryOrder ¶
QueryOrder 查订单
type Order ¶
type Order struct { OutTradeNo string `json:"out_trade_no"` UserId string `json:"user_id"` PlanId string `json:"plan_id"` Month int `json:"month"` TotalAmount float64 `json:"total_amount"` ShowAmount float64 `json:"show_amount"` Status int `json:"status"` Remark string `json:"remark"` RedeemId string `json:"redeem_id"` ProductType int `json:"product_type"` Discount float64 `json:"discount"` SkuDetail []Sku `json:"sku_detail"` PlanTitle string `json:"plan_title"` UserPrivateId string `json:"user_private_id"` AddressPerson string `json:"address_person"` AddressPhone string `json:"address_phone"` AddressAddress string `json:"address_address"` }
func ParseOrderInterface ¶
ParseOrderInterface 爱发电调服务器的请求内容, 解析成Order (AWS无法使用json模糊解析)
type Plan ¶
type Plan struct { BundleSkuSelectCount int `json:"bundle_sku_select_count"` BundleStock int `json:"bundle_stock"` CanBuyHide int `json:"can_buy_hide"` Coupon []interface{} `json:"coupon"` Desc string `json:"desc"` ExpireTime int `json:"expire_time"` FavorablePrice int `json:"favorable_price"` HasCoupon int `json:"has_coupon"` Independent int `json:"independent"` Name string `json:"name"` NeedAddress int `json:"need_address"` NeedInviteCode bool `json:"need_invite_code"` PayMonth int `json:"pay_month"` Permanent int `json:"permanent"` Pic string `json:"pic"` PlanId string `json:"plan_id"` Price float64 `json:"price"` ProductType int `json:"product_type"` Rank int `json:"rank"` RankType int `json:"rankType"` SaleLimitCount int `json:"sale_limit_count"` ShowPrice float64 `json:"show_price"` ShowPriceAfterAdjust string `json:"show_price_after_adjust"` SkuProcessed []interface{} `json:"sku_processed"` Status int `json:"status"` Timing Timing `json:"timing"` UpdateTime int `json:"update_time"` UserId string `json:"user_id"` }
Click to show internal directories.
Click to hide internal directories.