Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 验证码签名错误。 AUTHFAILURE_CAPSIGERROR = "AuthFailure.CapSigError" // 请求过期。 AUTHFAILURE_EXPIRED = "AuthFailure.Expired" // 内部错误。 INTERNALERROR = "InternalError" // 业务系统逻辑错误。 INTERNALERROR_BACKENDLOGICERROR = "InternalError.BackendLogicError" // Sign后端错误。 INTERNALERROR_SIGNBACKENDERROR = "InternalError.SignBackendError" // 验证码签名错误。 INVALIDPARAMETER_CAPSIGERROR = "InvalidParameter.CapSigError" // 参数错误。 INVALIDPARAMETER_PARAMERROR = "InvalidParameter.ParamError" // URL错误。 INVALIDPARAMETER_URLERROR = "InvalidParameter.UrlError" // 版本错误。 INVALIDPARAMETER_VERSIONERROR = "InvalidParameter.VersionError" // BadBody。 INVALIDPARAMETERVALUE_BADBODY = "InvalidParameterValue.BadBody" // 请求包过大。 INVALIDPARAMETERVALUE_BODYTOOLARGE = "InvalidParameterValue.BodyTooLarge" // 验证码不匹配。 INVALIDPARAMETERVALUE_CAPMISMATCH = "InvalidParameterValue.CapMisMatch" // HTTP方法错误。 INVALIDPARAMETERVALUE_HTTPMETHODERROR = "InvalidParameterValue.HttpMethodError" // 超过配额。 LIMITEXCEEDED_FREQCNT = "LimitExceeded.FreqCnt" // 超过配额(用户IP)。 LIMITEXCEEDED_IPFREQCNT = "LimitExceeded.IpFreqCnt" // 关键词频控限制。 LIMITEXCEEDED_KEYFREQCNT = "LimitExceeded.KeyFreqCnt" // 重放攻击。 LIMITEXCEEDED_REPLAYATTACK = "LimitExceeded.ReplayAttack" // 接口不存在。 RESOURCENOTFOUND_INTERFACENOTFOUND = "ResourceNotFound.InterfaceNotFound" // 未开通服务权限。 RESOURCEUNAVAILABLE_PERMISSIONDENIED = "ResourceUnavailable.PermissionDenied" // 鉴权失败。 UNAUTHORIZEDOPERATION_AUTHFAILED = "UnauthorizedOperation.AuthFailed" // 密钥不存在。 UNKNOWNPARAMETER_SECRETIDNOTEXISTS = "UnknownParameter.SecretIdNotExists" )
View Source
const APIVersion = "2020-02-24"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) QueryActivityAntiRush ¶
func (c *Client) QueryActivityAntiRush(request *QueryActivityAntiRushRequest) (response *QueryActivityAntiRushResponse, err error)
QueryActivityAntiRush 腾讯云活动防刷(ActivityAntiRush,AA)是针对电商、O2O、P2P、游戏、支付等行业在促销活动中遇到“羊毛党”恶意刷取优惠福利的行为时,通过防刷引擎,精准识别出“薅羊毛”恶意行为的活动防刷服务,避免了企业被刷带来的巨大经济损失。
可能返回的错误码:
AUTHFAILURE_CAPSIGERROR = "AuthFailure.CapSigError" AUTHFAILURE_EXPIRED = "AuthFailure.Expired" INTERNALERROR = "InternalError" INTERNALERROR_BACKENDLOGICERROR = "InternalError.BackendLogicError" INTERNALERROR_SIGNBACKENDERROR = "InternalError.SignBackendError" INVALIDPARAMETER_CAPSIGERROR = "InvalidParameter.CapSigError" INVALIDPARAMETER_PARAMERROR = "InvalidParameter.ParamError" INVALIDPARAMETER_URLERROR = "InvalidParameter.UrlError" INVALIDPARAMETER_VERSIONERROR = "InvalidParameter.VersionError" INVALIDPARAMETERVALUE_BADBODY = "InvalidParameterValue.BadBody" INVALIDPARAMETERVALUE_BODYTOOLARGE = "InvalidParameterValue.BodyTooLarge" INVALIDPARAMETERVALUE_CAPMISMATCH = "InvalidParameterValue.CapMisMatch" INVALIDPARAMETERVALUE_HTTPMETHODERROR = "InvalidParameterValue.HttpMethodError" LIMITEXCEEDED_FREQCNT = "LimitExceeded.FreqCnt" LIMITEXCEEDED_IPFREQCNT = "LimitExceeded.IpFreqCnt" LIMITEXCEEDED_KEYFREQCNT = "LimitExceeded.KeyFreqCnt" LIMITEXCEEDED_REPLAYATTACK = "LimitExceeded.ReplayAttack" RESOURCENOTFOUND_INTERFACENOTFOUND = "ResourceNotFound.InterfaceNotFound" RESOURCEUNAVAILABLE_PERMISSIONDENIED = "ResourceUnavailable.PermissionDenied" UNAUTHORIZEDOPERATION_AUTHFAILED = "UnauthorizedOperation.AuthFailed" UNKNOWNPARAMETER_SECRETIDNOTEXISTS = "UnknownParameter.SecretIdNotExists"
func (*Client) QueryActivityAntiRushWithContext ¶ added in v1.0.324
func (c *Client) QueryActivityAntiRushWithContext(ctx context.Context, request *QueryActivityAntiRushRequest) (response *QueryActivityAntiRushResponse, err error)
QueryActivityAntiRush 腾讯云活动防刷(ActivityAntiRush,AA)是针对电商、O2O、P2P、游戏、支付等行业在促销活动中遇到“羊毛党”恶意刷取优惠福利的行为时,通过防刷引擎,精准识别出“薅羊毛”恶意行为的活动防刷服务,避免了企业被刷带来的巨大经济损失。
可能返回的错误码:
AUTHFAILURE_CAPSIGERROR = "AuthFailure.CapSigError" AUTHFAILURE_EXPIRED = "AuthFailure.Expired" INTERNALERROR = "InternalError" INTERNALERROR_BACKENDLOGICERROR = "InternalError.BackendLogicError" INTERNALERROR_SIGNBACKENDERROR = "InternalError.SignBackendError" INVALIDPARAMETER_CAPSIGERROR = "InvalidParameter.CapSigError" INVALIDPARAMETER_PARAMERROR = "InvalidParameter.ParamError" INVALIDPARAMETER_URLERROR = "InvalidParameter.UrlError" INVALIDPARAMETER_VERSIONERROR = "InvalidParameter.VersionError" INVALIDPARAMETERVALUE_BADBODY = "InvalidParameterValue.BadBody" INVALIDPARAMETERVALUE_BODYTOOLARGE = "InvalidParameterValue.BodyTooLarge" INVALIDPARAMETERVALUE_CAPMISMATCH = "InvalidParameterValue.CapMisMatch" INVALIDPARAMETERVALUE_HTTPMETHODERROR = "InvalidParameterValue.HttpMethodError" LIMITEXCEEDED_FREQCNT = "LimitExceeded.FreqCnt" LIMITEXCEEDED_IPFREQCNT = "LimitExceeded.IpFreqCnt" LIMITEXCEEDED_KEYFREQCNT = "LimitExceeded.KeyFreqCnt" LIMITEXCEEDED_REPLAYATTACK = "LimitExceeded.ReplayAttack" RESOURCENOTFOUND_INTERFACENOTFOUND = "ResourceNotFound.InterfaceNotFound" RESOURCEUNAVAILABLE_PERMISSIONDENIED = "ResourceUnavailable.PermissionDenied" UNAUTHORIZEDOPERATION_AUTHFAILED = "UnauthorizedOperation.AuthFailed" UNKNOWNPARAMETER_SECRETIDNOTEXISTS = "UnknownParameter.SecretIdNotExists"
type QueryActivityAntiRushRequest ¶
type QueryActivityAntiRushRequest struct { *tchttp.BaseRequest // 账号类型 AccountType *string `json:"AccountType,omitnil,omitempty" name:"AccountType"` // uid值 Uid *string `json:"Uid,omitnil,omitempty" name:"Uid"` // 用户的真实外网 IP。若填入非外网有效ip,会返回level=0的风控结果,risktype中会有205的风险码返回作为标识 UserIp *string `json:"UserIp,omitnil,omitempty" name:"UserIp"` // 用户操作时间戳。 PostTime *string `json:"PostTime,omitnil,omitempty" name:"PostTime"` // accountType 是QQ开放账号时,该参数必填,表示 QQ 开放平台分配给网站或应用的 AppID,用来唯一标识网站或应用。 AppIdU *string `json:"AppIdU,omitnil,omitempty" name:"AppIdU"` // 昵称,UTF-8 编码。 NickName *string `json:"NickName,omitnil,omitempty" name:"NickName"` // 手机号 PhoneNumber *string `json:"PhoneNumber,omitnil,omitempty" name:"PhoneNumber"` // 用户邮箱地址。 EmailAddress *string `json:"EmailAddress,omitnil,omitempty" name:"EmailAddress"` // 注册时间戳。 RegisterTime *string `json:"RegisterTime,omitnil,omitempty" name:"RegisterTime"` // 注册来源的外网 IP。 RegisterIp *string `json:"RegisterIp,omitnil,omitempty" name:"RegisterIp"` // 用户 HTTP 请求中的 cookie 进行2次 hash 的值,只要保证相同 cookie 的 hash 值一致即可。 CookieHash *string `json:"CookieHash,omitnil,omitempty" name:"CookieHash"` // 地址。 Address *string `json:"Address,omitnil,omitempty" name:"Address"` // 登录来源: // 0:其他。 // 1:PC 网页。 // 2:移动页面。 // 3:App。 // 4:微信公众号。 LoginSource *string `json:"LoginSource,omitnil,omitempty" name:"LoginSource"` // 登录方式: // 0:其他。 // 1:手动账号密码输入。 // 2:动态短信密码登录。 // 3:二维码扫描登录。 LoginType *string `json:"LoginType,omitnil,omitempty" name:"LoginType"` // 登录耗时,单位:秒。 LoginSpend *string `json:"LoginSpend,omitnil,omitempty" name:"LoginSpend"` // 用户操作的目的 ID,如点赞等,该字段就是被点赞的消息 ID,如果是投票,则为被投号码的 ID。 RootId *string `json:"RootId,omitnil,omitempty" name:"RootId"` // 用户 HTTP 请求的 referer 值。 Referer *string `json:"Referer,omitnil,omitempty" name:"Referer"` // 登录成功后跳转页面。 JumpUrl *string `json:"JumpUrl,omitnil,omitempty" name:"JumpUrl"` // 用户 HTTP 请求的 userAgent。 UserAgent *string `json:"UserAgent,omitnil,omitempty" name:"UserAgent"` // 用户 HTTP 请求中的 x_forward_for。 XForwardedFor *string `json:"XForwardedFor,omitnil,omitempty" name:"XForwardedFor"` // 用户操作过程中鼠标单击次数。 MouseClickCount *string `json:"MouseClickCount,omitnil,omitempty" name:"MouseClickCount"` // 用户操作过程中键盘单击次数。 KeyboardClickCount *string `json:"KeyboardClickCount,omitnil,omitempty" name:"KeyboardClickCount"` // MAC 地址或设备唯一标识。 MacAddress *string `json:"MacAddress,omitnil,omitempty" name:"MacAddress"` // 手机制造商 ID,如果手机注册,请带上此信息。 VendorId *string `json:"VendorId,omitnil,omitempty" name:"VendorId"` // 手机设备号。支持以下格式: // 1.imei明文 // 2.idfa明文, // 3.imei小写后MD5值小写 // 4.idfa大写后MD5值小写 Imei *string `json:"Imei,omitnil,omitempty" name:"Imei"` // App 客户端版本。 AppVersion *string `json:"AppVersion,omitnil,omitempty" name:"AppVersion"` // 业务 ID 网站或应用在多个业务中使用此服务,通过此 ID 区分统计数据。 BusinessId *string `json:"BusinessId,omitnil,omitempty" name:"BusinessId"` // 1:微信公众号。 // 2:微信小程序。 WxSubType *string `json:"WxSubType,omitnil,omitempty" name:"WxSubType"` // Token 签名随机数,WxSubType为微信小程序时必填,建议16个字符。 RandNum *string `json:"RandNum,omitnil,omitempty" name:"RandNum"` // token WxToken *string `json:"WxToken,omitnil,omitempty" name:"WxToken"` // 是否识别设备异常: // 0:不识别。 // 1:识别。 CheckDevice *string `json:"CheckDevice,omitnil,omitempty" name:"CheckDevice"` }
func NewQueryActivityAntiRushRequest ¶
func NewQueryActivityAntiRushRequest() (request *QueryActivityAntiRushRequest)
func (*QueryActivityAntiRushRequest) FromJsonString ¶
func (r *QueryActivityAntiRushRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*QueryActivityAntiRushRequest) ToJsonString ¶
func (r *QueryActivityAntiRushRequest) ToJsonString() string
type QueryActivityAntiRushRequestParams ¶ added in v1.0.426
type QueryActivityAntiRushRequestParams struct { // 账号类型 AccountType *string `json:"AccountType,omitnil,omitempty" name:"AccountType"` // uid值 Uid *string `json:"Uid,omitnil,omitempty" name:"Uid"` // 用户的真实外网 IP。若填入非外网有效ip,会返回level=0的风控结果,risktype中会有205的风险码返回作为标识 UserIp *string `json:"UserIp,omitnil,omitempty" name:"UserIp"` // 用户操作时间戳。 PostTime *string `json:"PostTime,omitnil,omitempty" name:"PostTime"` // accountType 是QQ开放账号时,该参数必填,表示 QQ 开放平台分配给网站或应用的 AppID,用来唯一标识网站或应用。 AppIdU *string `json:"AppIdU,omitnil,omitempty" name:"AppIdU"` // 昵称,UTF-8 编码。 NickName *string `json:"NickName,omitnil,omitempty" name:"NickName"` // 手机号 PhoneNumber *string `json:"PhoneNumber,omitnil,omitempty" name:"PhoneNumber"` // 用户邮箱地址。 EmailAddress *string `json:"EmailAddress,omitnil,omitempty" name:"EmailAddress"` // 注册时间戳。 RegisterTime *string `json:"RegisterTime,omitnil,omitempty" name:"RegisterTime"` // 注册来源的外网 IP。 RegisterIp *string `json:"RegisterIp,omitnil,omitempty" name:"RegisterIp"` // 用户 HTTP 请求中的 cookie 进行2次 hash 的值,只要保证相同 cookie 的 hash 值一致即可。 CookieHash *string `json:"CookieHash,omitnil,omitempty" name:"CookieHash"` // 地址。 Address *string `json:"Address,omitnil,omitempty" name:"Address"` // 登录来源: // 0:其他。 // 1:PC 网页。 // 2:移动页面。 // 3:App。 // 4:微信公众号。 LoginSource *string `json:"LoginSource,omitnil,omitempty" name:"LoginSource"` // 登录方式: // 0:其他。 // 1:手动账号密码输入。 // 2:动态短信密码登录。 // 3:二维码扫描登录。 LoginType *string `json:"LoginType,omitnil,omitempty" name:"LoginType"` // 登录耗时,单位:秒。 LoginSpend *string `json:"LoginSpend,omitnil,omitempty" name:"LoginSpend"` // 用户操作的目的 ID,如点赞等,该字段就是被点赞的消息 ID,如果是投票,则为被投号码的 ID。 RootId *string `json:"RootId,omitnil,omitempty" name:"RootId"` // 用户 HTTP 请求的 referer 值。 Referer *string `json:"Referer,omitnil,omitempty" name:"Referer"` // 登录成功后跳转页面。 JumpUrl *string `json:"JumpUrl,omitnil,omitempty" name:"JumpUrl"` // 用户 HTTP 请求的 userAgent。 UserAgent *string `json:"UserAgent,omitnil,omitempty" name:"UserAgent"` // 用户 HTTP 请求中的 x_forward_for。 XForwardedFor *string `json:"XForwardedFor,omitnil,omitempty" name:"XForwardedFor"` // 用户操作过程中鼠标单击次数。 MouseClickCount *string `json:"MouseClickCount,omitnil,omitempty" name:"MouseClickCount"` // 用户操作过程中键盘单击次数。 KeyboardClickCount *string `json:"KeyboardClickCount,omitnil,omitempty" name:"KeyboardClickCount"` // MAC 地址或设备唯一标识。 MacAddress *string `json:"MacAddress,omitnil,omitempty" name:"MacAddress"` // 手机制造商 ID,如果手机注册,请带上此信息。 VendorId *string `json:"VendorId,omitnil,omitempty" name:"VendorId"` // 手机设备号。支持以下格式: // 1.imei明文 // 2.idfa明文, // 3.imei小写后MD5值小写 // 4.idfa大写后MD5值小写 Imei *string `json:"Imei,omitnil,omitempty" name:"Imei"` // App 客户端版本。 AppVersion *string `json:"AppVersion,omitnil,omitempty" name:"AppVersion"` // 业务 ID 网站或应用在多个业务中使用此服务,通过此 ID 区分统计数据。 BusinessId *string `json:"BusinessId,omitnil,omitempty" name:"BusinessId"` // 1:微信公众号。 // 2:微信小程序。 WxSubType *string `json:"WxSubType,omitnil,omitempty" name:"WxSubType"` // Token 签名随机数,WxSubType为微信小程序时必填,建议16个字符。 RandNum *string `json:"RandNum,omitnil,omitempty" name:"RandNum"` // token WxToken *string `json:"WxToken,omitnil,omitempty" name:"WxToken"` // 是否识别设备异常: // 0:不识别。 // 1:识别。 CheckDevice *string `json:"CheckDevice,omitnil,omitempty" name:"CheckDevice"` }
Predefined struct for user
type QueryActivityAntiRushResponse ¶
type QueryActivityAntiRushResponse struct { *tchttp.BaseResponse Response *QueryActivityAntiRushResponseParams `json:"Response"` }
func NewQueryActivityAntiRushResponse ¶
func NewQueryActivityAntiRushResponse() (response *QueryActivityAntiRushResponse)
func (*QueryActivityAntiRushResponse) FromJsonString ¶
func (r *QueryActivityAntiRushResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*QueryActivityAntiRushResponse) ToJsonString ¶
func (r *QueryActivityAntiRushResponse) ToJsonString() string
type QueryActivityAntiRushResponseParams ¶ added in v1.0.426
type QueryActivityAntiRushResponseParams struct { // 操作时间戳,单位:秒。 // 注意:此字段可能返回 null,表示取不到有效值。 PostTime *string `json:"PostTime,omitnil,omitempty" name:"PostTime"` // 用户操作的真实外网 IP。 // 注意:此字段可能返回 null,表示取不到有效值。 UserIp *string `json:"UserIp,omitnil,omitempty" name:"UserIp"` // 0:表示无恶意。 // 1 - 4:恶意等级由低到高。 Level *int64 `json:"Level,omitnil,omitempty" name:"Level"` // 风险类型。 // // 账号风险: // // 1,账号信用低,账号近期存在因恶意被处罚历史,网络低活跃,被举报等因素; // 2,垃圾账号,疑似批量注册小号,近期存在严重违规或大量举报; // 3,无效账号,送检账号参数无法成功解析,请检查微信openid是否有误 ,QQopenid是否与appidU对应,手机号是否有误。 // 4,黑名单,该账号在业务侧有过拉黑记录 // 5,白名单,该账号在业务侧有过加白名单记录 // // 行为风险: // 101,批量操作,存在ip/设备/环境等因素的聚集性异常; // 102,自动机,疑似自动机批量请求; // 104,微信登录态无效,检查wxToken参数,是否已经失效; // // 环境风险: // 201,环境异常,操作ip/设备/环境存在异常。当前ip为非常用ip或恶意ip段; // 205,非公网有效ip,传进来的IP地址为内网ip地址或者ip保留地址; // 206,设备异常,该设备存在异常的使用行为 RiskType []*int64 `json:"RiskType,omitnil,omitempty" name:"RiskType"` // accountType是QQ或微信开放账号时,用于标识QQ或微信用户登录后关联业务自身的账号ID // 注意:此字段可能返回 null,表示取不到有效值。 AssociateAccount *string `json:"AssociateAccount,omitnil,omitempty" name:"AssociateAccount"` // uid值 // 注意:此字段可能返回 null,表示取不到有效值。 Uid *string `json:"Uid,omitnil,omitempty" name:"Uid"` // 用户操作的目的ID // 比如:点赞,该字段就是被点 赞的消息 id,如果是投票,就是被投号码的 ID // 注意:此字段可能返回 null,表示取不到有效值。 RootId *string `json:"RootId,omitnil,omitempty" name:"RootId"` // 业务侧错误码。成功时返回Success,错误时返回具体业务错误原因。 // 注意:此字段可能返回 null,表示取不到有效值。 CodeDesc *string `json:"CodeDesc,omitnil,omitempty" name:"CodeDesc"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` }
Predefined struct for user
Click to show internal directories.
Click to hide internal directories.