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 ContentNameOutID = "outid"
View Source
var ContentNamePhoneNumbers = "phonenumbers"
View Source
var ContentNameSignName = "signname"
View Source
var ContentNameSmsUpExtendCode = "smsupextendcode"
View Source
var ContentNameTemplateCode = "templatecode"
View Source
var ContentNameTemplateParam = "templateparam"
View Source
var DeliveryType = "aliyunsms"
View Source
var Factory = func(loader func(interface{}) error) (notificationdelivery.DeliveryDriver, error) { c := &Config{ AccessKey: &aliyun.AccessKey{}, } err := loader(c) if err != nil { return nil, err } d := &Delivery{ AccessKey: c.AccessKey, } return d, nil }
View Source
var Fields = []*notificationdelivery.Field{ { Name: ContentNamePhoneNumbers, Example: "13800000000", Escape: "", }, { Name: ContentNameSignName, Example: "COMPANYSIGN", Escape: "", }, { Name: ContentNameTemplateCode, Example: "SMS_153055065", Escape: "", }, { Name: ContentNameTemplateParam, Example: `{"code":"1111"}`, Escape: "jsonescape", }, { Name: ContentNameSmsUpExtendCode, Example: `90999`, Escape: "", }, { Name: ContentNameOutID, Example: `abcdefgh`, Escape: "", }, }
View Source
var RequeiredContent = []string{ContentNamePhoneNumbers, ContentNameTemplateCode}
Functions ¶
This section is empty.
Types ¶
type Delivery ¶
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.