template

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2022 License: Zlib Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendBuff

func SendBuff(mini bool, api *api.Api, buf []byte) error

Types

type Base

type Base struct {
	AppId           string `json:"-"`
	ToUser          string `json:"touser"`
	Id              string `json:"template_id"`
	Page            string `json:"page"`                       //点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。
	FormId          string `json:"form_id"`                    //表单提交场景下,为 submit 事件带上的 formId;支付场景下,为本次支付的 prepay_id
	EmphasisKeyword string `json:"emphasis_keyword,omitempty"` //模板需要放大的关键词,不填则默认无放大
}

模板消息

func (*Base) GetAppId

func (b *Base) GetAppId() string

func (*Base) GetToUser

func (b *Base) GetToUser() string

template.Template interface

func (*Base) IsMini

func (b *Base) IsMini() bool

template.Template interface

func (*Base) SetAppId

func (b *Base) SetAppId(appid string)

template.Template interface

func (*Base) SetFormId

func (b *Base) SetFormId(formid string)

func (*Base) SetId

func (b *Base) SetId(id string)

template.Template interface

func (*Base) SetToUser

func (b *Base) SetToUser(user string)

template.Template interface

func (*Base) SetUrl

func (b *Base) SetUrl(url string)

template.Template interface

type Subscribe

type Subscribe struct {
	AppId  string `json:"-"`
	ToUser string `json:"touser"`
	Id     string `json:"template_id"`
	Page   string `json:"page"`
}

订阅消息

func (*Subscribe) GetAppId

func (b *Subscribe) GetAppId() string

func (*Subscribe) GetToUser

func (b *Subscribe) GetToUser() string

template.Template interface

func (*Subscribe) IsMini

func (b *Subscribe) IsMini() bool

template.Template interface

func (*Subscribe) SetAppId

func (b *Subscribe) SetAppId(appid string)

template.Template interface

func (*Subscribe) SetFormId

func (b *Subscribe) SetFormId(formid string)

func (*Subscribe) SetId

func (b *Subscribe) SetId(id string)

template.Template interface

func (*Subscribe) SetToUser

func (b *Subscribe) SetToUser(user string)

template.Template interface

func (*Subscribe) SetUrl

func (b *Subscribe) SetUrl(url string)

template.Template interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL