template

package
v1.8.107 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Zlib Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type 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"`
}

Base 模板消息

func (*Base) GetAppId

func (b *Base) GetAppId() string

func (*Base) GetToUser

func (b *Base) GetToUser() string

Template interface

func (*Base) IsMini

func (b *Base) IsMini() bool

Template interface

func (*Base) SetAppId

func (b *Base) SetAppId(appid string)

Template interface

func (*Base) SetFormId

func (b *Base) SetFormId(formid string)

Template interface

func (*Base) SetId

func (b *Base) SetId(id string)

Template interface

func (*Base) SetToUser

func (b *Base) SetToUser(user string)

Template interface

func (*Base) SetUrl

func (b *Base) SetUrl(url string)

Template interface

type Data

type Data struct {
	First  KeyWord `json:"first"`
	Remark KeyWord `json:"remark"`
}

type KeyWord

type KeyWord struct {
	Value string `json:"value"`
	Color string `json:"color,omitempty"`
}

type Program

type Program struct {
	Appid string `json:"appid"`
	Page  string `json:"pagepath,omitempty"`
}

Program 小程序卡片

type Template

type Template interface {
	IsMini() bool
	SetAppId(appId string)
	GetAppId() string
	SetFormId(formId string)
	SetToUser(user string)
	GetToUser() string
	SetId(id string)
	SetUrl(url string)
	SetKeyWord(key string, word KeyWord)
	Clone() Template
}

Jump to

Keyboard shortcuts

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