antifraud

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package antifraud 包含反欺诈风控API相关结构体

https://open.taobao.com/API.htm?docType=2&docId=25505

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReleaseAccountRiskDetail added in v1.3.4

func ReleaseAccountRiskDetail(v *AccountRiskDetail)

ReleaseAccountRiskDetail 释放AccountRiskDetail

func ReleaseCollinadataContext added in v1.3.4

func ReleaseCollinadataContext(v *CollinadataContext)

ReleaseCollinadataContext 释放CollinadataContext

func ReleaseCollinadataQueryResult added in v1.3.4

func ReleaseCollinadataQueryResult(v *CollinadataQueryResult)

ReleaseCollinadataQueryResult 释放CollinadataQueryResult

func ReleaseParamAccountQuery added in v1.3.4

func ReleaseParamAccountQuery(v *ParamAccountQuery)

ReleaseParamAccountQuery 释放ParamAccountQuery

func ReleaseResultWrapper added in v1.3.4

func ReleaseResultWrapper(v *ResultWrapper)

ReleaseResultWrapper 释放ResultWrapper

func ReleaseSigAuthenticateContext added in v1.3.4

func ReleaseSigAuthenticateContext(v *SigAuthenticateContext)

ReleaseSigAuthenticateContext 释放SigAuthenticateContext

func ReleaseSigAuthenticateResult added in v1.3.4

func ReleaseSigAuthenticateResult(v *SigAuthenticateResult)

ReleaseSigAuthenticateResult 释放SigAuthenticateResult

func ReleaseTaobaoAntifraudRiskassessmentGetAPIRequest added in v1.3.4

func ReleaseTaobaoAntifraudRiskassessmentGetAPIRequest(v *TaobaoAntifraudRiskassessmentGetAPIRequest)

ReleaseTaobaoAntifraudRiskassessmentGetAPIRequest 将 TaobaoAntifraudRiskassessmentGetAPIRequest 放入 sync.Pool

func ReleaseTaobaoAntifraudRiskassessmentGetAPIResponse added in v1.3.4

func ReleaseTaobaoAntifraudRiskassessmentGetAPIResponse(v *TaobaoAntifraudRiskassessmentGetAPIResponse)

ReleaseTaobaoAntifraudRiskassessmentGetAPIResponse 将 TaobaoAntifraudRiskassessmentGetAPIResponse 保存到 sync.Pool

func ReleaseTaobaoAntifraudRiskuserGetAPIRequest added in v1.3.4

func ReleaseTaobaoAntifraudRiskuserGetAPIRequest(v *TaobaoAntifraudRiskuserGetAPIRequest)

ReleaseTaobaoAntifraudRiskuserGetAPIRequest 将 TaobaoAntifraudRiskuserGetAPIRequest 放入 sync.Pool

func ReleaseTaobaoAntifraudRiskuserGetAPIResponse added in v1.3.4

func ReleaseTaobaoAntifraudRiskuserGetAPIResponse(v *TaobaoAntifraudRiskuserGetAPIResponse)

ReleaseTaobaoAntifraudRiskuserGetAPIResponse 将 TaobaoAntifraudRiskuserGetAPIResponse 保存到 sync.Pool

func ReleaseTaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest added in v1.3.4

func ReleaseTaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest(v *TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest)

ReleaseTaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest 将 TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest 放入 sync.Pool

func ReleaseTaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse added in v1.3.4

func ReleaseTaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse(v *TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse)

ReleaseTaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse 将 TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse 保存到 sync.Pool

Types

type AccountRiskDetail

type AccountRiskDetail struct {
	// 表示一个具体的用户风险详情
	Name string `json:"name,omitempty" xml:"name,omitempty"`
}

AccountRiskDetail 结构体

func GetAccountRiskDetail added in v1.3.4

func GetAccountRiskDetail() *AccountRiskDetail

GetAccountRiskDetail() 从对象池中获取AccountRiskDetail

type CollinadataContext

type CollinadataContext struct {
	// 客户标识,由ISP指定
	AppKey string `json:"app_key,omitempty" xml:"app_key,omitempty"`
	// 页面生成的请求的标识.
	TokenId string `json:"token_id,omitempty" xml:"token_id,omitempty"`
	// 场景标识, 由ISP指
	SceneId string `json:"scene_id,omitempty" xml:"scene_id,omitempty"`
	// 参数签名, 签名函数由ISP提供
	SerialNo string `json:"serial_no,omitempty" xml:"serial_no,omitempty"`
	// 透传参数
	Trans string `json:"trans,omitempty" xml:"trans,omitempty"`
	// 发起查询的时间,用于加密serial_no
	TimeStamp int64 `json:"time_stamp,omitempty" xml:"time_stamp,omitempty"`
}

CollinadataContext 结构体

func GetCollinadataContext added in v1.3.4

func GetCollinadataContext() *CollinadataContext

GetCollinadataContext() 从对象池中获取CollinadataContext

type CollinadataQueryResult

type CollinadataQueryResult struct {
	// 积分信息.千分制
	Score string `json:"score,omitempty" xml:"score,omitempty"`
	// pass,review,reject
	RiskLevel string `json:"risk_level,omitempty" xml:"risk_level,omitempty"`
	// 字符串格式, 关于score生成的描述信息. 本字段可能为空.
	Detail string `json:"detail,omitempty" xml:"detail,omitempty"`
}

CollinadataQueryResult 结构体

func GetCollinadataQueryResult added in v1.3.4

func GetCollinadataQueryResult() *CollinadataQueryResult

GetCollinadataQueryResult() 从对象池中获取CollinadataQueryResult

type ParamAccountQuery

type ParamAccountQuery struct {
	// 反欺诈服务AppKey
	AppKey string `json:"app_key,omitempty" xml:"app_key,omitempty"`
	// 时间戳
	Timestamp string `json:"timestamp,omitempty" xml:"timestamp,omitempty"`
	// 身份校验信息
	AppToken string `json:"app_token,omitempty" xml:"app_token,omitempty"`
	// 场景ID
	SceneId string `json:"scene_id,omitempty" xml:"scene_id,omitempty"`
	// 手机号
	PhoneNumber string `json:"phone_number,omitempty" xml:"phone_number,omitempty"`
	// IP
	Ip string `json:"ip,omitempty" xml:"ip,omitempty"`
	// 透传参数,是一个json形式的字符串
	Trans string `json:"trans,omitempty" xml:"trans,omitempty"`
}

ParamAccountQuery 结构体

func GetParamAccountQuery added in v1.3.4

func GetParamAccountQuery() *ParamAccountQuery

GetParamAccountQuery() 从对象池中获取ParamAccountQuery

type ResultWrapper

type ResultWrapper struct {
	// 描述
	Msg string `json:"msg,omitempty" xml:"msg,omitempty"`
	// 返回风控结果信息
	Result *CollinadataQueryResult `json:"result,omitempty" xml:"result,omitempty"`
	// 返回结果码 0为成功,其他为错误码
	Code int64 `json:"code,omitempty" xml:"code,omitempty"`
	// 返回是否成功
	Success bool `json:"success,omitempty" xml:"success,omitempty"`
}

ResultWrapper 结构体

func GetResultWrapper added in v1.3.4

func GetResultWrapper() *ResultWrapper

GetResultWrapper() 从对象池中获取ResultWrapper

type SigAuthenticateContext

type SigAuthenticateContext struct {
	// 接入密码
	AccessKey string `json:"access_key,omitempty" xml:"access_key,omitempty"`
	// 接入应用标识
	AppKey string `json:"app_key,omitempty" xml:"app_key,omitempty"`
	// 接入应用采集到的最终用户ip
	RemoteIp string `json:"remote_ip,omitempty" xml:"remote_ip,omitempty"`
	// collinaface JS分配的会话id
	SessionId string `json:"session_id,omitempty" xml:"session_id,omitempty"`
	// 签名串
	Sig string `json:"sig,omitempty" xml:"sig,omitempty"`
	// 会话标识,由sip提供的tokenutil工具类生成
	Token string `json:"token,omitempty" xml:"token,omitempty"`
}

