Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverAdapter ¶
type DriverAdapter interface { // 创建对应的发短信表 CreateTable(db *gorose.Engin) (err error) // 生成短信记录入库 GenerateSms(db *gorose.Engin, sms *Sms) (pkid int64, err error) // 更新短信发送结果信息 UpdateSmsSendResult(db *gorose.Engin, sms *Sms) (pkid int64, err error) // 根据条件获取最新一条发送结果 GetLatestSms(db *gorose.Engin, sms *Sms) (err error) // 核销短息 VerifySms(db *gorose.Engin, sms *Sms) (affected_rows int64, err error) }
type SdkAdapter ¶
type SdkAdapter interface { SendSMS(*Sms) SmsResponse CheckSMS(*Sms) SmsResponse }
type Sms ¶
type Sms struct { Id int64 `gorose:"id" json:"id"` Code string `gorose:"code" json:"code"` // 验证码 SmsStatus int64 `gorose:"sms_status" json:"sms_status"` // 状态:默认0发送失败,1发送成功,2已核销 MobilePre int64 `gorose:"mobile_pre" json:"mobile_pre"` // 国家代码 Mobile string `gorose:"mobile" json:"mobile"` // 手机号 Ip string `gorose:"ip" json:"ip"` // ip OrderNo string `gorose:"order_no" json:"order_no"` // 唯一编号 SendResult string `gorose:"send_result" json:"send_result"` // 原始返回的结果 CreatedAt string `gorose:"created_at" json:"created_at"` }
type SmsResponse ¶
SmsResponse 发送短信后的返回结构体
Click to show internal directories.
Click to hide internal directories.