businessSecurity

package
v1.0.123 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrdBusinessSecurity = "business_security"
	PrdAdblocker        = "adblocker"
	PrdElemVerify       = "element_verify"
	PRDMobileRisk       = "mobile_security"
	PRDContentRisk      = "content_security"
)

Product

View Source
const (
	ServiceContentVideoRisk        = "video_risk"
	ServiceContentImageContentRisk = "image_content_risk"
	ServiceContentTextRisk         = "text_risk"
	ServiceContentAudioRisk        = "audio_risk"
	ServiceContentVideoLiveRisk    = "video_live_risk"
	ServiceContentAudioLiveRisk    = "audio_live_risk"
)

service for content_security product

View Source
const (
	MONTHLY = "month"
	DAILY   = "day"
)

unit type

View Source
const (
	RiskTypeText  = "text"
	RiskTypeImage = "image"
	RiskTypeAudio = "audio"
)

RiskType

Variables

View Source
var (
	ServiceInfoMap = map[string]*base.ServiceInfo{
		base.RegionCnNorth1: {
			Timeout: 5 * time.Second,
			Host:    "riskcontrol.volcengineapi.com",
			Header: http.Header{
				"Accept": []string{"application/json"},
			},
			Credentials: base.Credentials{Region: base.RegionCnNorth1, Service: "BusinessSecurity"},
		},
	}

	ApiInfoList = map[string]*base.ApiInfo{
		"RiskDetection": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"RiskDetection"},
				"Version": []string{"2021-02-02"},
			},
		},
		"AsyncRiskDetection": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncRiskDetection"},
				"Version": []string{"2021-02-25"},
			},
		},
		"RiskResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"RiskResult"},
				"Version": []string{"2021-03-10"},
			},
		},
		"DataReport": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DataReport"},
				"Version": []string{"2021-08-31"},
			},
		},
		"TextRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"TextRisk"},
				"Version": []string{"2022-01-26"},
			},
		},
		"AsyncVideoRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncVideoRisk"},
				"Version": []string{"2021-11-29"},
			},
		},
		"VideoResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"VideoResult"},
				"Version": []string{"2021-11-29"},
			},
		},
		"AsyncImageRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncImageRisk"},
				"Version": []string{"2021-11-29"},
			},
		},
		"AsyncImageRiskV2": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncImageRisk"},
				"Version": []string{"2022-08-26"},
			},
		},
		"ImageContentRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ImageContentRisk"},
				"Version": []string{"2021-11-29"},
			},
		},
		"ImageContentRiskV2": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ImageContentRiskV2"},
				"Version": []string{"2021-11-29"},
			},
		},
		"GetImageResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetImageResult"},
				"Version": []string{"2021-11-29"},
			},
		},
		"GetImageResultV2": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ImageResult"},
				"Version": []string{"2022-08-26"},
			},
		},
		"AsyncAudioRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncAudioRisk"},
				"Version": []string{"2022-04-01"},
			},
		},
		"GetAudioResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetAudioResult"},
				"Version": []string{"2022-04-01"},
			},
		},
		"AudioRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AudioRisk"},
				"Version": []string{"2022-04-01"},
			},
		},
		"AsyncLiveVideoRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncLiveVideoRisk"},
				"Version": []string{"2022-04-25"},
			},
		},
		"GetVideoLiveResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetVideoLiveResult"},
				"Version": []string{"2022-04-25"},
			},
		},
		"CloseVideoLiveRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CloseVideoLive"},
				"Version": []string{"2022-04-25"},
			},
		},
		"AsyncLiveAudioRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AsyncLiveAudioRisk"},
				"Version": []string{"2022-04-25"},
			},
		},
		"GetAudioLiveResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetAudioLiveResult"},
				"Version": []string{"2022-04-25"},
			},
		},
		"CloseAudioLiveRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CloseAudioLive"},
				"Version": []string{"2022-04-25"},
			},
		},
		"EnableCustomContents": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"EnableCustomContents"},
				"Version": []string{"2022-04-28"},
			},
		},
		"DisableCustomContents": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DisableCustomContents"},
				"Version": []string{"2022-04-28"},
			},
		},
		"CreateCustomContents": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateCustomContents"},
				"Version": []string{"2022-01-22"},
			},
		},
		"UploadCustomContents": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UploadCustomContents"},
				"Version": []string{"2022-02-07"},
			},
		},
		"DeleteCustomContents": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteCustomContents"},
				"Version": []string{"2022-04-28"},
			},
		},
		"ElementVerify": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ElementVerify"},
				"Version": []string{"2021-11-23"},
			},
		},
		"MobileStatus": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"MobileStatus"},
				"Version": []string{"2020-12-25"},
			},
		},
		"ElementVerifyV2": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ElementVerify"},
				"Version": []string{"2022-04-13"},
			},
		},
		"ElementVerifyEncrypted": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ElementVerifyEncrypted"},
				"Version": []string{"2022-11-24"},
			},
		},
		"MobileStatusV2": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"MobileStatus"},
				"Version": []string{"2022-04-13"},
			},
		},
		"TextSliceRisk": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"TextSliceRisk"},
				"Version": []string{"2022-11-07"},
			},
		},
		"SimpleRiskStat": {
			Method:  http.MethodGet,
			Path:    "/",
			Timeout: 10 * time.Second,
			Query: url.Values{
				"Action":  []string{"SimpleRiskStat"},
				"Version": []string{"2022-12-23"},
			},
		},
		"ContentRiskStat": {
			Method:  http.MethodGet,
			Timeout: 10 * time.Second,
			Path:    "/",
			Query: url.Values{
				"Action":  []string{"ContentRiskStat"},
				"Version": []string{"2022-12-23"},
			},
		},
		"DelSystemNameListItem": {
			Method:  http.MethodPost,
			Timeout: 10 * time.Second,
			Path:    "/",
			Query: url.Values{
				"Action":  []string{"DelSystemNameListItem"},
				"Version": []string{"2022-12-23"},
			},
		},
		"QuerySystemNameListItem": {
			Method:  http.MethodGet,
			Timeout: 10 * time.Second,
			Path:    "/",
			Query: url.Values{
				"Action":  []string{"QuerySystemNameListItem"},
				"Version": []string{"2022-12-23"},
			},
		},
	}
)
View Source
var DefaultInstance = NewInstance()