SigAuthenticateContext 结构体

func GetSigAuthenticateContext added in v1.3.4

func GetSigAuthenticateContext() *SigAuthenticateContext

GetSigAuthenticateContext() 从对象池中获取SigAuthenticateContext

type SigAuthenticateResult

type SigAuthenticateResult struct {
	// 100	验证通过	验证通过 200	服务器故障,此时ResultWrapper的success=false	服务自身正确识别的服务器故障行为,请视同验证通过处理  900	验证不通过	预留9XX做为扩展,901:NOPASS_USER_APP,应用方传入参数有误,如appkey与access_key不匹配等
	Code string `json:"code,omitempty" xml:"code,omitempty"`
	// 错误描述消息
	Msg string `json:"msg,omitempty" xml:"msg,omitempty"`
	// detail
	Detail string `json:"detail,omitempty" xml:"detail,omitempty"`
	// 签名串生成的毫秒值(System.currentTimeMillis()).使用方自行判断此签名串是否已过期
	Timestamp int64 `json:"timestamp,omitempty" xml:"timestamp,omitempty"`
}

SigAuthenticateResult 结构体

func GetSigAuthenticateResult added in v1.3.4

func GetSigAuthenticateResult() *SigAuthenticateResult

GetSigAuthenticateResult() 从对象池中获取SigAuthenticateResult

type TaobaoAntifraudRiskassessmentGetAPIRequest added in v1.2.0

type TaobaoAntifraudRiskassessmentGetAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaoAntifraudRiskassessmentGetAPIRequest 反欺诈风险识别 API请求 taobao.antifraud.riskassessment.get

反欺诈服务是阿里大数据风控服务能力的对外输出,通过用户信誉、行为分析精准识别可信用户和风险用户并实时防御,解决交易、支付、活动等关键业务环节存在的欺诈威胁,保护企业品牌和数据,降低企业经济损失

func GetTaobaoAntifraudRiskassessmentGetAPIRequest added in v1.3.4

func GetTaobaoAntifraudRiskassessmentGetAPIRequest() *TaobaoAntifraudRiskassessmentGetAPIRequest

GetTaobaoAntifraudRiskassessmentGetRequest 从 sync.Pool 获取 TaobaoAntifraudRiskassessmentGetAPIRequest

func NewTaobaoAntifraudRiskassessmentGetRequest

func NewTaobaoAntifraudRiskassessmentGetRequest() *TaobaoAntifraudRiskassessmentGetAPIRequest

NewTaobaoAntifraudRiskassessmentGetRequest 初始化TaobaoAntifraudRiskassessmentGetAPIRequest对象

func (TaobaoAntifraudRiskassessmentGetAPIRequest) GetApiMethodName added in v1.2.0

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoAntifraudRiskassessmentGetAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoAntifraudRiskassessmentGetAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoAntifraudRiskassessmentGetAPIRequest) GetCollinadataContext added in v1.2.0

GetCollinadataContext CollinadataContext Getter

