Documentation ¶
Index ¶
- Variables
- type Config
- type Delivery
- func (d *Delivery) CheckInvalidContent(c notification.Content) ([]string, error)
- func (d *Delivery) ContentFields() []*notificationdelivery.Field
- func (d *Delivery) Deliver(c notification.Content) (notificationdelivery.DeliveryStatus, string, error)
- func (d *Delivery) DeliveryType() string
- func (d *Delivery) MustEscape(unescaped string) string
- func (d *Delivery) Unescape(escaped string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ContentNameExtendCode = "extendcode"
View Source
var ContentNamePhoneNumber = "phonenumber"
View Source
var ContentNameSenderID = "senderid"
View Source
var ContentNameSessionContext = "sessioncontext"
View Source
var ContentNameSign = "sign"
View Source
var ContentNameTemplateID = "templateid"
View Source
var ContentNameTemplateParam = "templateparam"
View Source
var DeliveryType = "tencentcloudsms"
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{ Sms: c.Sms, } return d, nil }
View Source
var Fields = []*notificationdelivery.Field{ { Name: ContentNameTemplateID, Example: "TEMPLATEID", Escape: "", }, { Name: ContentNameSign, Example: "COMPANYSIGN", Escape: "", }, { Name: ContentNamePhoneNumber, Example: "+8613500000000,+8613500000000", Escape: "commaescape", }, { Name: ContentNameTemplateParam, Example: `12345,23456`, Escape: "commaescape", }, { Name: ContentNameSessionContext, Example: ``, Escape: "", }, { Name: ContentNameExtendCode, Example: ``, Escape: "", }, { Name: ContentNameSenderID, Example: ``, Escape: "", }, }
View Source
var RequeiredContent = []string{ContentNameTemplateID, ContentNamePhoneNumber}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
tencentcloudsms.Sms
}
type Delivery ¶
type Delivery struct {
Sms tencentcloudsms.Sms
}
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) Deliver ¶
func (d *Delivery) Deliver(c notification.Content) (notificationdelivery.DeliveryStatus, string, error)
func (*Delivery) DeliveryType ¶
func (*Delivery) MustEscape ¶
Click to show internal directories.
Click to hide internal directories.