Documentation ¶
Index ¶
- Constants
- func GetAliyunAuditClient() *green.Client
- func GetHuaweiAuditClient() *moderation.ModerationClient
- func GetTencentAuditClient() *cos.Client
- type AdapterModeration
- type AliyunAuditClient
- func (rc *AliyunAuditClient) AuditImage(url string, fileSize int, result *int, label *string, score *int, ...) error
- func (rc *AliyunAuditClient) AuditResult(body *[]byte, result *int, label *string, score *int, detail *string, ...) error
- func (rc *AliyunAuditClient) AuditText(content string, result *int, label *string, score *int, detail *string, ...) error
- func (rc *AliyunAuditClient) AuditVideo(url string, frame int32, jobId *string) error
- func (m *AliyunAuditClient) Check() bool
- func (m *AliyunAuditClient) Close()
- func (m *AliyunAuditClient) GetClient() interface{}
- func (m *AliyunAuditClient) String() string
- type HuaweiAuditClient
- func (rc *HuaweiAuditClient) AuditImage(url string, fileSize int, result *int, label *string, score *int, ...) error
- func (rc *HuaweiAuditClient) AuditResult(body *[]byte, result *int, label *string, score *int, detail *string, ...) error
- func (rc *HuaweiAuditClient) AuditText(content string, result *int, label *string, score *int, detail *string, ...) error
- func (rc *HuaweiAuditClient) AuditVideo(url string, frame int32, jobId *string) error
- func (rc *HuaweiAuditClient) Check() bool
- func (rc *HuaweiAuditClient) Close()
- func (rc *HuaweiAuditClient) GetClient() interface{}
- func (rc *HuaweiAuditClient) String() string
- type TencentAuditClient
- func (rc *TencentAuditClient) AuditImage(url string, fileSize int, result *int, label *string, score *int, ...) error
- func (rc *TencentAuditClient) AuditResult(body *[]byte, result *int, label *string, score *int, detail *string, ...) error
- func (rc *TencentAuditClient) AuditText(content string, result *int, label *string, score *int, detail *string, ...) error
- func (rc *TencentAuditClient) AuditVideo(url string, frame int32, jobId *string) error
- func (rc *TencentAuditClient) Check() bool
- func (rc *TencentAuditClient) Close()
- func (rc *TencentAuditClient) GetClient() interface{}
- func (rc *TencentAuditClient) String() string
Constants ¶
View Source
const (
PrefixKey = "__host"
)
Variables ¶
This section is empty.
Functions ¶
func GetAliyunAuditClient ¶
func GetHuaweiAuditClient ¶
func GetHuaweiAuditClient() *moderation.ModerationClient
func GetTencentAuditClient ¶ added in v1.4.12
func GetTencentAuditClient() *cos.Client
Types ¶
type AdapterModeration ¶
type AdapterModeration interface { String() string AuditText(content string, result *int, label *string, score *int, detail *string, jobId *string) error AuditImage(url string, fileSize int, result *int, label *string, score *int, detail *string, jobId *string) error AuditVideo(url string, frame int32, jobId *string) error AuditResult(body *[]byte, result *int, label *string, score *int, detail *string, jobId *string) error GetClient() interface{} }
type AliyunAuditClient ¶
type AliyunAuditClient struct {
// contains filtered or unexported fields
}
func NewAliyunAudit ¶
func NewAliyunAudit(client *green.Client, accessId, accessSecret, region, callbackUrl string) *AliyunAuditClient
func (*AliyunAuditClient) AuditImage ¶
func (*AliyunAuditClient) AuditResult ¶ added in v1.4.12
func (*AliyunAuditClient) AuditVideo ¶
func (rc *AliyunAuditClient) AuditVideo(url string, frame int32, jobId *string) error
func (*AliyunAuditClient) Check ¶
func (m *AliyunAuditClient) Check() bool
func (*AliyunAuditClient) Close ¶
func (m *AliyunAuditClient) Close()
func (*AliyunAuditClient) GetClient ¶
func (m *AliyunAuditClient) GetClient() interface{}
GetClient 暴露原生client
func (*AliyunAuditClient) String ¶
func (m *AliyunAuditClient) String() string
type HuaweiAuditClient ¶
type HuaweiAuditClient struct {
// contains filtered or unexported fields
}
func NewHuaweiAudit ¶
func NewHuaweiAudit(client *moderation.ModerationClient, accessKey, secretKey, _region, callbackUrl string) *HuaweiAuditClient
func (*HuaweiAuditClient) AuditImage ¶
func (*HuaweiAuditClient) AuditResult ¶ added in v1.4.12
func (*HuaweiAuditClient) AuditVideo ¶
func (rc *HuaweiAuditClient) AuditVideo(url string, frame int32, jobId *string) error
func (*HuaweiAuditClient) Check ¶
func (rc *HuaweiAuditClient) Check() bool
func (*HuaweiAuditClient) Close ¶
func (rc *HuaweiAuditClient) Close()
func (*HuaweiAuditClient) GetClient ¶
func (rc *HuaweiAuditClient) GetClient() interface{}
GetClient 暴露原生client
func (*HuaweiAuditClient) String ¶
func (rc *HuaweiAuditClient) String() string
type TencentAuditClient ¶
type TencentAuditClient struct {
// contains filtered or unexported fields
}
func NewTencentAudit ¶
func NewTencentAudit(client *cos.Client, accessKey, secretKey, cosUrl, ciUrl, callbackUrl string) *TencentAuditClient
func (*TencentAuditClient) AuditImage ¶
func (*TencentAuditClient) AuditResult ¶ added in v1.4.12
func (*TencentAuditClient) AuditVideo ¶
func (rc *TencentAuditClient) AuditVideo(url string, frame int32, jobId *string) error
func (*TencentAuditClient) Check ¶
func (rc *TencentAuditClient) Check() bool
func (*TencentAuditClient) Close ¶
func (rc *TencentAuditClient) Close()
func (*TencentAuditClient) GetClient ¶
func (rc *TencentAuditClient) GetClient() interface{}
GetClient 暴露原生client
func (*TencentAuditClient) String ¶
func (rc *TencentAuditClient) String() string
Click to show internal directories.
Click to hide internal directories.