tencentminiprogramumdelivery

package
v0.0.0-...-c7c8722 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContentNameAppID = "appid"
View Source
var ContentNameData = "data"
View Source
var ContentNameMiniprogram = "miniprogram"
View Source
var ContentNamePagePath = "pagepath"
View Source
var ContentNameTemplateID = "template_id"
View Source
var ContentNameToUser = "touser"
View Source
var ContentNameURL = "url"
View Source
var ContentNameWeappData = "weapp_data"
View Source
var ContentNameWeappEmphasisKeyword = "weapp_emphasis_keyword"
View Source
var ContentNameWeappFormID = "weapp_form_id"
View Source
var ContentNameWeappPage = "weapp_page"
View Source
var ContentNameWeappTemplateID = "weapp_template_id"
View Source
var DeliveryType = "tencentminiprogramum"
View Source
var Factory = func(loader func(interface{}) error) (notificationdelivery.DeliveryDriver, error) {
	c := &Config{}
	err := loader(c)
	if err != nil {
		return nil, err
	}
	d := &Delivery{
		App: c.App,
	}
	return d, nil
}
View Source
var Fields = []*notificationdelivery.Field{
	{
		Name:    ContentNameToUser,
		Example: "OPENID",
		Escape:  "",
	},
	{
		Name:    ContentNameAppID,
		Example: "APPID",
		Escape:  "",
	},
	{
		Name:    ContentNameTemplateID,
		Example: "TEMPLATE_ID",
		Escape:  "",
	},
	{
		Name:    ContentNameURL,
		Example: `https://URL`,
		Escape:  "",
	},
	{
		Name:    ContentNameData,
		Example: `{"keyword1":{"value":"339208499","color":"#173177"}}`,
		Escape:  "jsonecape",
	},
	{
		Name:    ContentNameMiniprogram,
		Example: `APPID`,
		Escape:  "",
	},
	{
		Name:    ContentNamePagePath,
		Example: `PAGEPATH`,
		Escape:  "",
	},
	{
		Name:    ContentNameWeappTemplateID,
		Example: `TEMPLATE_ID`,
		Escape:  "",
	},
	{
		Name:    ContentNameWeappPage,
		Example: `PAGE`,
		Escape:  "",
	},
	{
		Name:    ContentNameWeappFormID,
		Example: `FORMID`,
		Escape:  "",
	},
	{
		Name:    ContentNameWeappData,
		Example: `{"keyword1":{"value":"339208499"}}`,
		Escape:  "jsonescape",
	},
	{
		Name:    ContentNameWeappEmphasisKeyword,
		Example: ``,
		Escape:  "",
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	*tencentminiprogram.App
}

type Delivery

type Delivery struct {
	App *tencentminiprogram.App
}

func (*Delivery) CheckInvalidContent

func (d *Delivery) CheckInvalidContent(c notification.Content) ([]string, error)

CheckInvalidContent check if given content invalid Return invalid fields and any error raised

func (*Delivery) ContentFields

func (d *Delivery) ContentFields() []*notificationdelivery.Field

ContentFields return content fields Return invalid fields and any error raised

func (*Delivery) DeliveryType

func (d *Delivery) DeliveryType() string

func (*Delivery) MustEscape

func (d *Delivery) MustEscape(unescaped string) string

Jump to

Keyboard shortcuts

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