1 Star 0 Fork 0

h79 / gothird

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
base.go 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
huqiuyun 提交于 2022-08-21 22:44 . init
package template
type KeyWord struct {
Value string `json:"value"`
Color string `json:"color,omitempty"`
}
// Base
// 模板消息
type Base struct {
AppId string `json:"-"`
ToUser string `json:"touser"`
Id string `json:"template_id"`
Url string `json:"url,omitempty"`
Mini *Program `json:"miniprogram,omitempty"`
}
// Template interface
func (b *Base) IsMini() bool {
return false
}
// Template interface
func (b *Base) SetAppId(appid string) {
b.AppId = appid
}
func (b *Base) GetAppId() string {
return b.AppId
}
// Template interface
func (b *Base) SetFormId(formid string) {
}
// Template interface
func (b *Base) SetToUser(user string) {
b.ToUser = user
}
// Template interface
func (b *Base) GetToUser() string {
return b.ToUser
}
// Template interface
func (b *Base) SetId(id string) {
b.Id = id
}
// Template interface
func (b *Base) SetUrl(url string) {
b.Url = url
}
// Program
// 小程序卡片
type Program struct {
Appid string `json:"appid"`
Page string `json:"pagepath,omitempty"`
}
type Data struct {
First KeyWord `json:"first"`
Remark KeyWord `json:"remark"`
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/h79/gothird.git
git@gitee.com:h79/gothird.git
h79
gothird
gothird
v1.8.78

搜索帮助

344bd9b3 5694891 D2dac590 5694891