package message import "context" // EventType 事件类型 type EventType string const ( //EventCheckUrl 验证URL EventCheckUrl EventType = "check_url" //EventSubscribe 订阅 EventSubscribe = "subscribe" //EventUnsubscribe 取消订阅 EventUnsubscribe = "unsubscribe" ) // SubsMessage 订阅消息 type SubsMessage struct { Ctx context.Context Encrypt string `json:"encrypt"` } //MixMessage 存放所有钉钉发送过来的消息和事件 type MixMessage struct { EventType EventType `json:"EventType"` // 日程相关 // 审批通知 ProcessInstanceId string `json:"processInstanceId"` CorpId string `json:"corpId"` CreateTime string `json:"createTime"` FinishTime string `json:"finishTime"` Title string `json:"title"` ProcessType string `json:"type"` StaffId string `json:"staffId"` Url string `json:"url"` Result string `json:"result"` ProcessCode string `json:"processCode"` } //Reply 消息回复 type Reply struct { MsgSignature string `json:"msg_signature"` TimeStamp string `json:"timeStamp"` Nonce string `json:"nonce"` Encrypt string `json:"encrypt"` }