Functions

func AesCBCEncryptWithBase64

func AesCBCEncryptWithBase64(secretKey, origData string) (string, error)

AesCBCEncryptWithBase64 encrypt

func ToUrlValues

func ToUrlValues(i interface{}) (values url.Values)

func UnmarshalResultInto

func UnmarshalResultInto(data []byte, result interface{}) error

Types

type AsyncRiskDetectionRequest

type AsyncRiskDetectionRequest struct {
	AppId      int64  `json:"AppId"`
	Service    string `json:"Service"`
	Parameters string `json:"Parameters"`
}

type AsyncRiskDetectionResponse

type AsyncRiskDetectionResponse struct {
	RequestId string `json:"RequestId"`
	Code      int    `json:"Code"`
	Message   string `json:"Message"`
}

type AsyncVideoRiskResponse

type AsyncVideoRiskResponse struct {
	RequestId string      `json:"RequestId"`
	Code      int         `json:"Code"`
	Message   string      `json:"Message"`
	Data      RequestData `json:"Data"`
}

type AudioDetail

type AudioDetail struct {
	StartTime    float64        `json:"StartTime"`
	EndTime      float64        `json:"EndTime"`
	FrameUrl     string         `json:"FrameUrl"`
	AudioText    string         `json:"AudioText"`
	FrameResults []*FrameResult `json:"FrameResults"`
}

type AudioDetailV2

type AudioDetailV2 struct {
	StartTime    int              `json:"StartTime"`
	EndTime      int              `json:"EndTime"`
	FrameUrl     string           `json:"FrameUrl"`
	AudioText    string           `json:"AudioText"`
	SliceId      string           `json:"SliceId"`
	UserId       string           `json:"UserId"`
	Decision     string           `json:"Decision"`
	FrameResults []*FrameResultV2 `json:"FrameResults"`
}

type AudioResult

type AudioResult struct {
	Decision string         `json:"Decision"`
	Details  []*AudioDetail `json:"Details"`
	DataId   string         `json:"DataId"`
}

type AudioResultResponse

