tools

package
v0.0.0-...-de73072 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2019 License: GPL-3.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoNullString

func AutoNullString(s *string) sql.NullString

func ChecNickName

func ChecNickName(Hash string) bool

ChecNickName Check NickName Format

func CheckImgHash

func CheckImgHash(Hash string) bool

CheckImgHash Check ImgHash Format

func GetLoginStateOfCookie

func GetLoginStateOfCookie(req *http.Request) (UserID string, Session session.IO)

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

func GetPostJSON(req *http.Request, data interface{}) (status int, jsonRes map[string]string)

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.

Jump to

Keyboard shortcuts

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