20 lines
574 B
Go
20 lines
574 B
Go
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"),
|
|
})
|
|
}
|