type AudioResultResponse struct {
	RequestId string        `json:"RequestId"`
	Code      int           `json:"Code"`
	Message   string        `json:"Message"`
	AudioResp AudioResultV2 `json:"Data"`
}

func (*AudioResultResponse) String

func (resp *AudioResultResponse) String() string

type AudioResultV2

type AudioResultV2 struct {
	Decision    string           `json:"Decision"`
	DataId      string           `json:"DataId"`
	AudioText   string           `json:"AudioText"`
	Details     []*AudioDetailV2 `json:"Details"`
	PassThrough string           `json:"PassThrough"`
}

type BusinessSecurity

type BusinessSecurity struct {
	*base.Client
	// contains filtered or unexported fields
}

func NewInstance

func NewInstance() *BusinessSecurity

func (*BusinessSecurity) AsyncAudioRisk

Asynchronous audio risk detection 内容安全音频异步接口

func (*BusinessSecurity) AsyncImageRisk

Asynchronous video risk detection 内容安全图片异步接口

func (*BusinessSecurity) AsyncImageRiskV2

func (*BusinessSecurity) AsyncLiveAudioRisk

Asynchronous audio risk detection 内容安全音频异步接口

func (*BusinessSecurity) AsyncLiveVideoRisk

Asynchronous video risk detection 内容安全图片异步接口

func (*BusinessSecurity) AsyncRiskDetection

Asynchronous risk detection 风险识别异步接口

func (*BusinessSecurity) AsyncVideoRisk

Asynchronous video risk detection 内容安全视频异步接口

func (*BusinessSecurity) AudioRisk added in v1.0.113

audio Risk 风险识别接口

func (*BusinessSecurity) CloseAudioLiveRisk

func (p *BusinessSecurity) CloseAudioLiveRisk(req *VideoResultRequest) (*AsyncVideoRiskResponse, error)

close audio Risk 风险识别异步关闭接口

func (*BusinessSecurity) CloseRetry

func (p *BusinessSecurity) CloseRetry()

func (*BusinessSecurity) CloseVideoLiveRisk

func (p *BusinessSecurity) CloseVideoLiveRisk(req *VideoResultRequest) (*AsyncVideoRiskResponse, error)

close audio Risk 风险识别异步关闭接口

func (*BusinessSecurity) ContentRiskStat added in v1.0.104

func (*BusinessSecurity) CreateCustomContents

func (p *BusinessSecurity) CreateCustomContents(req *NewCustomContentsReq) (*CustomContentResponse, error)

CreateCustomContents 创建自定义库

func (*BusinessSecurity) DataReport

func (*BusinessSecurity) DelSystemNameListItem added in v1.0.121

func (p *BusinessSecurity) DelSystemNameListItem(req *DelSystemNameListItemReq) (*DelSystemNameListItemResp, error)

delete system name list item 删除系统名单内容,进行解封

func (*BusinessSecurity) DeleteCustomContents

func (p *BusinessSecurity) DeleteCustomContents(req *ModifyTextContent) (*CustomContentResponse, error)

delete custom contents 删除文本自定义库内容

func (*BusinessSecurity) DisableCustomContents

func (p *BusinessSecurity) DisableCustomContents(req *UpdateContentReq) (*AsyncRiskDetectionResponse, error)

disable custom contents 禁用文本自定义库

func (*BusinessSecurity) ElementVerify deprecated

Deprecated: use ElementVerifyV2 instead 已废弃,请使用ElementVerifyV2 Deprecated

func (*BusinessSecurity) ElementVerifyEncrypted

func (p *BusinessSecurity) ElementVerifyEncrypted(encryptedType string, secretKey string, req *ElementVerifyRequest) (*ElementVerifyResponseV2, error)

ElementVerifyEncrypted 加密要素验证 encryptedType - 加密类型,例如:AES secretKey - 秘钥(需要申请)

func (*BusinessSecurity) ElementVerifyV2

要素验证

func (*BusinessSecurity) EnableCustomContents

func (p *BusinessSecurity) EnableCustomContents(req *UpdateContentReq) (*CustomContentResponse, error)

EnableCustomContents 启用文本自定义库

func (*BusinessSecurity) GetAudioLiveResult

func (p *BusinessSecurity) GetAudioLiveResult(req *VideoResultRequest) (*AudioResultResponse, error)

audio Risk result 风险识别结果获取接口

