voucher

package
v1.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Voucher

type Voucher struct {
	Sig  string      `json:"sig" codec:"sig"`
	Data VoucherData `json:"data" codec:"data"`
}

func (Voucher) Verify

func (this Voucher) Verify() error

type VoucherData

type VoucherData struct {
	Id        string `json:"id"`        // 凭证id
	Key       string `json:"key"`       // 该凭证对应的密钥,请求密钥时,需要使用该key对业务入参签名,用于获取加密密钥
	Service   string `json:"service"`   //服务识别码
	Act       string `json:"act"`       //ignore
	Effective int64  `json:"effective"` //生效时间戳,客户端需要检查凭证是否已生效,未生效的凭证无法获取密钥
	Expired   int64  `json:"expired"`   //过期时间戳,客户端需要检查凭证是否已过期,已过期的凭证无法获取密钥
	SType     int    `json:"stype"`     //ignore
}

func VoucherInfoGet

func VoucherInfoGet(req *VoucherInfoGetRequest) (voucherData VoucherData, err error)

凭证获取

type VoucherInfoData

type VoucherInfoData struct {
	Voucher string `json:"voucher,omitempty" codec:"voucher,omitempty"`
}

type VoucherInfoGetRequest

type VoucherInfoGetRequest struct {
	api.BaseRequest
	CustomerUserId string `json:"customer_user_id,omitempty" codec:"customer_user_id,omitempty"`
}

type VoucherInfoGetResponse

type VoucherInfoGetResponse struct {
	ErrorResp *api.ErrorResponnse  `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Response  *VoucherInfoResponse `json:"jingdong_jos_voucher_info_get_responce,omitempty" codec:"jingdong_jos_voucher_info_get_responce,omitempty"`
}

func (VoucherInfoGetResponse) Error added in v1.1.1

func (r VoucherInfoGetResponse) Error() string

func (VoucherInfoGetResponse) IsError added in v1.1.1

func (r VoucherInfoGetResponse) IsError() bool

type VoucherInfoResponse

type VoucherInfoResponse struct {
	Result *VoucherInfoResult `json:"response,omitempty" codec:"response,omitempty"`
}

func (VoucherInfoResponse) Error added in v1.1.1

func (r VoucherInfoResponse) Error() string

func (VoucherInfoResponse) IsError added in v1.1.1

func (r VoucherInfoResponse) IsError() bool

type VoucherInfoResult

type VoucherInfoResult struct {
	Code      string          `json:"errorCode,omitempty" codec:"errorCode,omitempty"`
	ErrorDesc string          `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	Data      VoucherInfoData `json:"data,omitempty" codec:"data,omitempty"`
}

func (VoucherInfoResult) Error added in v1.1.1

func (r VoucherInfoResult) Error() string

func (VoucherInfoResult) IsError added in v1.1.1

func (r VoucherInfoResult) IsError() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL