Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPostRequest

func BuildPostRequest(ae Aliexpress, api API) (string, error)

BuildPostRequest BuildPostRequest

func BuildRequest

func BuildRequest(ae Aliexpress, api API) string

BuildRequest BuildRequest

func EncryptDESCBC

func EncryptDESCBC(src, key string) string

EncryptDESCBC CBC加密

func GetMD5

func GetMD5(str string) string

GetMD5 GetMD5

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

PKCS5Padding 明文补码算法

func Signature

func Signature(ae Aliexpress, api API) string

Signature Signature

Types

type API

type API struct {
	ApiName   string
	Params    map[string]string
	ParamFile interface{}
}

API API

func (*API) GetApiName

func (api *API) GetApiName() string

GetApiName GetApiName

func (*API) GetParams

func (api *API) GetParams() map[string]string

GetParams GetParams

func (*API) SetApiName

func (api *API) SetApiName(apiname string)

SetApiName SetApiName

func (*API) SetParamFile

func (api *API) SetParamFile(data interface{})

SetParamFile SetParamFile

func (*API) SetParams

func (api *API) SetParams(parms map[string]string)

SetParams SetParams

type Aliexpress

type Aliexpress struct {
	AppKey       string
	AppSecret    string
	RedirectURL  string
	ServerURL    string
	V            string
	PartnerID    string
	TargetAppKey string
	Format       string
	Simplify     string
	Token        string
	SignMethod   string
	Timestamp    string
}

Aliexpress Aliexpress

func (*Aliexpress) InitAPI

func (ae *Aliexpress) InitAPI(appKey, appSecret, serverURL, session string)

InitAPI InitAPI

Source Files