func (*BusinessSecurity) GetAudioResult

func (p *BusinessSecurity) GetAudioResult(req *VideoResultRequest) (*AudioResultResponse, error)

audio Risk result 风险识别结果获取接口

func (*BusinessSecurity) GetImageResult

func (p *BusinessSecurity) GetImageResult(req *VideoResultRequest) (*ImageResultResponse, error)

Risk result 风险识别结果获取接口

func (*BusinessSecurity) GetImageResultV2

func (p *BusinessSecurity) GetImageResultV2(req *VideoResultRequest) (*ImageResultResponse, error)

func (*BusinessSecurity) GetVideoLiveResult

func (p *BusinessSecurity) GetVideoLiveResult(req *VideoResultRequest) (*VideoResultResponse, error)

Risk result 风险识别结果获取接口

func (*BusinessSecurity) ImageContentRisk

func (p *BusinessSecurity) ImageContentRisk(req *RiskDetectionRequest) (*ImageResultResponse, error)

image risk deteciton 已废弃-使用ImageContentRiskV2 Deprecated

func (*BusinessSecurity) ImageContentRiskV2 added in v1.0.100

func (p *BusinessSecurity) ImageContentRiskV2(req *RiskDetectionRequest) (*ImageResultResponse, error)

image risk deteciton 内容安全图片实时接口

func (*BusinessSecurity) MobileStatus deprecated

Deprecated: use MobileStatusV2 instead 已废弃,请使用MobileStatusV2 Deprecated

func (*BusinessSecurity) MobileStatusV2

号码状态

func (*BusinessSecurity) QuerySystemNameListItem added in v1.0.121

query system name list item 查询系统名单内容

func (*BusinessSecurity) Retry

func (p *BusinessSecurity) Retry() bool

func (*BusinessSecurity) RiskDetection

Synchronous risk detection 风险识别实时接口

func (*BusinessSecurity) RiskResult

Risk result 风险识别结果获取接口

func (*BusinessSecurity) SetRegion

func (p *BusinessSecurity) SetRegion(region string) error

func (*BusinessSecurity) SimpleRiskStat added in v1.0.104

func (*BusinessSecurity) TextRisk

text risk detection 已废弃-使用TextSliceRisk Deprecated

func (*BusinessSecurity) TextSliceRisk

text slice risk detection 内容安全文本切片检测实时接口

func (*BusinessSecurity) UploadCustomContents

func (p *BusinessSecurity) UploadCustomContents(req *ModifyTextContent) (*CustomContentResponse, error)

upload custom contents 上传文本自定义库内容

func (*BusinessSecurity) VideoResult

Risk result 风险识别结果获取接口

type CommonProductStatisticsParams added in v1.0.104

type CommonProductStatisticsParams struct {
	StartDate     string `json:"start_date"`
	EndDate       string `json:"end_date"`
	NeedAppDetail bool   `json:"need_app_detail"`
	OperateTime   int64  `json:"operate_time"`
}

type CommonProductStatisticsReq added in v1.0.104

type CommonProductStatisticsReq struct {
	Product    string  `json:"Product" form:"Product" query:"Product"`
	UnitType   string  `json:"UnitType" form:"UnitType" query:"UnitType"`
	Parameters string  `json:"Parameters" form:"Parameters" query:"Parameters"`
	AppId      *int64  `json:"AppId" form:"AppId" query:"AppId"`
	Service    *string `json:"Service" form:"Service" query:"Service"`
}

type CommonProductStatisticsResultDetail added in v1.0.104

type CommonProductStatisticsResultDetail struct {
	AccountId  int64  `json:"AccountId"`
	RequestCnt int64  `json:"RequestCnt"`
	DateTime   string `json:"DateTime"`

	ChargeRequestCnt *int64  `json:"ChargeRequestCnt,omitempty"`
	Service          *string `json:"Service,omitempty"`
	AppId            *int64  `json:"AppId,omitempty"`
	AppName          *string `json:"AppName,omitempty"`
}

type CommonProductStatisticsResultTotal added in v1.0.104

type CommonProductStatisticsResultTotal struct {
	AccountId        int64  `json:"AccountId"`
	RequestCnt       int64  `json:"RequestCnt"`
	ChargeRequestCnt *int64 `json:"ChargeRequestCnt,omitempty"`
}

