Documentation ¶
Index ¶
- func AutoNullString(s *string) sql.NullString
- func ChecNickName(Hash string) bool
- func CheckImgHash(Hash string) bool
- func GetLoginStateOfCookie(req *http.Request) (UserID string, Session session.IO)
- func GetLoginStateOfOperator(req *http.Request, SssionID, Operator string) (UserID string, Session session.IO)
- func GetPostJSON(req *http.Request, data interface{}) (status int, jsonRes map[string]string)
- func GetWeiXinUser(code string) (OpenID, SessionKey string, UnionID *string, status int, ...)
- func JSONMarshal(v interface{}) (byteRes []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoNullString ¶
func AutoNullString(s *string) sql.NullString
func GetLoginStateOfCookie ¶
GetLoginStateOfCookie will check wether user have login and check Cookie["Phone"] and return ID and session
func GetLoginStateOfOperator ¶
func GetLoginStateOfOperator(req *http.Request, SssionID, Operator string) (UserID string, Session session.IO)
GetLoginStateOfOperator will check wether user have login and check Operator and return ID and session
func GetPostJSON ¶
GetPostJSON get json in req, by using data. return 400 and errinfo if err ruturn 200 if success
func GetWeiXinUser ¶
func GetWeiXinUser(code string) (OpenID, SessionKey string, UnionID *string, status int, jsonRes map[string]string)
GetWeiXinUser
func JSONMarshal ¶
func JSONMarshal(v interface{}) (byteRes []byte)
JSONMarshal Marshal struct and panic if err Only Use this with static value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.