Documentation ¶
Overview ¶
Package sms is an API service for authentication via SMS
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct { Store *kvstore.Store Hook *HookFunc Cryptor *securecookie.SecureCookie Log *logger.Log Config *Flags }
App - Класс сервера API
func (*App) Init ¶
Init - если клиент уже авторизован вернуть Code=4, иначе - проверить остальные варианты
func (*App) InitForced ¶
InitForced - если клиент уже авторизован, выполнить активацию, иначе - проверить остальные варианты
type Flags ¶
type Flags struct { smpp.Flags AppKey string `long:"sms_session_key" description:"Key to encode user session (default: random key reset on restart)"` BlockKey string `long:"sms_block_key" default:"T<8rYvXmgLBdND(YW}3QRcLwh4$4P5eq" description:"Key to encode session blocks (16,32 or 62 byte)"` FailDelay int `long:"sms_delay" default:"5" description:"Delay response when password wrong (seconds)"` SmsRetry int `long:"sms_retry" default:"300" description:"Repeat SMS only after this period (seconds)"` StoreName string `long:"sms_code_file" default:"store.json" description:"File to store active sent codes at program exit"` }
Flags is a package flags sample in form ready for use with github.com/jessevdk/go-flags
Click to show internal directories.
Click to hide internal directories.