feat: aliyun sms
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"lone-services/pkg/sms"
|
||||
"lone-services/pkg/utils"
|
||||
)
|
||||
|
||||
func NewSMS() (sms.SMS, error) {
|
||||
|
||||
return sms.New(sms.Config{
|
||||
AccessKeyId: utils.GetConfigString("sms.accessKeyId"),
|
||||
AccessKeySecret: utils.GetConfigString("sms.accessKeySecret"),
|
||||
SignName: utils.GetConfigString("sms.signName"),
|
||||
Endpoint: utils.GetConfigString("sms.endpoint"),
|
||||
TemplateCode: utils.GetConfigString("sms.template.code"),
|
||||
TemplatePwd: utils.GetConfigString("sms.template.password"),
|
||||
Timeout: utils.GetConfigInt("sms.timeout"),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user