template

package
v0.0.0-...-71395a5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: GPL-3.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

View Source
const (
	//define category constant for reference
	//CategoryBar Category = "bar"
	BlankCategory = Category("blank")
)
View Source
const (
	//define template name constant for reference
	//NameFoo Name = "foo"
	BlankName = Name("blank")
)

Variables

View Source
var ActionCenter = make(map[string]middleware.Action)

Functions

func RegisterAction

func RegisterAction(actionName string, action middleware.Action)

Types

type Category

type Category string

短信类别名称, 它决定了短信ID前缀以及短信投递渠道(营销渠道/产品渠道), 需要和CRM中定义的相同, 建议在CRM中添加新类别后对应添加新的常量定义

type Channel

type Channel int

短信通道

const (
	UnknownChannel Channel = iota
	MarketingChannel
	ProductionChannel
	InternalChannel
)

func WhichChannel

func WhichChannel(str string) Channel

func (Channel) String

func (ch Channel) String() string

type Name

type Name string

短信模版名称, 需要和CRM中定义的相同, 建议在CRM中添加新模版后对应添加新的常量定义

type SMSCategory

type SMSCategory struct {
	Name        Category `bson:"category" json:"category"`
	Channel     Channel  `bson:"channel" json:"channel"`
	Timestamp   int64    `bson:"timestamp" json:"timestamp"`
	Description string   `bson:"description" json:"description"`
	Callback    c.Name   `bson:"callback" json:"callback"`
}

type SMSTemplate

type SMSTemplate struct {
	Name             Name                      `bson:"name" json:"name"`
	Category         Category                  `bson:"category" json:"category"`
	Content          string                    `bson:"content" json:"content"`
	Timestamp        int64                     `bson:"timestamp" json:"timestamp"`
	Enabled          bool                      `bson:"enabled" json:"enabled"`
	Description      string                    `bson:"description" json:"description"`
	Callback         c.Name                    `bson:"callback" json:"callback"`
	ActionStructList []middleware.ActionStruct `bson:"actions" json:"actions"`
	ActionList       []middleware.Action       `bson:"-" json:"-"`
}

Jump to

Keyboard shortcuts

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