qcloud

package
v0.0.0-...-fbd1cd9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestApi

func RequestApi(conf TencentApiRequestConf) ([]byte, error)

func TMS

func TMS(conf TmsConf) (bool, error)

Types

type TencentApiRequestConf

type TencentApiRequestConf struct {
	SecretID  string
	SecretKey string
	Region    string

	Product string
	Action  string
	Version string
	Method  string

	Data map[string]string
}

type TmsConf

type TmsConf struct {
	SecretID  string
	SecretKey string
	Region    string
	Content   string
	DataID    string
	UserID    string
	UserName  string
	DeviceIP  string
}

type TmsResponse

type TmsResponse struct {
	Response struct {
		// 建议值,Block:建议屏蔽,Review:建议复审,Pass:建议通过
		Suggestion string `json:"Suggestion"`
		// 恶意标签,Normal:正常,Porn:色情,Abuse:谩骂,Ad:广告,Custom:自定义词库,以及令人反感、不安全或不适宜的内容类型
		Label string `json:"Label"`
		// 请求参数中的 DataId
		DataId string `json:"DataId"`
		// 唯一请求 ID,可用于定位 API 问题
		RequestId string `json:"RequestId"`

		Error *struct {
			Code    string `json:"Code"`
			Message string `json:"Message"`
		} `json:"Error,omitempty"`
	} `json:"Response"`
}

Jump to

Keyboard shortcuts

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