sms.go 528 B

123456789101112131415161718192021
  1. package config
  2. import (
  3. "github.com/runningwater/gohub/pkg/config"
  4. )
  5. func init() {
  6. config.Add("sms", func() map[string]any {
  7. return map[string]any{
  8. // 阿里云短信服务配置
  9. "aliyun": map[string]any{
  10. "access_key_id": config.Env("SMS_ALIYUN_ACCESS_ID"),
  11. "access_key_secret": config.Env("SMS_ALIYUN_ACCESS_SECRET"),
  12. "sign_name": config.Env("SMS_ALIYUN_SIGN_NAME", "阿里云短信测试"),
  13. "template_code": config.Env("SMS_ALIYUN_TEMPLATE_CODE", "SMS_154950909"),
  14. },
  15. }
  16. })
  17. }