type ContentProductStatisticsParams added in v1.0.104

type ContentProductStatisticsParams struct {
	CommonProductStatisticsParams
	Biztype            string `json:"biztype"`
	NeedBizTypeDetail  bool   `json:"need_biz_type_detail"`
	RiskType           string `json:"risk_type"`
	NeedRiskTypeDetail bool   `json:"need_risk_type_detail"`
}

type ContentProductStatisticsResult added in v1.0.104

type ContentProductStatisticsResult struct {
	Total  *ContentProductStatisticsResultTotal    `json:"Total"`
	Detail []*ContentProductStatisticsResultDetail `json:"Detail"`
}

type ContentProductStatisticsResultDetail added in v1.0.104

type ContentProductStatisticsResultDetail struct {
	CommonProductStatisticsResultDetail
	Biztype         *string  `json:"Biztype,omitempty"`
	RequestWordCnt  *int64   `json:"RequestWordCnt,omitempty"`
	RiskType        *string  `json:"RiskType,omitempty"`
	RequestFrameCnt *int64   `json:"RequestFrameCnt,omitempty"`
	RequestDuration *float64 `json:"RequestAudioDuration,omitempty"`
}

type ContentProductStatisticsResultTotal added in v1.0.104

type ContentProductStatisticsResultTotal struct {
	CommonProductStatisticsResultTotal

	RequestWordCnt  *int64   `json:"RequestWordCnt,omitempty"`
	RequestFrameCnt *int64   `json:"RequestFrameCnt,omitempty"`
	RequestDuration *float64 `json:"RequestAudioDuration,omitempty"`
}

type ContentRiskStatResponse added in v1.0.104

type ContentRiskStatResponse struct {
	Result *ContentRiskStatResult `json:"Result"`
}

type ContentRiskStatResult added in v1.0.104

type ContentRiskStatResult struct {
	OpenResult
	Data *ContentProductStatisticsResult `json:"Data"`
}

type Context

type Context struct {
	MatchedWords []string   `json:"MatchedWords"`
	LibName      string     `json:"LibName"`
	Positions    []Position `json:"Positions"`
}

type CustomContentResponse

type CustomContentResponse struct {
	LogId     string      `json:"log_id"`
	ErrCode   int         `json:"err_code"`
	ErrMsg    string      `json:"err_msg"`
	Timestamp int         `json:"timestamp"`
	Data      interface{} `json:"data"`
}

type DataReportRequest

type DataReportRequest struct {
	AppId      int64  `json:"AppId"`
	Service    string `json:"Service"`
	Parameters string `json:"Parameters"`
}

type DataReportResponse

type DataReportResponse struct {
	RequestId string `json:"RequestId"`
	Code      int    `json:"Code"`
	Message   string `json:"Message"`
}

type DecisionData

type DecisionData struct {
	Score      int        `json:"Score"`
	Tags       []string   `json:"Tags"`
	Detail     string     `json:"Detail"`
	DeviceInfo DeviceInfo `json:"DeviceInfo"`
}

type DelSystemNameListItemReq added in v1.0.121

type DelSystemNameListItemReq struct {
	Product string `json:"Product" form:"Product" query:"Product"`
	AppId   int64  `json:"AppId" form:"AppId" query:"AppId"`
	Service string `json:"Service" form:"Service" query:"Service"`
	Object  string `json:"Object" form:"Object" query:"Object"`
}

type DelSystemNameListItemResp added in v1.0.121

type DelSystemNameListItemResp struct {
	OpenResult
	Data *DelSystemNameListItemResult `json:"Data"`
}

type DelSystemNameListItemResult added in v1.0.121

type DelSystemNameListItemResult struct {
	Status int `json:"Status"`
}

type DeviceInfo

type DeviceInfo struct {
	DevSecID      string `json:"DevSecID"`
	TokenCreateTs int64  `json:"TokenCreateTs"`
}

type ElementVerifyData

type ElementVerifyData struct {
	Status int    `json:"Status"`
	Detail string `json:"Detail"`
}

type ElementVerifyDataDetail

type ElementVerifyDataDetail struct {
	BankName       string `json:"BankName,omitempty"`
	CardType       string `json:"CardType,omitempty"`
	CardCategory   string `json:"CardCategory,omitempty"`
	EnterpriseCode string `json:"EnterpriseCode,omitempty"`
	EnterpriseName string `json:"EnterpriseName,omitempty"`
	IdCardNo       string `json:"IdCardNo,omitempty"`
	IdCardName     string `json:"IdCardName,omitempty"`
}

type ElementVerifyDataV2

type ElementVerifyDataV2 struct {
	Status int                     `json:"Status"`
	Detail ElementVerifyDataDetail `json:"Detail"`
}

type ElementVerifyRequest

type ElementVerifyRequest struct {
	AppId         int64  `json:"AppId"`
	Service       string `json:"Service"`
	EncryptedType string `json:"EncryptedType"`
	Parameters    string `json:"Parameters"`
}

type ElementVerifyResponse

type ElementVerifyResponse struct {
	RequestId string            `json:"RequestId"`
	Code      int               `json:"Code"`
	Message   string            `json:"Message"`
	Data      ElementVerifyData `json:"Data"`
}

type ElementVerifyResponseV2

type ElementVerifyResponseV2 struct {
	RequestId string              `json:"RequestId"`
	Code      int                 `json:"Code"`
	Message   string              `json:"Message"`
	Data      ElementVerifyDataV2 `json:"Data"`
}

type Frame

type Frame struct {
	Url      string   `json:"Url"`
	Offset   float64  `json:"Offset"`
	SliceId  string   `json:"SliceId"`
	UserId   string   `json:"UserId"`
	Decision string   `json:"Decision"`
	Text     string   `json:"Text"`
	Results  []Result `json:"Results"`
}

type FrameResult

type FrameResult struct {
	Label        string   `json:"Label"`
	SubLabel     string   `json:"SubLabel"`
	Decision     string   `json:"Decision"`
	MatchedWords []string `json:"MatchedWords"`
	LibName      string   `json:"LibName"`
}

type FrameResultV2

type FrameResultV2 struct {
	Label    string     `json:"Label"`
	SubLabel string     `json:"SubLabel"`
	Decision string     `json:"Decision"`
	Contexts []*Context `json:"Contexts"`
}

type ImageContentFrame

type ImageContentFrame struct {
	Id  float64 `json:"id"`
	Url string  `json:"url"`
}

type ImageContentRiskResp

type ImageContentRiskResp struct {
	DataId   string                 `json:"DataId"`
	Decision string                 `json:"Decision"`
	Results  []*ImageContentRiskTag `json:"Results"`
	Scores   map[string]float64     `json:"Scores"`
}

type ImageContentRiskTag

type ImageContentRiskTag struct {
	Label    string               `json:"Label"`
	SubLabel string               `json:"SubLabel"`
	Decision string               `json:"Decision"`
	Score    float64              `json:"score"`
	Detail   interface{}          `json:"Detail"`
	Frames   []*ImageContentFrame `json:"Frames"`
}

type ImageResultResponse

type ImageResultResponse struct {
	RequestId string               `json:"RequestId"`
	Code      int                  `json:"Code"`
	Message   string               `json:"Message"`
	ImageResp ImageContentRiskResp `json:"Data"`
}

type Label

type Label struct {
	Label    string    `json:"Label"`
	SubLabel string    `json:"SubLabel"`
	Decision string    `json:"Decision"`
	Contexts []Context `json:"Contexts"`
}

type MobileStatusData

type MobileStatusData struct {
	Status int    `json:"Status"`
	Mobile string `json:"Mobile"`
	Detail string `json:"Detail"`
}

type MobileStatusDataV2

type MobileStatusDataV2 struct {
	Status int                `json:"Status"`
	Mobile string             `json:"Mobile"`
	Detail MobileStatusDetail `json:"Detail"`
}

type MobileStatusDetail

type MobileStatusDetail struct {
	Province     string `json:"Province"`
	ProvinceCode string `json:"ProvinceCode"`
	City         string `json:"City"`
	CityCode     string `json:"CityCode"`
	ISP          string `json:"ISP"`
	Mobile       string `json:"Mobile"`
	PostCode     string `json:"PostCode"`
	OldISP       int    `json:"OldISP"`
	NewISP       int    `json:"NewISP"`
}

type MobileStatusRequest

