go-common/app/tool/saga/model/wechat.go
2019-04-22 18:49:16 +08:00

39 lines
776 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
// AppConfig def
type AppConfig struct {
AppID int // 企业微信SAGA应用的appId
AppSecret string // 企业微信SAGA应用的secret
}
// Notification def
type Notification struct {
ToUser string `json:"touser"`
ToParty string `json:"toparty"`
ToTag string `json:"totag"`
MsgType string `json:"msgtype"`
AgentID int `json:"agentid"`
}
// Text def
type Text struct {
Content string `json:"content"`
}
// TxtNotification 文本消息
type TxtNotification struct {
Notification
Body Text `json:"text"`
Safe int `json:"safe"`
}
// AllowUserInfo 应用可见名单列表
type AllowUserInfo struct {
Users []*UserInfo `json:"user"`
}
// UserInfo only contain userid now
type UserInfo struct {
UserID string `json:"userid"`
}