Versions in this module Expand all Collapse all v1 v1.0.2 Mar 22, 2021 v1.0.1 Jan 13, 2021 v1.0.0 Jan 12, 2021 Changes in this version + const DEFAULT_GROUP_NAME + const DIYI_SMS_SERVICE_URL + func AddConfigNode(group string, node ConfigNode) + func AddDefaultConfigGroup(nodes ConfigGroup) + func AddDefaultConfigNode(node ConfigNode) + func GetDefaultGroup() string + func Register(name string, driver Driver) error + func SetConfig(config Config) + func SetConfigGroup(group string, nodes ConfigGroup) + func SetDefaultGroup(name string) + type Config map[string]ConfigGroup + type ConfigAliyun struct + AccessKeyId string + AccessSecret string + Sign string + type ConfigDiyi struct + Name string + Pass string + Sign string + type ConfigGroup []ConfigNode + func GetConfig(group string) ConfigGroup + type ConfigNode struct + Config *gmap.StrAnyMap + Data *gmap.StrStrMap + Driver string + Path string + Weight int + type Core struct + SMS SMS + func (c *Core) GetDebug() bool + func (c *Core) GetLogger() *glog.Logger + func (c *Core) LoadTemplateFileToData(node *ConfigNode) error + func (c *Core) Send(mobile string, template string, params map[string]string) error + func (c *Core) SetDebug(debug bool) + func (c *Core) SetLogger(logger *glog.Logger) + type Driver interface + New func(core *Core, node *ConfigNode) (SMS, error) + Send func(mobile string, template string, params map[string]string) error + type DriverAliyun struct + Config *ConfigAliyun + func (d *DriverAliyun) New(core *Core, node *ConfigNode) (SMS, error) + func (d *DriverAliyun) Send(mobile string, template string, params map[string]string) error + type DriverDiyi struct + Config *ConfigDiyi + func (d *DriverDiyi) New(core *Core, node *ConfigNode) (SMS, error) + func (d *DriverDiyi) Send(mobile string, template string, params map[string]string) error + type SMS interface + GetLogger func() *glog.Logger + Send func(mobile string, template string, params map[string]string) error + SetLogger func(logger *glog.Logger) + func Instance(name ...string) (sms SMS, err error) + func New(name ...string) (sms SMS, err error)