Documentation ¶
Index ¶
- func GetRandomString(length int) string
- func PrivateKeySignSHA256(signData string, key string) (sign string, err error)
- func RsaVerySignWithSHA256Base64(originalData, signData string, key string) (err error)
- func SHA256BAS64(signstr string, key *rsa.PrivateKey) (string, error)
- func Sign(method string, url string, timestamp string, nonce string, body []byte, ...) (sign string, err error)
- func VerifySign(body, timestamp, nonceStr, sign, publicKey string) (err error)
- type Client
- type MchInfo
- type Option
- type QueryUserCouponConsumeInformation
- type QueryUserCouponCutToMessage
- type QueryUserCouponGoodsDetail
- type QueryUserCouponNormalCouponInformation
- type QueryUserCouponReq
- type QueryUserCouponRsp
- type RequestErr
- type SendCouponStockReq
- type SendCouponStockRsp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomString ¶
func PrivateKeySignSHA256 ¶
func SHA256BAS64 ¶
func SHA256BAS64(signstr string, key *rsa.PrivateKey) (string, error)
func VerifySign ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) QueryUserCoupon ¶
func (*Client) SendCouponStock ¶
func (c *Client) SendCouponStock(openid string, req *SendCouponStockReq) (rsp *SendCouponStockRsp, err error)
type QueryUserCouponReq ¶
type QueryUserCouponReq struct { }
type QueryUserCouponRsp ¶
type QueryUserCouponRsp struct { StockCreateMchId string `json:"stock_creator_mchid"` StockId string `json:"stock_id"` CouponId string `json:"coupon_id"` CutToMessage QueryUserCouponCutToMessage `json:"cut_to_message"` CouponName string `json:"coupon_name"` Status string `json:"status"` Description string `json:"description"` CreateTime string `json:"create_time"` CouponType string `json:"coupon_type"` NoCash bool `json:"no_cash"` AvailableBeginTime string `json:"available_begin_time"` AvailableEndTime string `json:"available_end_time"` Singleitem bool `json:"singleitem"` NormalCouponInformation QueryUserCouponNormalCouponInformation `json:"normal_coupon_information"` ConsumeInformation QueryUserCouponConsumeInformation `json:"consume_information"` GoodsDetail QueryUserCouponGoodsDetail `json:"goods_detail"` }
type RequestErr ¶
type RequestErr struct { Code string `json:"code"` Message string `json:"message"` Field string `json:"field"` Value string `json:"value"` Issue string `json:"issue"` Detail interface{} `json:"detail"` ReqText string `json:"req_text"` }
func (*RequestErr) Error ¶
func (e *RequestErr) Error() string
type SendCouponStockReq ¶
type SendCouponStockRsp ¶
type SendCouponStockRsp struct {
CouponId string `json:"coupon_id"`
}
Click to show internal directories.
Click to hide internal directories.