type MobileStatusRequest struct {
	AppId      int64  `json:"AppId"`
	Service    string `json:"Service"`
	Parameters string `json:"Parameters"`
}

type MobileStatusResponse

type MobileStatusResponse struct {
	RequestId string           `json:"RequestId"`
	Code      int              `json:"Code"`
	Message   string           `json:"Message"`
	Data      MobileStatusData `json:"Data"`
}

type MobileStatusResponseV2

type MobileStatusResponseV2 struct {
	RequestId string             `json:"RequestId"`
	Code      int                `json:"Code"`
	Message   string             `json:"Message"`
	Data      MobileStatusDataV2 `json:"Data"`
}

type ModifyTextContent

type ModifyTextContent struct {
	Data    []string `json:"data" form:"data" query:"data"`
	AppID   int64    `json:"app_id" form:"app_id" query:"app_id"`
	Service string   `json:"service" form:"service" query:"service"`
	Name    string   `json:"name" form:"name" query:"name"`
}

type NewCustomContentsReq

type NewCustomContentsReq struct {
	AppID       int64  `json:"app_id" form:"app_id" query:"app_id"`
	Service     string `json:"service" form:"service" query:"service"`
	Name        string `json:"name" form:"name" query:"name"`
	Description string `json:"description" form:"description" query:"description"`
	Decision    string `json:"decision" form:"decision" query:"decision"`
	MatchType   string `json:"match_type" form:"match_type" query:"match_type"`
	LibType     string `json:"lib_type" form:"lib_type" query:"lib_type"`
	Biztypes    string `json:"biztypes" form:"biztypes" query:"biztypes"`
}

type OpenResult added in v1.0.104

type OpenResult struct {
	RequestId string `json:"RequestId"`
	Code      int    `json:"Code"`
	Message   string `json:"Message"`
}

func (*OpenResult) GetErr added in v1.0.104

func (result *OpenResult) GetErr() error

type Page

type Page struct {
	PageNum  int64 `json:"PageNum" form:"PageNum"`
	PageSize int64 `json:"PageSize" form:"PageSize"`
	Total    int64 `json:"Total" form:"Total"` // used when return page information in response, no need when request
}

type Position

type Position struct {
	StartPos int `json:"StartPos"`
	EndPos   int `json:"EndPos"`
}

type QuerySystemNameListItemReq added in v1.0.121

type QuerySystemNameListItemReq struct {
	Product string `json:"Product" form:"Product" query:"Product"`
	AppId   int64  `json:"AppId" form:"AppId" query:"AppId"`
	Service string `json:"Service" form:"Service" query:"Service"`
	Object  string `json:"Object" form:"Object" query:"Object"`
}

func (*QuerySystemNameListItemReq) ToQuery added in v1.0.121

func (r *QuerySystemNameListItemReq) ToQuery() url.Values

type QuerySystemNameListItemResp added in v1.0.121

type QuerySystemNameListItemResp struct {
	OpenResult
	Data *QuerySystemNameListItemResult `json:"Data"`
}

type QuerySystemNameListItemResult added in v1.0.121

type QuerySystemNameListItemResult struct {
	IsHit bool `json:"IsHit"`
}

type RequestData

type RequestData struct {
	PassThrough string `json:"PassThrough"`
}

type Result

type Result struct {
	Decision string      `json:"Decision"`
	Label    string      `json:"Label"`
	SubLabel string      `json:"SubLabel"`
	Detail   interface{} `json:"Detail"`
}

type RiskDetectionRequest

type RiskDetectionRequest struct {
	AppId      int64  `json:"AppId"`
	Service    string `json:"Service"`
	Parameters string `json:"Parameters"`
}

type RiskDetectionResponse

type RiskDetectionResponse struct {
	RequestId string       `json:"RequestId"`
	Code      int          `json:"Code"`
	Message   string       `json:"Message"`
	Data      DecisionData `json:"Data"`
}

type RiskResultRequest

type RiskResultRequest struct {
	AppId     int64  `json:"AppId" form:"AppId"`
	Service   string `json:"Service" form:"Service"`
	StartTime int64  `json:"StartTime" form:"StartTime"`
	EndTime   int64  `json:"EndTime" form:"EndTime"`
	Page
}

func (*RiskResultRequest) ToQuery

func (r *RiskResultRequest) ToQuery() url.Values

