Versions in this module Expand all Collapse all v0 v0.1.1 Apr 12, 2026 v0.1.0 Apr 12, 2026 Changes in this version + const AliyunHighRiskLabelContraband + const AliyunHighRiskLabelPorn + const AliyunHighRiskLabelTerrorism + const AliyunServiceChatDetection + const KindAliyun + const KindQCloud + const KindQiNiu + const LabelAbuse + const LabelAd + const LabelContraband + const LabelFlood + const LabelMeaningless + const LabelNormal + const LabelPolitics + const LabelPorn + const LabelSpam + const LabelTerrorism + const MsgAbuse + const MsgAd + const MsgContraband + const MsgFlood + const MsgMeaningless + const MsgNormal + const MsgPolitics + const MsgPorn + const MsgSpam + const MsgTerrorism + const MsgUnknownLabel + const QCloudKeywordsFormat + const QCloudScoreDivisor + const QCloudSuggestionBlock + const QCloudSuggestionPass + const QCloudSuggestionReview + const SuggestionBlock + const SuggestionPass + const SuggestionReview + const TextCensorEndpoint + const TextCensorHost + const TextCensorScenes + type AliyunTextCensor struct + AccessKeyID string + AccessKeySecret string + Client *green.Client + Endpoint string + func NewAliyunTextCensor() (*AliyunTextCensor, error) + func (c *AliyunTextCensor) CensorText(text string) (*CensorResult, error) + type CensorResult struct + Details string + Label string + Msg string + Score float64 + Suggestion string + type QCloudTextCensor struct + Client *tms.Client + Region string + SecretID string + SecretKey string + func NewQCloudTextCensor() (*QCloudTextCensor, error) + func (c *QCloudTextCensor) CensorText(text string) (*CensorResult, error) + type QiniuTextCensor struct + AccessKey string + Client *http.Client + Host string + SecretKey string + func NewQiniuTextCensor() (*QiniuTextCensor, error) + func NewQiniuTextCensorWithCredentials(accessKey, secretKey string) *QiniuTextCensor + func (c *QiniuTextCensor) Censor(req TextCensorRequest) (*TextCensorResponse, error) + func (c *QiniuTextCensor) CensorText(text string) (*CensorResult, error) + type ServiceParameters struct + Content string + type TextCensor interface + CensorText func(text string) (*CensorResult, error) + func GetTextCensor(kind string) (TextCensor, error) + type TextCensorData struct + Text string + type TextCensorParams struct + Scenes []string + type TextCensorRequest struct + Data TextCensorData + Params TextCensorParams + type TextCensorResponse struct + Code int + Message string + Result *TextCensorResult + type TextCensorResult struct + Scenes map[string]TextSceneResult + Suggestion string + type TextSceneDetail struct + Description string + Label string + Score float64 + type TextSceneResult struct + Details []TextSceneDetail + Suggestion string