Documentation ¶
Index ¶
- type AudioScanner
- func (vs *AudioScanner) Async(videos []*ContentScanData) (results []*ContentScanResult, err error)
- func (vs *AudioScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
- func (vs *AudioScanner) BindClient(c *green.Client, bizType string)
- func (vs *AudioScanner) Sync(images []*ContentScanData) (results []*ContentScanResult, err error)
- type AuditStatus
- type ContentScanData
- type ContentScanDataType
- type ContentScanResult
- type GreenClient
- func (g *GreenClient) Async(s Scanner, data []*ContentScanData) (results []*ContentScanResult, err error)
- func (g *GreenClient) AsyncResults(s Scanner, data []*ContentScanResult) (results []*ContentScanResult, err error)
- func (g *GreenClient) CanScan(url string) bool
- func (g *GreenClient) CommonScan(data []*ContentScanData) (results []*ContentScanResult, err error)
- func (g *GreenClient) CommonScanIsPass(data []*ContentScanData) (isPass bool, err error)
- func (g *GreenClient) CommonScanResults(data []*ContentScanData) (results []*ContentScanResult, err error)
- func (g *GreenClient) CommonScanResultsAggregation(results []*ContentScanResult) (newResults map[string]*ContentScanResult, err error)
- func (g *GreenClient) GetBizType() string
- func (g *GreenClient) Sync(s Scanner, data []*ContentScanData) (results []*ContentScanResult, err error)
- func (g *GreenClient) SyncScan(data []*ContentScanData) (results []*ContentScanResult, err error)
- func (g *GreenClient) SyncScanIsPass(data []*ContentScanData) (isPass bool, err error)
- type ImageScanner
- func (ims *ImageScanner) Async(images []*ContentScanData) (results []*ContentScanResult, err error)
- func (ims *ImageScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
- func (ims *ImageScanner) BindClient(c *green.Client, bizType string)
- func (ims *ImageScanner) Sync(images []*ContentScanData) (results []*ContentScanResult, err error)
- type Scanner
- type TextScanner
- func (vs *TextScanner) Async(videos []*ContentScanData) (results []*ContentScanResult, err error)
- func (vs *TextScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
- func (ts *TextScanner) BindClient(c *green.Client, bizType string)
- func (ts *TextScanner) Sync(texts []*ContentScanData) (results []*ContentScanResult, err error)
- type VideoScanner
- func (vs *VideoScanner) Async(videos []*ContentScanData) (results []*ContentScanResult, err error)
- func (vs *VideoScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
- func (vs *VideoScanner) BindClient(c *green.Client, bizType string)
- func (vs *VideoScanner) Sync(images []*ContentScanData) (results []*ContentScanResult, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioScanner ¶
type AudioScanner struct {
// contains filtered or unexported fields
}
func (*AudioScanner) Async ¶
func (vs *AudioScanner) Async(videos []*ContentScanData) (results []*ContentScanResult, err error)
func (*AudioScanner) AsyncResults ¶
func (vs *AudioScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
func (*AudioScanner) BindClient ¶
func (vs *AudioScanner) BindClient(c *green.Client, bizType string)
func (*AudioScanner) Sync ¶
func (vs *AudioScanner) Sync(images []*ContentScanData) (results []*ContentScanResult, err error)
type AuditStatus ¶
type AuditStatus string
const ( AuditStatusDoing AuditStatus = "doing" AuditStatusPass AuditStatus = "pass" AuditStatusFail AuditStatus = "fail" )
type ContentScanData ¶
type ContentScanDataType ¶
type ContentScanDataType []*ContentScanData
type ContentScanResult ¶
type ContentScanResult struct { DataId string TaskId string AuditStatus AuditStatus // doing审核中 pass审核通过 fail审核未通过 }
type GreenClient ¶
type GreenClient struct {
// contains filtered or unexported fields
}
func NewBizTypeGreenClient ¶
func NewBizTypeGreenClient(regionId, accessKeyId, accessKeySecret, bizType string) *GreenClient
func NewGreenClient ¶
func NewGreenClient(regionId, accessKeyId, accessKeySecret string) *GreenClient
func (*GreenClient) Async ¶
func (g *GreenClient) Async(s Scanner, data []*ContentScanData) (results []*ContentScanResult, err error)
func (*GreenClient) AsyncResults ¶
func (g *GreenClient) AsyncResults(s Scanner, data []*ContentScanResult) (results []*ContentScanResult, err error)
func (*GreenClient) CommonScan ¶
func (g *GreenClient) CommonScan(data []*ContentScanData) (results []*ContentScanResult, err error)
func (*GreenClient) CommonScanIsPass ¶
func (g *GreenClient) CommonScanIsPass(data []*ContentScanData) (isPass bool, err error)
有一个失败就返回失败
func (*GreenClient) CommonScanResults ¶
func (g *GreenClient) CommonScanResults(data []*ContentScanData) (results []*ContentScanResult, err error)
func (*GreenClient) CommonScanResultsAggregation ¶
func (g *GreenClient) CommonScanResultsAggregation(results []*ContentScanResult) (newResults map[string]*ContentScanResult, err error)
聚合dataId 相同的dataId有一个失败则认为失败
func (*GreenClient) GetBizType ¶
func (g *GreenClient) GetBizType() string
func (*GreenClient) Sync ¶
func (g *GreenClient) Sync(s Scanner, data []*ContentScanData) (results []*ContentScanResult, err error)
func (*GreenClient) SyncScan ¶
func (g *GreenClient) SyncScan(data []*ContentScanData) (results []*ContentScanResult, err error)
同步scan 仅支持图片文本
func (*GreenClient) SyncScanIsPass ¶
func (g *GreenClient) SyncScanIsPass(data []*ContentScanData) (isPass bool, err error)
同步scan 仅支持图片文本 有一个失败就返回失败
type ImageScanner ¶
type ImageScanner struct {
// contains filtered or unexported fields
}
func (*ImageScanner) Async ¶
func (ims *ImageScanner) Async(images []*ContentScanData) (results []*ContentScanResult, err error)
func (*ImageScanner) AsyncResults ¶
func (ims *ImageScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
func (*ImageScanner) BindClient ¶
func (ims *ImageScanner) BindClient(c *green.Client, bizType string)
func (*ImageScanner) Sync ¶
func (ims *ImageScanner) Sync(images []*ContentScanData) (results []*ContentScanResult, err error)
type Scanner ¶
type Scanner interface { //bind client bizType业务场景,默认default BindClient(c *green.Client, bizType string) Sync(images []*ContentScanData) (results []*ContentScanResult, err error) Async(videos []*ContentScanData) (results []*ContentScanResult, err error) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error) }
type TextScanner ¶
type TextScanner struct {
// contains filtered or unexported fields
}
func (*TextScanner) Async ¶
func (vs *TextScanner) Async(videos []*ContentScanData) (results []*ContentScanResult, err error)
func (*TextScanner) AsyncResults ¶
func (vs *TextScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
func (*TextScanner) BindClient ¶
func (ts *TextScanner) BindClient(c *green.Client, bizType string)
func (*TextScanner) Sync ¶
func (ts *TextScanner) Sync(texts []*ContentScanData) (results []*ContentScanResult, err error)
type VideoScanner ¶
type VideoScanner struct {
// contains filtered or unexported fields
}
func (*VideoScanner) Async ¶
func (vs *VideoScanner) Async(videos []*ContentScanData) (results []*ContentScanResult, err error)
func (*VideoScanner) AsyncResults ¶
func (vs *VideoScanner) AsyncResults(scans []*ContentScanResult) (results []*ContentScanResult, err error)
func (*VideoScanner) BindClient ¶
func (vs *VideoScanner) BindClient(c *green.Client, bizType string)
func (*VideoScanner) Sync ¶
func (vs *VideoScanner) Sync(images []*ContentScanData) (results []*ContentScanResult, err error)
Click to show internal directories.
Click to hide internal directories.