aliopengo

package module
v0.0.0-...-013e7eb Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: MIT Imports: 10 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

aliopengo

taobao open sdk in golang

Documentation

Index

Constants

View Source
const (
	ERROR_CODE_SERVER_ERROR         = 10000 //系统异常了,无法处理
	ERROR_CODE_ILLEGAL_PARAM        = 10001 //参数错误
	ERROR_CODE_RECORD_ALREADY_EXIST = 20001 //记录已经存在,判断依据是根据mobile、email、login_id、isv_account_id、open_id
	ERROR_CODE_RECORD_NOT_EXIST     = 20002 //记录不存在,如删除的时候传了错误的id或isv_account_id
	ERROR_CODE_DOMAIN_MISMATCH      = 20004 //数据域检查错误,操作了不属于自己域的数据)
	ERROR_CODE_UPDATE_FAIL          = 20005 //更新时DB异常
	ERROR_CODE_INSERT_FAIL          = 20006 //插入时DB异常
	ERROR_CODE_INSERT_INDEX_FAIL    = 20007 //写索引DB异常
	ERROR_CODE_INVALID_TOKEN        = 20008 //Token错误或者验证时间超过了1分钟
)

Variables

This section is empty.

Functions

func CheckHttpError

func CheckHttpError(err error)

Types

type AliHttpClient

type AliHttpClient struct {
	// contains filtered or unexported fields
}

func NewAliHttpClient

func NewAliHttpClient(baseUrl string, appkey string, appSecret string, partnerId string) *AliHttpClient

func (*AliHttpClient) CalcSign

func (this *AliHttpClient) CalcSign(values url.Values) string

func (*AliHttpClient) GetRequest

func (this *AliHttpClient) GetRequest(method string, params map[string]string) *http.Response

func (*AliHttpClient) ParserRespBody

func (this *AliHttpClient) ParserRespBody(method string, entityKey string, resp *http.Response) (bool, interface{}, *ResponseEntity, *ErrorResponse)

func (*AliHttpClient) ParserRespBodyWithoutData

func (this *AliHttpClient) ParserRespBodyWithoutData(method string, resp *http.Response) (bool, interface{}, *ErrorResponse)

func (*AliHttpClient) PostRequest

func (this *AliHttpClient) PostRequest(method string, params map[string]string) *http.Response

func (*AliHttpClient) String

func (this *AliHttpClient) String() string

type ErrorResponse

type ErrorResponse struct {
	Code      float64 `json:"code"`
	Msg       string  `json:"msg"`
	SubCode   string  `json:"sub_code"`
	SubMsg    string  `json:"sub_msg"`
	RequestId string  `json:"request_id"`
}

func (*ErrorResponse) Parse

func (this *ErrorResponse) Parse(res map[string]interface{})

type ResponseEntity

type ResponseEntity struct {
	Message    string  `json:"message"`
	Successful bool    `json:"successful"`
	Code       float64 `json:"code"`
}

func (*ResponseEntity) Parse

func (this *ResponseEntity) Parse(res map[string]interface{}) interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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