util

package
v0.0.0-...-6b1d79f Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(req *http.Request, obj interface{}) error

func BindForm

func BindForm(req *http.Request, ptr interface{}) error

func BindJson

func BindJson(req *http.Request, obj interface{}) error

func MD5Encode

func MD5Encode(data string) string

大写

func MakePasswd

func MakePasswd(plainpwd, salt string) string

func Md5Encode

func Md5Encode(data string) string

小写的

func Resp

func Resp(writer http.ResponseWriter, code int, data interface{}, msg string)

func RespFail

func RespFail(writer http.ResponseWriter, msg string)

func RespList

func RespList(w http.ResponseWriter, code int, data interface{}, total interface{})

func RespOK

func RespOK(writer http.ResponseWriter, data interface{}, msg string)

func RespOkList

func RespOkList(w http.ResponseWriter, lists interface{}, total interface{})

func ValidatePasswd

func ValidatePasswd(plainpwd, salt, passwd string) bool

Types

type H

type H struct {
	Code  int         `json:"code"`
	Msg   string      `json:"msg"`
	Data  interface{} `json:"data,omitempty"`
	Rows  interface{} `json:"rows,omitempty"`
	Total interface{} `json:"total,omitempty"`
}

Jump to

Keyboard shortcuts

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