You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tool/services/wecom/message/base.go

42 lines
1.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package message
type BaseReq struct {
// 指定接收消息的成员成员ID列表多个接收者用|分隔最多支持1000个。特殊情况指定为@all 则向关注该企业应用的全部成员发送
Touser string `json:"touser"`
// 指定接收消息的部门,多个接收者用‘|分隔最多支持100个。当touser为@all时忽略本参数
Toparty string `json:"toparty"`
// 指定接收消息的标签,多个接收者用‘|分隔最多支持100个。当touser为@all时忽略本参数
Totag string `json:"totag"`
// 消息类型
Msgtype string `json:"msgtype"`
// 企业应用的id整型。
Agentid int `json:"agentid"`
// 表示是否开启重复消息检查0表示否1表示是默认0
EnableDuplicateCheck int `json:"enable_duplicate_check"`
// 表示是否重复消息检查的时间间隔默认1800s最大不超过4小时
DuplicateCheckInterval int `json:"duplicate_check_interval"`
}
type Resp struct {
Errcode int `json:"errcode"` // 返回码
Errmsg string `json:"errmsg"` // 对返回码的文本描述内容
Invaliduser string `json:"invaliduser"` // 不合法的userid不区分大小写统一转为小写
Invalidparty string `json:"invalidparty"` // 不合法的partyid
Invalidtag string `json:"invalidtag"` // 不合法的标签id
Unlicenseduser string `json:"unlicenseduser"` // 没有基础接口许可(包含已过期)的userid
Msgid string `json:"msgid"` // 消息id用于撤回应用消息
// 仅消息类型为“按钮交互型”“投票选择型”和“多项选择型”的模板卡片消息返回应用可使用response_code调用更新模版卡片消息接口72小时内有效且只能使用一次
ResponseCode string `json:"response_code"`
}
type Req interface {
name() string
}