Documentation
¶
Index ¶
- type Category
- type DataValue
- type Keyword
- type KeywordEnumValue
- type Message
- type PrivateTemplate
- type PublicTemplate
- type TemplateMessage
- func (m *TemplateMessage) AddTemplate(tid string, kidList []int, sceneDesc string) (string, error)
- func (m *TemplateMessage) DeleteTemplate(privateTemplateId string) error
- func (m *TemplateMessage) GetCategory() ([]Category, error)
- func (m *TemplateMessage) GetKeywords(tid string) ([]Keyword, error)
- func (m *TemplateMessage) GetPublicTemplates(ids string, start, limit int) ([]PublicTemplate, error)
- func (m *TemplateMessage) GetTemplateList() ([]PrivateTemplate, error)
- func (m *TemplateMessage) Send(message Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keyword ¶ added in v0.1.0
type Keyword struct {
Tid string `json:"tid"`
Name string `json:"name"`
Example string `json:"example"`
Rule string `json:"rule"`
}
Keyword 模板关键词
type KeywordEnumValue ¶ added in v0.1.0
type Message ¶ added in v0.1.0
type Message struct {
ToUser string `json:"touser"`
TemplateId string `json:"template_id"`
Path string `json:"path"`
Data map[string]*DataValue `json:"data,omitempty"`
MiniProgramState string `json:"miniprogram_state"`
Lang string `json:"lang"`
}
Message 消息体
type PrivateTemplate ¶ added in v0.1.0
type PrivateTemplate struct {
PrivateTemplateID string `json:"priTmplId"`
Title string `json:"title"`
Content string `json:"content"`
Example string `json:"example"`
Type int `json:"type"`
KeywordEnumValueList []KeywordEnumValue `json:"keywordEnumValueList"`
}
PrivateTemplate 个人模板
type PublicTemplate ¶ added in v0.1.0
type PublicTemplate struct {
Tid string `json:"tid"`
Title string `json:"title"`
Type int `json:"type"`
CategoryId string `json:"categoryId"`
}
PublicTemplate 公共模板
type TemplateMessage ¶
type TemplateMessage struct {
// contains filtered or unexported fields
}
TemplateMessage 小程序模板消息
func New ¶
func New(account contracts.AccountInterface) *TemplateMessage
func (*TemplateMessage) AddTemplate ¶ added in v0.1.0
AddTemplate 添加订阅消息模板
func (*TemplateMessage) DeleteTemplate ¶ added in v0.1.0
func (m *TemplateMessage) DeleteTemplate(privateTemplateId string) error
DeleteTemplate 删除订阅消息模板
func (*TemplateMessage) GetCategory ¶ added in v0.1.0
func (m *TemplateMessage) GetCategory() ([]Category, error)
GetCategory 获取类目
func (*TemplateMessage) GetKeywords ¶ added in v0.1.0
func (m *TemplateMessage) GetKeywords(tid string) ([]Keyword, error)
GetKeywords 获取关键词列表
func (*TemplateMessage) GetPublicTemplates ¶ added in v0.1.0
func (m *TemplateMessage) GetPublicTemplates(ids string, start, limit int) ([]PublicTemplate, error)
GetPublicTemplates 获取所属类目下的公共模板
func (*TemplateMessage) GetTemplateList ¶ added in v0.1.0
func (m *TemplateMessage) GetTemplateList() ([]PrivateTemplate, error)
GetTemplateList 获取个人模板列表
Click to show internal directories.
Click to hide internal directories.