func (TaobaoAntifraudRiskassessmentGetAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (*TaobaoAntifraudRiskassessmentGetAPIRequest) Reset added in v1.3.4

Reset IRequest interface 方法, 清空结构体

func (*TaobaoAntifraudRiskassessmentGetAPIRequest) SetCollinadataContext added in v1.2.0

func (r *TaobaoAntifraudRiskassessmentGetAPIRequest) SetCollinadataContext(_collinadataContext *CollinadataContext) error

SetCollinadataContext is CollinadataContext Setter 风控查询参数

type TaobaoAntifraudRiskassessmentGetAPIResponse

type TaobaoAntifraudRiskassessmentGetAPIResponse struct {
	model.CommonResponse
	TaobaoAntifraudRiskassessmentGetAPIResponseModel
}

TaobaoAntifraudRiskassessmentGetAPIResponse 反欺诈风险识别 API返回值 taobao.antifraud.riskassessment.get

反欺诈服务是阿里大数据风控服务能力的对外输出,通过用户信誉、行为分析精准识别可信用户和风险用户并实时防御,解决交易、支付、活动等关键业务环节存在的欺诈威胁,保护企业品牌和数据,降低企业经济损失

func GetTaobaoAntifraudRiskassessmentGetAPIResponse added in v1.3.4

func GetTaobaoAntifraudRiskassessmentGetAPIResponse() *TaobaoAntifraudRiskassessmentGetAPIResponse

GetTaobaoAntifraudRiskassessmentGetAPIResponse 从 sync.Pool 获取 TaobaoAntifraudRiskassessmentGetAPIResponse

func (*TaobaoAntifraudRiskassessmentGetAPIResponse) Reset added in v1.3.4

Reset 清空结构体

type TaobaoAntifraudRiskassessmentGetAPIResponseModel added in v1.2.0

type TaobaoAntifraudRiskassessmentGetAPIResponseModel struct {
	XMLName xml.Name `xml:"antifraud_riskassessment_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// result
	RiskResult *ResultWrapper `json:"risk_result,omitempty" xml:"risk_result,omitempty"`
}

TaobaoAntifraudRiskassessmentGetAPIResponseModel is 反欺诈风险识别 成功返回结果

func (*TaobaoAntifraudRiskassessmentGetAPIResponseModel) Reset added in v1.3.4

Reset 清空结构体

type TaobaoAntifraudRiskuserGetAPIRequest added in v1.2.0

type TaobaoAntifraudRiskuserGetAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaoAntifraudRiskuserGetAPIRequest 反欺诈用户风险查询 API请求 taobao.antifraud.riskuser.get

根据用户基础信息,核实平台上的用户是否存在欺诈风险

func GetTaobaoAntifraudRiskuserGetAPIRequest added in v1.3.4

func GetTaobaoAntifraudRiskuserGetAPIRequest() *TaobaoAntifraudRiskuserGetAPIRequest

GetTaobaoAntifraudRiskuserGetRequest 从 sync.Pool 获取 TaobaoAntifraudRiskuserGetAPIRequest

func NewTaobaoAntifraudRiskuserGetRequest

func NewTaobaoAntifraudRiskuserGetRequest() *TaobaoAntifraudRiskuserGetAPIRequest

NewTaobaoAntifraudRiskuserGetRequest 初始化TaobaoAntifraudRiskuserGetAPIRequest对象

func (TaobaoAntifraudRiskuserGetAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoAntifraudRiskuserGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoAntifraudRiskuserGetAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoAntifraudRiskuserGetAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoAntifraudRiskuserGetAPIRequest) GetParamAccountQuery added in v1.2.0

func (r TaobaoAntifraudRiskuserGetAPIRequest) GetParamAccountQuery() *ParamAccountQuery

GetParamAccountQuery ParamAccountQuery Getter

func (TaobaoAntifraudRiskuserGetAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (*TaobaoAntifraudRiskuserGetAPIRequest) Reset added in v1.3.4

Reset IRequest interface 方法, 清空结构体

func (*TaobaoAntifraudRiskuserGetAPIRequest) SetParamAccountQuery added in v1.2.0

func (r *TaobaoAntifraudRiskuserGetAPIRequest) SetParamAccountQuery(_paramAccountQuery *ParamAccountQuery) error

SetParamAccountQuery is ParamAccountQuery Setter 风险用户查询条件

type TaobaoAntifraudRiskuserGetAPIResponse

type TaobaoAntifraudRiskuserGetAPIResponse struct {
	model.CommonResponse
	TaobaoAntifraudRiskuserGetAPIResponseModel
}

TaobaoAntifraudRiskuserGetAPIResponse 反欺诈用户风险查询 API返回值 taobao.antifraud.riskuser.get

根据用户基础信息,核实平台上的用户是否存在欺诈风险

func GetTaobaoAntifraudRiskuserGetAPIResponse added in v1.3.4

func GetTaobaoAntifraudRiskuserGetAPIResponse() *TaobaoAntifraudRiskuserGetAPIResponse

GetTaobaoAntifraudRiskuserGetAPIResponse 从 sync.Pool 获取 TaobaoAntifraudRiskuserGetAPIResponse

func (*TaobaoAntifraudRiskuserGetAPIResponse) Reset added in v1.3.4

Reset 清空结构体

type TaobaoAntifraudRiskuserGetAPIResponseModel added in v1.2.0

type TaobaoAntifraudRiskuserGetAPIResponseModel struct {
	XMLName xml.Name `xml:"antifraud_riskuser_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 风险结果详情列表,包含多个风险结果单项
	DetailList []AccountRiskDetail `json:"detail_list,omitempty" xml:"detail_list>account_risk_detail,omitempty"`
	// 服务调用成功时, 返回的系统流水号
	EventId string `json:"event_id,omitempty" xml:"event_id,omitempty"`
	// 风险分值
	Score string `json:"score,omitempty" xml:"score,omitempty"`
	// 风险结果, 为reject, review, pass三者之一
	RiskLevel string `json:"risk_level,omitempty" xml:"risk_level,omitempty"`
}

TaobaoAntifraudRiskuserGetAPIResponseModel is 反欺诈用户风险查询 成功返回结果

func (*TaobaoAntifraudRiskuserGetAPIResponseModel) Reset added in v1.3.4

Reset 清空结构体

type TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest added in v1.2.0

type TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest 人机识别 API请求 taobao.collinafacade.nocaptcha.sig.authenticate

人机识别颁发签名串后,本接口负责向ISV提供签名串校验服务

func GetTaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest added in v1.3.4

func GetTaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest() *TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest

GetTaobaoCollinafacadeNocaptchaSigAuthenticateRequest 从 sync.Pool 获取 TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest

func NewTaobaoCollinafacadeNocaptchaSigAuthenticateRequest

func NewTaobaoCollinafacadeNocaptchaSigAuthenticateRequest() *TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest

NewTaobaoCollinafacadeNocaptchaSigAuthenticateRequest 初始化TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest对象

func (TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) GetApiMethodName added in v1.2.0

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) GetSigAuthenticateContext added in v1.2.0

