template

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package template 模板消息管理

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(srv token.Server, to, id, url string, data Data) error

Send 发送模板信息

Types

type Data

type Data map[string]KV

Data 表示发送模板时的数据内容

type KV

type KV struct {
	Value string `json:"value"`
	Color string `json:"color"`
}

type List

type List struct {
	common.Result
	List []*Template `json:"template_list"`
}

List 模板列表

func Templates

func Templates(srv token.Server) (*List, error)

Templates 获取模板列表

type Result

type Result struct {
	common.Result
	MsgID int64 `json:"msgid"`
}

Result 表示消息推送之后的数据

type Template

type Template struct {
	ID              string `json:"template_id"`
	Title           string `json:"title"`
	PrimaryIndustry string `json:"primary_industry"`
	DeputyIndustry  string `json:"deputy_industry"`
	Content         string `json:"content"`
	Example         string `json:"example"`
}

Template 模板

Jump to

Keyboard shortcuts

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