Skip to content

Commit

Permalink
Merge pull request #3 from Kininaru/master
Browse files Browse the repository at this point in the history
feat: change provider name
  • Loading branch information
hsluoyz authored Aug 13, 2021
2 parents c1cfac3 + 7a48a45 commit 1636c80
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,23 @@

package go_sms_sender

const (
Aliyun = "Aliyun SMS"
TencentCloud = "Tencent Cloud SMS"
VolcEngine = "Volc Engine SMS"
)

type SmsClient interface {
SendMessage(param map[string]string, targetPhoneNumber ...string)
}

func NewSmsClient(provider, accessId, accessKey, sign, region, template string, other ...string) SmsClient {
switch provider {
case "aliyun":
case Aliyun:
return GetAliyunClient(accessId, accessKey, sign, region, template)
case "tencent":
case TencentCloud:
return GetTencentClient(accessId, accessKey, sign, region, template, other)
case "volcengine":
case VolcEngine:
return GetVolcClient(accessId, accessKey, sign, region, template, other)
default:
return nil
Expand Down

0 comments on commit 1636c80

Please sign in to comment.