Documentation
¶
Index ¶
- Constants
- type AccountTipoffAccessRequest
- type AccountTipoffAccessResponse
- type Client
- func (c *Client) AccountTipoffAccess(request *AccountTipoffAccessRequest) (response *AccountTipoffAccessResponse, err error)
- func (c *Client) DescribeTextLib(request *DescribeTextLibRequest) (response *DescribeTextLibResponse, err error)
- func (c *Client) DescribeTextStat(request *DescribeTextStatRequest) (response *DescribeTextStatResponse, err error)
- func (c *Client) TextModeration(request *TextModerationRequest) (response *TextModerationResponse, err error)
- type DescribeTextLibRequest
- type DescribeTextLibResponse
- type DescribeTextStatRequest
- type DescribeTextStatResponse
- type DetailResults
- type Device
- type EvilCount
- type Filters
- type Overview
- type RiskDetails
- type TextLib
- type TextModerationRequest
- type TextModerationResponse
- type TipoffResponse
- type TrendCount
- type User
Constants ¶
const APIVersion = "2020-07-13"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountTipoffAccessRequest ¶
type AccountTipoffAccessRequest struct {
*tchttp.BaseRequest
// 被举报账号,长度低于 128 个字符
ReportedAccount *string `json:"ReportedAccount,omitempty" name:"ReportedAccount"`
// 被举报账号类型(1-手机号 2-QQ号 3-微信号 4-QQ群号 5-微信openid 6-QQopenid 0-其它)
ReportedAccountType *int64 `json:"ReportedAccountType,omitempty" name:"ReportedAccountType"`
// 被举报账号所属恶意类型(1-诈骗,2-骚扰,3-广告,4-违法违规,5-赌博传销,0-其他)
EvilType *int64 `json:"EvilType,omitempty" name:"EvilType"`
// 举报者账号,长度低于 128 个字符
SenderAccount *string `json:"SenderAccount,omitempty" name:"SenderAccount"`
// 举报者账号类型(1-手机号 2-QQ号 3-微信号 4-QQ群号 5-微信openid 6-QQopenid 0-其它)
SenderAccountType *int64 `json:"SenderAccountType,omitempty" name:"SenderAccountType"`
// 举报者IP地址
SenderIP *string `json:"SenderIP,omitempty" name:"SenderIP"`
// 包含被举报账号的恶意内容(比如文本、图片链接,长度低于1024个字符)
EvilContent *string `json:"EvilContent,omitempty" name:"EvilContent"`
}
func NewAccountTipoffAccessRequest ¶
func NewAccountTipoffAccessRequest() (request *AccountTipoffAccessRequest)
func (*AccountTipoffAccessRequest) FromJsonString ¶
func (r *AccountTipoffAccessRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*AccountTipoffAccessRequest) ToJsonString ¶
func (r *AccountTipoffAccessRequest) ToJsonString() string
type AccountTipoffAccessResponse ¶
type AccountTipoffAccessResponse struct {
*tchttp.BaseResponse
Response *struct {
// 举报接口响应数据
// 注意:此字段可能返回 null,表示取不到有效值。
Data *TipoffResponse `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewAccountTipoffAccessResponse ¶
func NewAccountTipoffAccessResponse() (response *AccountTipoffAccessResponse)
func (*AccountTipoffAccessResponse) FromJsonString ¶
func (r *AccountTipoffAccessResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*AccountTipoffAccessResponse) ToJsonString ¶
func (r *AccountTipoffAccessResponse) ToJsonString() string
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) AccountTipoffAccess ¶
func (c *Client) AccountTipoffAccess(request *AccountTipoffAccessRequest) (response *AccountTipoffAccessResponse, err error)
举报恶意账号
func (*Client) DescribeTextLib ¶
func (c *Client) DescribeTextLib(request *DescribeTextLibRequest) (response *DescribeTextLibResponse, err error)
控制台获取用户词库列表
func (*Client) DescribeTextStat ¶
func (c *Client) DescribeTextStat(request *DescribeTextStatRequest) (response *DescribeTextStatResponse, err error)
控制台识别统计
func (*Client) TextModeration ¶
func (c *Client) TextModeration(request *TextModerationRequest) (response *TextModerationResponse, err error)
文本内容检测(Text Moderation)服务使用了深度学习技术,识别可能令人反感、不安全或不适宜的文本内容,同时支持用户配置词库黑白名单,打击自定义识别类型的图片。
type DescribeTextLibRequest ¶
type DescribeTextLibRequest struct {
*tchttp.BaseRequest
// 内容类型 text: 1; image: 2; audio: 3; video: 4
StrategyType *int64 `json:"StrategyType,omitempty" name:"StrategyType"`
}
func NewDescribeTextLibRequest ¶
func NewDescribeTextLibRequest() (request *DescribeTextLibRequest)
func (*DescribeTextLibRequest) FromJsonString ¶
func (r *DescribeTextLibRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeTextLibRequest) ToJsonString ¶
func (r *DescribeTextLibRequest) ToJsonString() string
type DescribeTextLibResponse ¶
type DescribeTextLibResponse struct {
*tchttp.BaseResponse
Response *struct {
// 文本库id和name列表
TextLib []*TextLib `json:"TextLib,omitempty" name:"TextLib" list`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeTextLibResponse ¶
func NewDescribeTextLibResponse() (response *DescribeTextLibResponse)
func (*DescribeTextLibResponse) FromJsonString ¶
func (r *DescribeTextLibResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeTextLibResponse) ToJsonString ¶
func (r *DescribeTextLibResponse) ToJsonString() string
type DescribeTextStatRequest ¶
type DescribeTextStatRequest struct {
*tchttp.BaseRequest
// 审核类型 1: 机器审核; 2: 人工审核
AuditType *int64 `json:"AuditType,omitempty" name:"AuditType"`
// 查询条件
Filters []*Filters `json:"Filters,omitempty" name:"Filters" list`
}
func NewDescribeTextStatRequest ¶
func NewDescribeTextStatRequest() (request *DescribeTextStatRequest)
func (*DescribeTextStatRequest) FromJsonString ¶
func (r *DescribeTextStatRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeTextStatRequest) ToJsonString ¶
func (r *DescribeTextStatRequest) ToJsonString() string
type DescribeTextStatResponse ¶
type DescribeTextStatResponse struct {
*tchttp.BaseResponse
Response *struct {
// 识别结果统计
Overview *Overview `json:"Overview,omitempty" name:"Overview"`
// 识别量统计
TrendCount []*TrendCount `json:"TrendCount,omitempty" name:"TrendCount" list`
// 违规数据分布
// 注意:此字段可能返回 null,表示取不到有效值。
EvilCount []*EvilCount `json:"EvilCount,omitempty" name:"EvilCount" list`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeTextStatResponse ¶
func NewDescribeTextStatResponse() (response *DescribeTextStatResponse)
func (*DescribeTextStatResponse) FromJsonString ¶
func (r *DescribeTextStatResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeTextStatResponse) ToJsonString ¶
func (r *DescribeTextStatResponse) ToJsonString() string
type DetailResults ¶
type DetailResults struct {
// 恶意标签,Normal:正常,Porn:色情,Abuse:谩骂,Ad:广告,Custom:自定义词库。
// 以及令人反感、不安全或不适宜的内容类型。
Label *string `json:"Label,omitempty" name:"Label"`
// 建议您拿到判断结果后的执行操作。
// 建议值,Block:建议屏蔽,Review:建议复审,Pass:建议通过
// 注意:此字段可能返回 null,表示取不到有效值。
Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"`
// 该标签下命中的关键词
// 注意:此字段可能返回 null,表示取不到有效值。
Keywords []*string `json:"Keywords,omitempty" name:"Keywords" list`
// 该标签模型命中的分值
// 注意:此字段可能返回 null,表示取不到有效值。
Score *int64 `json:"Score,omitempty" name:"Score"`
// 仅当Label为Custom自定义关键词时有效,表示自定义关键词库类型,1:黑白库,2:自定义库
// 注意:此字段可能返回 null,表示取不到有效值。
LibType *int64 `json:"LibType,omitempty" name:"LibType"`
// 仅当Label为Custom自定义关键词时有效,表示自定义库id
// 注意:此字段可能返回 null,表示取不到有效值。
LibId *string `json:"LibId,omitempty" name:"LibId"`
// 仅当Labe为Custom自定义关键词时有效,表示自定义库名称
// 注意:此字段可能返回 null,表示取不到有效值。
LibName *string `json:"LibName,omitempty" name:"LibName"`
}
type Device ¶
type Device struct {
// 用户IP
IP *string `json:"IP,omitempty" name:"IP"`
// Mac地址
Mac *string `json:"Mac,omitempty" name:"Mac"`
// 设备指纹Token
TokenId *string `json:"TokenId,omitempty" name:"TokenId"`
// 设备指纹ID
DeviceId *string `json:"DeviceId,omitempty" name:"DeviceId"`
// 设备序列号
IMEI *string `json:"IMEI,omitempty" name:"IMEI"`
// IOS设备,Identifier For Advertising(广告标识符)
IDFA *string `json:"IDFA,omitempty" name:"IDFA"`
// IOS设备,IDFV - Identifier For Vendor(应用开发商标识符)
IDFV *string `json:"IDFV,omitempty" name:"IDFV"`
}
type Overview ¶
type Overview struct {
// 总调用量
TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 总调用时长
TotalHour *int64 `json:"TotalHour,omitempty" name:"TotalHour"`
// 通过量
PassCount *int64 `json:"PassCount,omitempty" name:"PassCount"`
// 通过时长
PassHour *int64 `json:"PassHour,omitempty" name:"PassHour"`
// 违规量
EvilCount *int64 `json:"EvilCount,omitempty" name:"EvilCount"`
// 违规时长
EvilHour *int64 `json:"EvilHour,omitempty" name:"EvilHour"`
// 疑似违规量
SuspectCount *int64 `json:"SuspectCount,omitempty" name:"SuspectCount"`
// 疑似违规时长
SuspectHour *int64 `json:"SuspectHour,omitempty" name:"SuspectHour"`
}
type RiskDetails ¶
type TextModerationRequest ¶
type TextModerationRequest struct {
*tchttp.BaseRequest
// 文本内容Base64编码。原文长度需小于15000字节,即5000个汉字以内。
Content *string `json:"Content,omitempty" name:"Content"`
// 该字段用于标识业务场景。您可以在内容安全控制台创建对应的ID,配置不同的内容审核策略,通过接口调用,默认不填为0,后端使用默认策略。 -- 该字段暂未开放。
BizType *string `json:"BizType,omitempty" name:"BizType"`
// 数据ID,英文字母、下划线、-组成,不超过64个字符
DataId *string `json:"DataId,omitempty" name:"DataId"`
// 账号相关信息字段,填入后可识别违规风险账号。
User *User `json:"User,omitempty" name:"User"`
// 设备相关信息字段,填入后可识别违规风险设备。
Device *Device `json:"Device,omitempty" name:"Device"`
}
func NewTextModerationRequest ¶
func NewTextModerationRequest() (request *TextModerationRequest)
func (*TextModerationRequest) FromJsonString ¶
func (r *TextModerationRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*TextModerationRequest) ToJsonString ¶
func (r *TextModerationRequest) ToJsonString() string
type TextModerationResponse ¶
type TextModerationResponse struct {
*tchttp.BaseResponse
Response *struct {
// 您在入参时所填入的Biztype参数。 -- 该字段暂未开放。
BizType *string `json:"BizType,omitempty" name:"BizType"`
// 数据是否属于恶意类型。
// 0:正常 1:可疑
EvilFlag *int64 `json:"EvilFlag,omitempty" name:"EvilFlag"`
// 恶意标签,Normal:正常,Porn:色情,Abuse:谩骂,Ad:广告,Custom:自定义词库。
// 以及令人反感、不安全或不适宜的内容类型。
Label *string `json:"Label,omitempty" name:"Label"`
// 建议您拿到判断结果后的执行操作。
// 建议值,Block:建议屏蔽,Review:建议复审,Pass:建议通过
Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"`
// 文本命中的关键词信息,用于提示您文本违规的具体原因,可能会返回多个命中的关键词。(如:加我微信)
// 如返回值为空,Score不为空,即识别结果(Label)是来自于语义模型判断的返回值。
// 注意:此字段可能返回 null,表示取不到有效值。
Keywords []*string `json:"Keywords,omitempty" name:"Keywords" list`
// 机器判断当前分类的置信度,取值范围:0.00~100.00。分数越高,表示越有可能属于当前分类。
// (如:色情 99.99,则该样本属于色情的置信度非常高。)
Score *int64 `json:"Score,omitempty" name:"Score"`
// 接口识别样本后返回的详细结果。
// 注意:此字段可能返回 null,表示取不到有效值。
DetailResults []*DetailResults `json:"DetailResults,omitempty" name:"DetailResults" list`
// 接口识别样本中存在违规账号风险的检测结果。
// 注意:此字段可能返回 null,表示取不到有效值。
RiskDetails []*RiskDetails `json:"RiskDetails,omitempty" name:"RiskDetails" list`
// 扩展字段,用于特定信息返回,不同客户/Biztype下返回信息不同。
// 注意:此字段可能返回 null,表示取不到有效值。
Extra *string `json:"Extra,omitempty" name:"Extra"`
// 请求参数中的DataId
// 注意:此字段可能返回 null,表示取不到有效值。
DataId *string `json:"DataId,omitempty" name:"DataId"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewTextModerationResponse ¶
func NewTextModerationResponse() (response *TextModerationResponse)
func (*TextModerationResponse) FromJsonString ¶
func (r *TextModerationResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*TextModerationResponse) ToJsonString ¶
func (r *TextModerationResponse) ToJsonString() string
type TipoffResponse ¶
type TrendCount ¶
type TrendCount struct {
// 总调用量
// 注意:此字段可能返回 null,表示取不到有效值。
TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 总调用时长
// 注意:此字段可能返回 null,表示取不到有效值。
TotalHour *int64 `json:"TotalHour,omitempty" name:"TotalHour"`
// 通过量
// 注意:此字段可能返回 null,表示取不到有效值。
PassCount *int64 `json:"PassCount,omitempty" name:"PassCount"`
// 通过时长
// 注意:此字段可能返回 null,表示取不到有效值。
PassHour *int64 `json:"PassHour,omitempty" name:"PassHour"`
// 违规量
// 注意:此字段可能返回 null,表示取不到有效值。
EvilCount *int64 `json:"EvilCount,omitempty" name:"EvilCount"`
// 违规时长
// 注意:此字段可能返回 null,表示取不到有效值。
EvilHour *int64 `json:"EvilHour,omitempty" name:"EvilHour"`
// 疑似违规量
// 注意:此字段可能返回 null,表示取不到有效值。
SuspectCount *int64 `json:"SuspectCount,omitempty" name:"SuspectCount"`
// 疑似违规时长
// 注意:此字段可能返回 null,表示取不到有效值。
SuspectHour *int64 `json:"SuspectHour,omitempty" name:"SuspectHour"`
// 日期
// 注意:此字段可能返回 null,表示取不到有效值。
Date *string `json:"Date,omitempty" name:"Date"`
}
type User ¶
type User struct {
// 用户账号ID,如填写,会根据账号历史恶意情况,判定消息有害结果,特别是有利于可疑恶意情况下的辅助判断。账号可以填写微信uin、QQ号、微信openid、QQopenid、字符串等。该字段和账号类别确定唯一账号。
UserId *string `json:"UserId,omitempty" name:"UserId"`
// 用户昵称
Nickname *string `json:"Nickname,omitempty" name:"Nickname"`
// 账号类别,"1-微信uin 2-QQ号 3-微信群uin 4-qq群号 5-微信openid 6-QQopenid 7-其它string"
AccountType *int64 `json:"AccountType,omitempty" name:"AccountType"`
// 性别 默认0 未知 1 男性 2 女性
Gender *int64 `json:"Gender,omitempty" name:"Gender"`
// 年龄 默认0 未知
Age *int64 `json:"Age,omitempty" name:"Age"`
// 用户等级,默认0 未知 1 低 2 中 3 高
Level *int64 `json:"Level,omitempty" name:"Level"`
// 手机号
Phone *string `json:"Phone,omitempty" name:"Phone"`
}