Documentation
¶
Index ¶
- Constants
- Variables
- func AddCallbackTask(sms *SMS, flag string)
- func BytesToInt64(b []byte) (tmp int64)
- func BytesTouInt64(b []byte) (tmp uint64)
- func BytesTouInt8(b []byte) (tmp uint8)
- func CreateClient(accessKeyId *string, accessKeySecret *string) (_result *dysmsapi20170525.Client, _err error)
- func Init()
- func Int64ToBytes(n int64) (b []byte)
- func NewApplication() sms.Sms
- func RunCallbackTask()
- func Uint64ToBytes(n uint64) (b []byte)
- func VailCode(code string) error
- func VailMobile(mobile string) error
- func VailUid(uid string) error
- type Alidayu
- type Application
- type Callback
- type Model
- func (m *Model) DelSmsUid()
- func (m *Model) GetMobileArea() (string, error)
- func (m *Model) GetMobileInfo() (*phonedata.PhoneRecord, error)
- func (m *Model) GetSendTime() (int64, error)
- func (m *Model) GetSmsCode() (code string, uxtime int64, err error)
- func (m *Model) GetSmsUid() (string, error)
- func (m *Model) GetTodaySendNums() (uint64, error)
- func (m *Model) SetSendTime()
- func (m *Model) SetSmsCode()
- func (m *Model) SetSmsUid()
- func (m *Model) SetTodaySendNums(num uint64)
- type SMS
- func (sms *SMS) CheckCode(mobile, code string) error
- func (sms *SMS) DelUid(mobile, uid string) error
- func (sms *SMS) Info(mobile string) (map[string]interface{}, error)
- func (sms *SMS) Send(mobile string) error
- func (sms *SMS) SetServiceConfig(serviceName string) *SMS
- func (sms *SMS) SetUid(mobile, uid string) error
- type Sender
- type ServiceConfig
- type ServiceProvider
Constants ¶
View Source
const ( VERSION = "0.16 beta" ContentType = "text/json" CacheSize int = 64 WriteBuffer int = 32 Maxsendtime = 60 )
Variables ¶
View Source
var SenderMap = make(map[string]func() Sender)
Functions ¶
func AddCallbackTask ¶
func CreateClient ¶
func CreateClient(accessKeyId *string, accessKeySecret *string) (_result *dysmsapi20170525.Client, _err error)
*
- 使用AK&SK初始化账号Client
- @param accessKeyId
- @param accessKeySecret
- @return Client
- @throws Exception
func NewApplication ¶
func RunCallbackTask ¶
func RunCallbackTask()
func VailMobile ¶
Types ¶
type Application ¶
type Application struct { }
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) GetMobileArea ¶
func (*Model) GetMobileInfo ¶
func (m *Model) GetMobileInfo() (*phonedata.PhoneRecord, error)
func (*Model) GetSendTime ¶
* 获取发送时间 group:signname:mobile *
func (*Model) GetSmsCode ¶
* 获取code group:servicename:signname:mobile *
func (*Model) GetTodaySendNums ¶
* 获取当天发送数量 group:service:signname:mobile:date *
func (*Model) SetSmsCode ¶
func (m *Model) SetSmsCode()
* 设置code group:servicename:signname:mobile *
func (*Model) SetTodaySendNums ¶
* 设置当天发送数量 group:service:signname:mobile:date *
type SMS ¶
type SMS struct { Mobile string Code string Uid string Config *ServiceConfig ConfigisOK bool NowTime time.Time // contains filtered or unexported fields }
func (*SMS) SetServiceConfig ¶
设置服务配置文件,根据register/resetpwd选择不同短信模板,暂时使用同一模板,
type ServiceConfig ¶
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (sms *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (sms *ServiceProvider) Register()
Click to show internal directories.
Click to hide internal directories.