GetSigAuthenticateContext SigAuthenticateContext Getter

func (*TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) Reset added in v1.3.4

Reset IRequest interface 方法, 清空结构体

func (*TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) SetSigAuthenticateContext added in v1.2.0

func (r *TaobaoCollinafacadeNocaptchaSigAuthenticateAPIRequest) SetSigAuthenticateContext(_sigAuthenticateContext *SigAuthenticateContext) error

SetSigAuthenticateContext is SigAuthenticateContext Setter 签名串校验接口入参

type TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse

type TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse struct {
	model.CommonResponse
	TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponseModel
}

TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse 人机识别 API返回值 taobao.collinafacade.nocaptcha.sig.authenticate

人机识别颁发签名串后,本接口负责向ISV提供签名串校验服务

func GetTaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse added in v1.3.4

func GetTaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse() *TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse

GetTaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse 从 sync.Pool 获取 TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse

func (*TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponse) Reset added in v1.3.4

Reset 清空结构体

type TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponseModel added in v1.2.0

type TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponseModel struct {
	XMLName xml.Name `xml:"collinafacade_nocaptcha_sig_authenticate_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 服务出参
	Ret int64 `json:"ret,omitempty" xml:"ret,omitempty"`
	// 返回authenticateResult
	RetDetail *SigAuthenticateResult `json:"ret_detail,omitempty" xml:"ret_detail,omitempty"`
}

TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponseModel is 人机识别 成功返回结果

func (*TaobaoCollinafacadeNocaptchaSigAuthenticateAPIResponseModel) Reset added in v1.3.4

Reset 清空结构体

Jump to

Keyboard shortcuts

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