type RiskResultResponse

type RiskResultResponse struct {
	RequestId string                   `json:"RequestId"`
	Code      int                      `json:"Code"`
	Message   string                   `json:"Message"`
	Data      []map[string]interface{} `json:"Data"`
	Page      Page                     `json:"page"`
}

type SimpleProductStatisticsParams added in v1.0.104

type SimpleProductStatisticsParams struct {
	CommonProductStatisticsParams
	NeedServiceDetail bool `json:"need_service_detail"`
}

type SimpleProductStatisticsResult added in v1.0.104

type SimpleProductStatisticsResult struct {
	Total  *SimpleProductStatisticsResultTotal    `json:"Total"`
	Detail []*SimpleProductStatisticsResultDetail `json:"Detail"`
}

type SimpleProductStatisticsResultDetail added in v1.0.104

type SimpleProductStatisticsResultDetail CommonProductStatisticsResultDetail

type SimpleProductStatisticsResultTotal added in v1.0.104

type SimpleProductStatisticsResultTotal CommonProductStatisticsResultTotal

type SimpleRiskStatResponse added in v1.0.104

type SimpleRiskStatResponse struct {
	Result *SimpleRiskStatResult `json:"Result"`
}

openapi

type SimpleRiskStatResult added in v1.0.104

type SimpleRiskStatResult struct {
	OpenResult
	Data *SimpleProductStatisticsResult `json:"Data"`
}

type TextResult

type TextResult struct {
	RiskText   string   `json:"RiskText"`
	RTStartPos int      `json:"RTStartPos"`
	RTEndPos   int      `json:"RTEndPos"`
	Labels     []*Label `json:"Labels"`
}

type TextResultResponse

type TextResultResponse struct {
	RequestId string         `json:"RequestId"`
	Code      int            `json:"Code"`
	Message   string         `json:"Message"`
	VideoResp TextRiskRespV2 `json:"Data"`
}

type TextRiskRespV2

type TextRiskRespV2 struct {
	Decision       string   `json:"Decision"`
	DecisionDetail string   `json:"DecisionDetail"`
	Result         []*Label `json:"Result"`
}

type TextRiskRespV3

type TextRiskRespV3 struct {
	Decision       string        `json:"Decision"`
	DecisionDetail string        `json:"DecisionDetail"`
	FinalLabel     string        `json:"FinalLabel"`
	TextCount      int           `json:"TextCount"`
	Results        []*TextResult `json:"Results"`
}

type TextSliceResultResponse

type TextSliceResultResponse struct {
	RequestId string         `json:"RequestId"`
	Code      int            `json:"Code"`
	Message   string         `json:"Message"`
	VideoResp TextRiskRespV3 `json:"Data"`
}

func (*TextSliceResultResponse) String

func (resp *TextSliceResultResponse) String() string

type UpdateContentReq

type UpdateContentReq struct {
	AppID   int64  `json:"app_id" form:"app_id" query:"app_id"`
	Service string `json:"service" form:"service" query:"service"`
	LibType string `json:"lib_type" form:"lib_type" query:"lib_type"`
	Name    string `json:"name" form:"name" query:"name"`
	Status  int    `json:"status" form:"status" query:"status"`
}

type VideoResp

type VideoResp struct {
	DataId       string        `json:"DataId"`
	VideoResult  VideoResult   `json:"VideoResults"`
	AudioResults AudioResultV2 `json:"AudioResults"`
	PassThrough  string        `json:"PassThrough"`
}

type VideoResult

type VideoResult struct {
	Decision        string  `json:"Decision"`
	ImageSliceCount int64   `json:"ImageSliceCount"`
	Frames          []Frame `json:"Frames"`
}

type VideoResultRequest

type VideoResultRequest struct {
	DataId  string `json:"DataId"`
	AppId   int64  `json:"AppId"`
	Service string `json:"Service"`
}

func (*VideoResultRequest) ToQuery

func (r *VideoResultRequest) ToQuery() url.Values

type VideoResultResponse

type VideoResultResponse struct {
	RequestId string    `json:"RequestId"`
	Code      int       `json:"Code"`
	Message   string    `json:"Message"`
	VideoResp VideoResp `json:"Data"`
}

Jump to

Keyboard shortcuts

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