Documentation ¶
Index ¶
- Constants
- func AddNewAuthCodeTrigger(id string, trigger NewAuthCodeTrigger)
- func AllTrue(literals ...string) bool
- func AppendParameter(urlPath string, parameters map[string]string) string
- func CheckToken(tokenKey string) bool
- func DelNewAuthCodeTrigger(id string)
- func DeleteTempFile(delay time.Duration, filePath string) (err error)
- func EncodePassport(originalPasspord string) (result string)
- func GenerateBasicAttrMap(w http.ResponseWriter, r *http.Request) map[string]string
- func GeneratePagePath(reqPage string) string
- func GetAndNewAuthCode() (string, error)
- func GetCurrentAuthCode() (string, error)
- func GetRequestInfo(r *http.Request) string
- func GetSession(w http.ResponseWriter, r *http.Request) (*session.MySession, error)
- func GetSessionMap(w http.ResponseWriter, r *http.Request) map[string]string
- func HasNewAuthCodeTrigger(id string) bool
- func MatchString(args ...interface{}) bool
- func RemoveToken(tokenKey string) bool
- func SaveToken(token Token) bool
- func SimpleEqual(args ...interface{}) bool
- func UrlDecoding(s string) string
- func UrlEncoding(s string) string
- func VerifyAuthCode(authCode string) (bool, error)
- func VerifyRegisterForm(r *http.Request) (fieldMap map[string]string, invalidFields []string)
- type NewAuthCodeTrigger
- type RequestInfo
- type Token
Constants ¶
View Source
const ( LOGIN_NAME_KEY = "loginName" GROUP_NAME_KEY = "groupName" PASSWORD_KEY = "password" CN_NAME_KEY = "cnName" EMAIL_KEY = "email" MOBILE_PHONE_KEY = "mobilePhone" AUTH_CODE = "auth_code" HINT_KEY = "hint" TOKEN_KEY = "token" )
request parameter
View Source
const (
AUTH_CODE_LENGTH = 8
)
auth code
Variables ¶
This section is empty.
Functions ¶
func AddNewAuthCodeTrigger ¶
func AddNewAuthCodeTrigger(id string, trigger NewAuthCodeTrigger)
func CheckToken ¶
func DelNewAuthCodeTrigger ¶
func DelNewAuthCodeTrigger(id string)
func EncodePassport ¶
func GenerateBasicAttrMap ¶
func GeneratePagePath ¶
func GetAndNewAuthCode ¶
func GetCurrentAuthCode ¶
func GetRequestInfo ¶
func GetSession ¶
func GetSessionMap ¶
func HasNewAuthCodeTrigger ¶
func MatchString ¶
func MatchString(args ...interface{}) bool
func RemoveToken ¶
func SimpleEqual ¶
func SimpleEqual(args ...interface{}) bool
func UrlDecoding ¶
func UrlEncoding ¶
func VerifyAuthCode ¶
Types ¶
type NewAuthCodeTrigger ¶
type NewAuthCodeTrigger func(string)
type RequestInfo ¶
Click to show internal directories.
Click to hide internal directories.