Documentation
¶
Index ¶
- type DataValue
- type Industry
- type IndustryItem
- type Message
- type MiniProgram
- type Template
- type TemplateList
- type TemplateMessage
- func (tm *TemplateMessage) AddTemplate(templateIdShort string) (string, error)
- func (tm *TemplateMessage) DeletePrivateTemplate(templateId string) error
- func (tm *TemplateMessage) GetIndustry() (*Industry, error)
- func (tm *TemplateMessage) GetPrivateTemplates() (*TemplateList, error)
- func (tm *TemplateMessage) Send(message Message) (int, error)
- func (tm *TemplateMessage) SetIndustry(industryOne, industryTwo string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataValue ¶
type DataValue struct {
Value string `json:"value,omitempty"`
Color string `json:"color,omitempty"`
}
DataValue 消息数据值
type Industry ¶
type Industry struct {
PrimaryIndustry IndustryItem `json:"primary_industry"`
SecondaryIndustry IndustryItem `json:"secondary_industry"`
}
Industry 所属行业
type IndustryItem ¶
type Message ¶
type Message struct {
ToUser string `json:"touser"`
TemplateId string `json:"template_id"`
TopColor string `json:"topcolor"`
Url string `json:"url"`
MiniProgram *MiniProgram `json:"miniprogram,omitempty"`
Data map[string]*DataValue `json:"data,omitempty"`
}
Message 消息体
type MiniProgram ¶
type MiniProgram struct {
AppID string `json:"appid,omitempty"`
PagePath string `json:"pagepath,omitempty"`
}
MiniProgram 跳转小程序
type Template ¶
type Template struct {
TemplateId string `json:"template_id"`
Title string `json:"title"`
PrimaryIndustry string `json:"primary_industry"`
DeputyIndustry string `json:"deputy_industry"`
Content string `json:"content"`
Example string `json:"example"`
}
Template 模板信息
type TemplateList ¶
type TemplateList struct {
TemplateList []Template `json:"template_list"`
}
type TemplateMessage ¶
type TemplateMessage struct {
// contains filtered or unexported fields
}
TemplateMessage 模板消息
func NewTemplateMessage ¶
func NewTemplateMessage(account contracts.AccountInterface) *TemplateMessage
func (*TemplateMessage) AddTemplate ¶
func (tm *TemplateMessage) AddTemplate(templateIdShort string) (string, error)
AddTemplate 添加模板
func (*TemplateMessage) DeletePrivateTemplate ¶
func (tm *TemplateMessage) DeletePrivateTemplate(templateId string) error
DeletePrivateTemplate 删除模板
func (*TemplateMessage) GetIndustry ¶
func (tm *TemplateMessage) GetIndustry() (*Industry, error)
GetIndustry 获取设置的行业信息
func (*TemplateMessage) GetPrivateTemplates ¶
func (tm *TemplateMessage) GetPrivateTemplates() (*TemplateList, error)
GetPrivateTemplates 获取所有模板列表
func (*TemplateMessage) Send ¶
func (tm *TemplateMessage) Send(message Message) (int, error)
Send 模板消息发送
func (*TemplateMessage) SetIndustry ¶
func (tm *TemplateMessage) SetIndustry(industryOne, industryTwo string) error
SetIndustry 设置所属行业
Click to show internal directories.
Click to hide internal directories.