request

package
v0.0.0-...-316850d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2013 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

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 AllTrue

func AllTrue(literals ...string) bool

func AppendParameter

func AppendParameter(urlPath string, parameters map[string]string) string

func CheckToken

func CheckToken(tokenKey string) bool

func DelNewAuthCodeTrigger

func DelNewAuthCodeTrigger(id string)

func DeleteTempFile

func DeleteTempFile(delay time.Duration, filePath string) (err error)

func EncodePassport

func EncodePassport(originalPasspord string) (result string)

func GenerateBasicAttrMap

func GenerateBasicAttrMap(w http.ResponseWriter, r *http.Request) map[string]string

func GeneratePagePath

func GeneratePagePath(reqPage string) string

func GetAndNewAuthCode

func GetAndNewAuthCode() (string, error)

func GetCurrentAuthCode

func GetCurrentAuthCode() (string, error)

func GetRequestInfo

func GetRequestInfo(r *http.Request) string

func GetSession

func GetSession(w http.ResponseWriter, r *http.Request) (*session.MySession, error)

func GetSessionMap

func GetSessionMap(w http.ResponseWriter, r *http.Request) map[string]string

func HasNewAuthCodeTrigger

func HasNewAuthCodeTrigger(id string) bool

func MatchString

func MatchString(args ...interface{}) bool

func RemoveToken

func RemoveToken(tokenKey string) bool

func SaveToken

func SaveToken(token Token) bool

func SimpleEqual

func SimpleEqual(args ...interface{}) bool

func UrlDecoding

func UrlDecoding(s string) string

func UrlEncoding

func UrlEncoding(s string) string

func VerifyAuthCode

func VerifyAuthCode(authCode string) (bool, error)

func VerifyRegisterForm

func VerifyRegisterForm(r *http.Request) (fieldMap map[string]string, invalidFields []string)

Types

type NewAuthCodeTrigger

type NewAuthCodeTrigger func(string)

type RequestInfo

type RequestInfo struct {
	Form   url.Values
	Method string
	Path   string
	Scheme string
}

type Token

type Token struct {
	Key   string
	Value string
}

func GenerateToken

func GenerateToken(r *http.Request, extraInfo ...string) Token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL