Documentation
¶
Index ¶
Constants ¶
View Source
const ( // salt length in byte for key derivation SALT_LEN = 16 // derived key length KEY_LEN = 16 // iteration times for PBKDF2 ITER_TIME = 128 // auth code type for signup CODE_TYPE_SIGNUP = "signup" // auth code type for login CODE_TYPE_LOGIN = "login" // cache the request time of code to prevent request code frequently CODE_REQ_TIME = "time" // field for cache extension field EXTENSION = "ext" // waiting for CODE_REQ_DURATION seconds is required to request a new code CODE_REQ_DURATION = 60 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyInfo ¶
type APIKeyInfo struct { Exchange string `json:"exchange"` APIKey string `json:"api_key"` APISecret string `json:"api_secret"` }
func (*APIKeyInfo) Persist ¶
func (k *APIKeyInfo) Persist(username string) error
func (*APIKeyInfo) Valid ¶
func (k *APIKeyInfo) Valid() bool
type SendCode ¶
type User ¶
type User struct { APIKeyInfo Username string // contains filtered or unexported fields }
func (*User) AddStrategy ¶
func (*User) GetStrategyInfo ¶
func (*User) RecoverFromLocalDB ¶
func (*User) RemoveStrategy ¶
Click to show internal directories.
Click to hide internal directories.