Documentation
¶
Index ¶
- type Category
- type DataValue
- type Keyword
- type KeywordEnumValue
- type Message
- type PrivateTemplate
- type PublicTemplate
- type Subscribe
- func (m *Subscribe) AddTemplate(tid string, kidList []int, sceneDesc string) (string, error)
- func (m *Subscribe) DeleteTemplate(privateTemplateId string) error
- func (m *Subscribe) GetCategory() ([]Category, error)
- func (m *Subscribe) GetKeywords(tid string) ([]Keyword, error)
- func (m *Subscribe) GetPublicTemplates(ids string, start, limit int) ([]PublicTemplate, error)
- func (m *Subscribe) GetTemplateList() ([]PrivateTemplate, error)
- func (m *Subscribe) 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.2
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.2
type Message ¶
type Message struct {
ToUser string `json:"touser"`
TemplateId string `json:"template_id"`
Page string `json:"page"`
Data map[string]*DataValue `json:"data,omitempty"`
MiniProgramState string `json:"miniprogram_state"`
Lang string `json:"lang"`
}
Message 消息体
type PrivateTemplate ¶ added in v0.1.2
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.2
type PublicTemplate struct {
Tid string `json:"tid"`
Title string `json:"title"`
Type int `json:"type"`
CategoryId string `json:"categoryId"`
}
PublicTemplate 公共模板
type Subscribe ¶ added in v0.1.2
type Subscribe struct {
// contains filtered or unexported fields
}
Subscribe 小程序订阅消息
func NewSubscribe ¶ added in v0.1.2
func NewSubscribe(account contracts.AccountInterface) *Subscribe
func (*Subscribe) AddTemplate ¶ added in v0.1.2
AddTemplate 添加订阅消息模板
func (*Subscribe) DeleteTemplate ¶ added in v0.1.2
DeleteTemplate 删除订阅消息模板
func (*Subscribe) GetCategory ¶ added in v0.1.2
GetCategory 获取类目
func (*Subscribe) GetKeywords ¶ added in v0.1.2
GetKeywords 获取关键词列表
func (*Subscribe) GetPublicTemplates ¶ added in v0.1.2
func (m *Subscribe) GetPublicTemplates(ids string, start, limit int) ([]PublicTemplate, error)
GetPublicTemplates 获取所属类目下的公共模板
func (*Subscribe) GetTemplateList ¶ added in v0.1.2
func (m *Subscribe) GetTemplateList() ([]PrivateTemplate, error)
GetTemplateList 获取个人模板列表
Click to show internal directories.
Click to hide internal directories.