1 Star 0 Fork 0

h79 / gothird

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rule.go 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
huqiuyun 提交于 2024-02-29 11:39 . 规则定义
package structs
type Rule struct {
RuleId string `json:"rule_id,omitempty"`
RuleName string `json:"rule_name"`
WordList []string `json:"word_list"`
SemanticsList []int32 `json:"semantics_list"` //额外的拦截语义规则,1:手机号、2:邮箱地:、3:红包
InterceptType int32 `json:"intercept_type"` //拦截方式,1:警告并拦截发送;2:仅发警告
ApplicableRange ApplicableRange `json:"applicable_range"` //敏感词适用范围,userid与department不能同时为不填
}
type ApplicableRange struct {
UserList []string `json:"user_list"`
DepartmentList []int32 `json:"department_list"`
}
type RuleInfo struct {
RuleId string `json:"rule_id"`
RuleName string `json:"rule_name"`
CreateTime int64 `json:"create_time"`
}
type RuleChange struct {
RuleId string `json:"rule_id"`
RuleName string `json:"rule_name"`
WordList []string `json:"word_list"` //敏感词列表,敏感词长度1~32个utf8字符,列表大小不能超过300个;若为空忽略该字段
ExtraRule RuleExtra `json:"extra_rule"`
InterceptType int32 `json:"intercept_type"`
AddApplicableRange ApplicableRange `json:"add_applicable_range"`
RemoveApplicableRange ApplicableRange `json:"remove_applicable_range"`
}
type RuleExtra struct {
SemanticsList []int32 `json:"semantics_list"`
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/h79/gothird.git
git@gitee.com:h79/gothird.git
h79
gothird
gothird
v1.8.79

搜索帮助

344bd9b3 5694891 D2dac590 5694891